Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -40,7 +40,7 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Nucleon.hh" /* FIXME: This should be forward decl! */
|
||||
#include "G4Nucleon.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
#include "G4VNuclearDensity.hh"
|
||||
#include "G4FermiMomentum.hh"
|
||||
@@ -74,15 +74,16 @@ class G4Fancy3DNucleus : public G4V3DNucleus
|
||||
|
||||
public:
|
||||
#if defined(NON_INTEGER_A_Z)
|
||||
void Init(G4double theA, G4double theZ);
|
||||
void Init(G4double theA, G4double theZ, G4int numberOfLambdas = 0);
|
||||
#endif
|
||||
void Init(G4int theA, G4int theZ);
|
||||
void Init(G4int theA, G4int theZ, G4int numberOfLambdas = 0);
|
||||
G4bool StartLoop();
|
||||
G4Nucleon * GetNextNucleon();
|
||||
const std::vector<G4Nucleon> & GetNucleons();
|
||||
G4int GetMassNumber();
|
||||
G4double GetMass();
|
||||
G4int GetCharge();
|
||||
G4int GetNumberOfLambdas(); // Non-negative number of Lambdas (for hypernuclei) or anti-Lambdas (for anti-hypernuclei)
|
||||
G4double GetNuclearRadius();
|
||||
G4double GetNuclearRadius(const G4double maxRelativeDensity);
|
||||
G4double GetOuterRadius();
|
||||
@@ -103,13 +104,13 @@ class G4Fancy3DNucleus : public G4V3DNucleus
|
||||
|
||||
G4int myA;
|
||||
G4int myZ;
|
||||
G4int myL; // Non-negative number of Lambdas (for hypernuclei) or anti-Lambdas (for anti-hypernuclei)
|
||||
std::vector<G4Nucleon> theNucleons;
|
||||
|
||||
G4int currentNucleon;
|
||||
G4VNuclearDensity * theDensity;
|
||||
G4FermiMomentum theFermi;
|
||||
//const G4double nucleondistance; // Uzhi Dec. 2017
|
||||
G4double nucleondistance; // Uzhi Dec. 2017
|
||||
G4double nucleondistance;
|
||||
G4double excitationEnergy;
|
||||
|
||||
std::vector<G4ThreeVector> places; // For selecting locations
|
||||
@@ -128,6 +129,12 @@ inline G4int G4Fancy3DNucleus::GetMassNumber()
|
||||
{
|
||||
return myA;
|
||||
}
|
||||
|
||||
inline G4int G4Fancy3DNucleus::GetNumberOfLambdas()
|
||||
{
|
||||
return myL;
|
||||
}
|
||||
|
||||
inline G4double G4Fancy3DNucleus::AddExcitationEnergy(G4double anE)
|
||||
{
|
||||
excitationEnergy +=anE;
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
// removed not needed 'const'; removed old debug staff and unused
|
||||
// private methods; add comments and reorder methods for
|
||||
// better reading
|
||||
// 27.10.2021 A.Ribon extension for hypernuclei.
|
||||
|
||||
#ifndef G4Fragment_h
|
||||
#define G4Fragment_h 1
|
||||
@@ -53,6 +54,7 @@
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4NuclearPolarization.hh"
|
||||
#include "G4NucleiProperties.hh"
|
||||
#include "G4HyperNucleiProperties.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include <vector>
|
||||
@@ -80,6 +82,9 @@ public:
|
||||
// A,Z and 4-momentum - main constructor for fragment
|
||||
G4Fragment(G4int A, G4int Z, const G4LorentzVector& aMomentum, G4bool warning=true);
|
||||
|
||||
// A,Z,numberOfLambdas and 4-momentum
|
||||
G4Fragment(G4int A, G4int Z, G4int numberOfLambdas, const G4LorentzVector& aMomentum, G4bool warning=true);
|
||||
|
||||
// 4-momentum and pointer to G4particleDefinition (for gammas, e-)
|
||||
G4Fragment(const G4LorentzVector& aMomentum,
|
||||
const G4ParticleDefinition* aParticleDefinition);
|
||||
@@ -101,7 +106,11 @@ public:
|
||||
inline G4int GetZ_asInt() const;
|
||||
inline G4int GetA_asInt() const;
|
||||
inline void SetZandA_asInt(G4int Znew, G4int Anew);
|
||||
|
||||
|
||||
inline G4int GetNumberOfLambdas() const;
|
||||
inline void SetNumberOfLambdas(G4int numberOfLambdas);
|
||||
// Non-negative number of lambdas/anti-lambdas inside the nucleus/anti-nucleus
|
||||
|
||||
inline G4double GetExcitationEnergy() const;
|
||||
inline void SetExcEnergyAndMomentum(G4double eexc, const G4LorentzVector&);
|
||||
|
||||
@@ -112,15 +121,15 @@ public:
|
||||
inline const G4LorentzVector& GetMomentum() const;
|
||||
inline void SetMomentum(const G4LorentzVector& value);
|
||||
|
||||
// computation of mass for any Z and A
|
||||
inline G4double ComputeGroundStateMass(G4int Z, G4int A) const;
|
||||
// computation of mass for any Z, A and numberOfLambdas
|
||||
inline G4double ComputeGroundStateMass(G4int Z, G4int A, G4int numberOfLambdas = 0) const;
|
||||
|
||||
// extra methods
|
||||
inline G4double GetSpin() const;
|
||||
inline void SetSpin(G4double value);
|
||||
|
||||
inline G4int GetCreatorModelType() const;
|
||||
inline void SetCreatorModelType(G4int value);
|
||||
inline G4int GetCreatorModelID() const;
|
||||
inline void SetCreatorModelID(G4int value);
|
||||
|
||||
// obsolete methods
|
||||
|
||||
@@ -185,6 +194,8 @@ private:
|
||||
G4int theA;
|
||||
|
||||
G4int theZ;
|
||||
|
||||
G4int theL; // Non-negative number of lambdas/anti-lambdas inside the nucleus/anti-nucleus
|
||||
|
||||
G4double theExcitationEnergy;
|
||||
|
||||
@@ -245,14 +256,16 @@ inline void G4Fragment::CalculateExcitationEnergy(G4bool warning)
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4Fragment::ComputeGroundStateMass(G4int Z, G4int A) const
|
||||
G4Fragment::ComputeGroundStateMass(G4int Z, G4int A, G4int numberOfLambdas) const
|
||||
{
|
||||
return G4NucleiProperties::GetNuclearMass(A, Z);
|
||||
if ( numberOfLambdas <= 0 ) return G4NucleiProperties::GetNuclearMass(A, Z);
|
||||
else return G4HyperNucleiProperties::GetNuclearMass(A, Z, numberOfLambdas);
|
||||
}
|
||||
|
||||
inline void G4Fragment::CalculateGroundStateMass()
|
||||
{
|
||||
theGroundStateMass = G4NucleiProperties::GetNuclearMass(theA, theZ);
|
||||
if ( theL <= 0 ) theGroundStateMass = G4NucleiProperties::GetNuclearMass(theA, theZ);
|
||||
else theGroundStateMass = G4HyperNucleiProperties::GetNuclearMass(theA, theZ, theL);
|
||||
}
|
||||
|
||||
inline G4int G4Fragment::GetA_asInt() const
|
||||
@@ -272,6 +285,17 @@ inline void G4Fragment::SetZandA_asInt(G4int Znew, G4int Anew)
|
||||
CalculateGroundStateMass();
|
||||
}
|
||||
|
||||
inline G4int G4Fragment::GetNumberOfLambdas() const
|
||||
{
|
||||
return theL;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetNumberOfLambdas(G4int numberOfLambdas)
|
||||
{
|
||||
theL = std::max( numberOfLambdas, 0 ); // Cannot be negative
|
||||
CalculateGroundStateMass();
|
||||
}
|
||||
|
||||
inline G4double G4Fragment::GetExcitationEnergy() const
|
||||
{
|
||||
return theExcitationEnergy;
|
||||
@@ -396,12 +420,12 @@ inline void G4Fragment::SetNumberOfElectrons(G4int value)
|
||||
numberOfShellElectrons = value;
|
||||
}
|
||||
|
||||
inline G4int G4Fragment::GetCreatorModelType() const
|
||||
inline G4int G4Fragment::GetCreatorModelID() const
|
||||
{
|
||||
return creatorModel;
|
||||
}
|
||||
|
||||
inline void G4Fragment::SetCreatorModelType(G4int value)
|
||||
inline void G4Fragment::SetCreatorModelID(G4int value)
|
||||
{
|
||||
creatorModel = value;
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
inline void SetWeight(G4double aW) {theWeight= aW;}
|
||||
inline void SetTime(G4double aT) {theTime = aT;}
|
||||
inline G4double GetTime() const {return theTime;}
|
||||
inline void SetCreatorModelType(G4int idx) {theCreatorModel = idx;}
|
||||
inline G4int GetCreatorModelType() const {return theCreatorModel;}
|
||||
inline void SetCreatorModelID(G4int id) {theCreatorModel = id;}
|
||||
inline G4int GetCreatorModelID() const {return theCreatorModel;}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -107,6 +107,11 @@ class G4HadronicParameters {
|
||||
// Baryons and mesons with c- and b- quarks may be enabled/disabled
|
||||
// This flag is used both by EM and hadronic physics constructors
|
||||
|
||||
G4bool EnableHyperNuclei() const;
|
||||
void SetEnableHyperNuclei( G4bool val );
|
||||
// Light hyper-nuclei may be enabled/disabled
|
||||
// This flag is used both by EM and hadronic physics constructors
|
||||
|
||||
G4bool ApplyFactorXS() const;
|
||||
void SetApplyFactorXS( G4bool val );
|
||||
// Flag enabling cross section factor definition
|
||||
@@ -149,6 +154,7 @@ class G4HadronicParameters {
|
||||
|
||||
G4int fVerboseLevel = 1;
|
||||
G4bool fEnableBC = false;
|
||||
G4bool fEnableHyperNuclei = false;
|
||||
G4bool fApplyFactorXS = false;
|
||||
G4bool fEnableCRCoalescence = false;
|
||||
};
|
||||
@@ -212,6 +218,10 @@ inline G4bool G4HadronicParameters::EnableBCParticles() const {
|
||||
return fEnableBC;
|
||||
}
|
||||
|
||||
inline G4bool G4HadronicParameters::EnableHyperNuclei() const {
|
||||
return fEnableHyperNuclei;
|
||||
}
|
||||
|
||||
inline G4bool G4HadronicParameters::ApplyFactorXS() const {
|
||||
return fApplyFactorXS;
|
||||
}
|
||||
|
||||
@@ -123,6 +123,8 @@ class G4KineticTrack : public G4VKineticNucleon
|
||||
void SetProjectilePotential(const G4double aPotential);
|
||||
G4double GetProjectilePotential() const;
|
||||
|
||||
void SetCreatorModelID(G4int id);
|
||||
G4int GetCreatorModelID() const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -186,6 +188,8 @@ public:
|
||||
CascadeState theStateToNucleus;
|
||||
|
||||
G4double theProjectilePotential;
|
||||
|
||||
G4int theCreatorModel;
|
||||
};
|
||||
|
||||
// extern G4Allocator<G4KineticTrack> theKTAllocator;
|
||||
@@ -422,6 +426,17 @@ G4double G4KineticTrack::GetProjectilePotential() const
|
||||
return theProjectilePotential;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4KineticTrack::SetCreatorModelID(G4int id)
|
||||
{
|
||||
theCreatorModel = id;
|
||||
}
|
||||
inline
|
||||
G4int G4KineticTrack::GetCreatorModelID() const
|
||||
{
|
||||
return theCreatorModel;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
|
||||
#include "G4AntiProton.hh" // Uzhi Feb. 2011
|
||||
#include "G4AntiNeutron.hh" // Uzhi Feb. 2011
|
||||
|
||||
#include "G4Lambda.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4AntiNeutron.hh"
|
||||
#include "G4AntiLambda.hh"
|
||||
#include "G4VKineticNucleon.hh"
|
||||
|
||||
//#include "G4VSplitableHadron.hh"
|
||||
@@ -74,11 +74,13 @@ class G4Nucleon : public G4VKineticNucleon
|
||||
inline void SetBindingEnergy(G4double anEnergy) {theBindingE = anEnergy;}
|
||||
inline G4double GetBindingEnergy() const {return theBindingE;}
|
||||
|
||||
inline void SetParticleType(G4Proton * aProton) {theParticleType = aProton;}
|
||||
inline void SetParticleType(G4Neutron *aNeutron){theParticleType = aNeutron;}
|
||||
inline void SetParticleType(G4Proton* aProton) {theParticleType = aProton;}
|
||||
inline void SetParticleType(G4Neutron* aNeutron){theParticleType = aNeutron;}
|
||||
inline void SetParticleType(G4Lambda* aLambda) {theParticleType = aLambda;}
|
||||
|
||||
inline void SetParticleType(G4AntiProton * aAntiProton) {theParticleType =aAntiProton;}
|
||||
inline void SetParticleType(G4AntiNeutron *aAntiNeutron){theParticleType =aAntiNeutron;}
|
||||
inline void SetParticleType(G4AntiProton* aAntiProton) {theParticleType = aAntiProton;}
|
||||
inline void SetParticleType(G4AntiNeutron* aAntiNeutron){theParticleType = aAntiNeutron;}
|
||||
inline void SetParticleType(G4AntiLambda* aAntiLambda) {theParticleType = aAntiLambda;}
|
||||
|
||||
inline const G4ParticleDefinition* GetParticleType() const {return theParticleType;}
|
||||
virtual const G4ParticleDefinition* GetDefinition() const {return theParticleType;}
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
// M.G. Pia, 2 Oct 1998: modified GetFermiMomentum (original design was
|
||||
// the source of memory leaks)
|
||||
// G.Folger, spring 2010: add integer A/Z interface
|
||||
|
||||
// A. Ribon, autumn 2021: extended to hypernuclei
|
||||
|
||||
#ifndef G4Nucleus_h
|
||||
#define G4Nucleus_h 1
|
||||
// Class Description
|
||||
@@ -52,8 +53,8 @@ class G4Nucleus
|
||||
public:
|
||||
|
||||
G4Nucleus();
|
||||
G4Nucleus(const G4double A, const G4double Z);
|
||||
G4Nucleus(const G4int A, const G4int Z);
|
||||
G4Nucleus(const G4double A, const G4double Z, const G4int numberOfLambdas = 0);
|
||||
G4Nucleus(const G4int A, const G4int Z, const G4int numberOfLambdas = 0);
|
||||
G4Nucleus(const G4Material* aMaterial);
|
||||
|
||||
~G4Nucleus();
|
||||
@@ -66,6 +67,7 @@ class G4Nucleus
|
||||
if (this != &right) {
|
||||
theA=right.theA;
|
||||
theZ=right.theZ;
|
||||
theL=right.theL;
|
||||
aEff=right.aEff;
|
||||
zEff=right.zEff;
|
||||
fIsotope = right.fIsotope;
|
||||
@@ -91,21 +93,9 @@ class G4Nucleus
|
||||
|
||||
void ChooseParameters( const G4Material *aMaterial );
|
||||
|
||||
void SetParameters( const G4double A, const G4double Z );
|
||||
void SetParameters( const G4int A, const G4int Z );
|
||||
void SetParameters( const G4double A, const G4double Z, const G4int numberOfLambdas = 0 );
|
||||
void SetParameters( const G4int A, const G4int Z, const G4int numberOfLambdas = 0 );
|
||||
|
||||
/*
|
||||
#ifndef G4Hadr_Nucleus_IntegerAZ
|
||||
//deprecated Jan 2010, GF
|
||||
inline G4double GetN() const
|
||||
{ return aEff; }
|
||||
|
||||
inline G4double GetZ() const
|
||||
{ return zEff; }
|
||||
#endif
|
||||
//to be replaced by new
|
||||
*/
|
||||
|
||||
inline G4int GetA_asInt() const
|
||||
{ return theA; }
|
||||
|
||||
@@ -114,7 +104,9 @@ class G4Nucleus
|
||||
|
||||
inline G4int GetZ_asInt() const
|
||||
{ return theZ; }
|
||||
//... \GF
|
||||
|
||||
inline G4int GetL() const // Number of Lambdas (in the case of a hypernucleus)
|
||||
{ return theL; }
|
||||
|
||||
inline const G4Isotope* GetIsotope()
|
||||
{ return fIsotope; }
|
||||
@@ -125,6 +117,7 @@ class G4Nucleus
|
||||
if(iso) {
|
||||
theZ = iso->GetZ();
|
||||
theA = iso->GetN();
|
||||
theL = 0;
|
||||
aEff = theA;
|
||||
zEff = theZ;
|
||||
}
|
||||
@@ -132,9 +125,9 @@ class G4Nucleus
|
||||
|
||||
G4DynamicParticle *ReturnTargetParticle() const;
|
||||
|
||||
G4double AtomicMass( const G4double A, const G4double Z ) const;
|
||||
G4double AtomicMass( const G4int A, const G4int Z ) const;
|
||||
|
||||
G4double AtomicMass( const G4double A, const G4double Z, const G4int numberOfLambdas = 0 ) const;
|
||||
G4double AtomicMass( const G4int A, const G4int Z, const G4int numberOfLambdas = 0 ) const;
|
||||
|
||||
G4double GetThermalPz( const G4double mass, const G4double temp ) const;
|
||||
|
||||
G4ReactionProduct GetThermalNucleus(G4double aMass, G4double temp=-1) const;
|
||||
@@ -192,6 +185,7 @@ class G4Nucleus
|
||||
|
||||
G4int theA;
|
||||
G4int theZ;
|
||||
G4int theL; // Number of Lambdas (in the case of hypernucleus)
|
||||
G4double aEff; // effective atomic weight
|
||||
G4double zEff; // effective atomic number
|
||||
|
||||
|
||||
@@ -162,10 +162,10 @@ class G4ReactionProduct
|
||||
inline G4int GetSide() const
|
||||
{ return side; }
|
||||
|
||||
inline void SetCreatorModel( const G4int mod )
|
||||
inline void SetCreatorModelID( const G4int mod )
|
||||
{ theCreatorModel = mod; }
|
||||
|
||||
inline G4int GetCreatorModel() const
|
||||
inline G4int GetCreatorModelID() const
|
||||
{ return theCreatorModel; }
|
||||
|
||||
inline void SetNewlyAdded( const G4bool f )
|
||||
|
||||
@@ -51,13 +51,14 @@ class G4V3DNucleus
|
||||
G4bool operator!=(const G4V3DNucleus &right) const;
|
||||
|
||||
public:
|
||||
virtual void Init(G4int theA, G4int theZ) = 0;
|
||||
virtual void Init(G4int theA, G4int theZ, G4int numberOfLambdas = 0) = 0;
|
||||
virtual G4bool StartLoop() = 0;
|
||||
virtual G4Nucleon * GetNextNucleon() = 0;
|
||||
virtual const std::vector<G4Nucleon> & GetNucleons() = 0;
|
||||
virtual G4int GetMassNumber() = 0;
|
||||
virtual G4double GetMass() = 0;
|
||||
virtual G4int GetCharge() = 0;
|
||||
virtual G4int GetNumberOfLambdas() = 0;
|
||||
virtual G4double GetNuclearRadius() = 0;
|
||||
virtual G4double GetNuclearRadius(const G4double maxRelativeDensity) = 0;
|
||||
virtual G4double GetOuterRadius() = 0;
|
||||
|
||||
Reference in New Issue
Block a user