Import Geant4 11.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2023-12-08 10:43:34 +01:00
parent dd1f179cda
commit 860a2b92bf
3962 changed files with 139318 additions and 164259 deletions
@@ -215,18 +215,17 @@ namespace G4INCL {
/// \brief Set the INCLXX datafile path
void setINCLXXDataFilePath(std::string const &path) { INCLXXDataFilePath=path; }
/// \brief Set the ABLAXX datafile path
#ifdef INCL_DEEXCITATION_ABLAXX
void setABLAXXDataFilePath(std::string const &path) { ablaxxDataFilePath=path; }
#endif
std::string const &getINCLXXDataFilePath() const {
return INCLXXDataFilePath;
}
#ifdef INCL_DEEXCITATION_ABLAXX
std::string const &getABLAv3pCxxDataFilePath() const {
return ablav3pCxxDataFilePath;
}
#endif
#ifdef INCL_DEEXCITATION_ABLACXX
std::string const &getABLAXXDataFilePath() const {
return ablaxxDataFilePath;
}
@@ -364,6 +363,10 @@ namespace G4INCL {
#endif
G4bool getInverseKinematics() const { return inverseKinematics; }
G4bool getsrcPairConfig() const { return srcPairCorrelations; }
G4float getsrcPairDist() const { return srcPairDistance; }
/// \brief Get the decay time threshold time
G4double getDecayTimeThreshold() const { return decayTimeThreshold; }
@@ -426,9 +429,6 @@ namespace G4INCL {
std::string deExcitationString;
DeExcitationType deExcitationType;
#ifdef INCL_DEEXCITATION_ABLAXX
std::string ablav3pCxxDataFilePath;
#endif
#ifdef INCL_DEEXCITATION_ABLACXX
std::string ablaxxDataFilePath;
#endif
#ifdef INCL_DEEXCITATION_ABLA07
@@ -459,6 +459,8 @@ namespace G4INCL {
G4double fermiMomentum;
G4double cutNN;
G4bool ann;
G4double bias;
@@ -504,6 +506,10 @@ namespace G4INCL {
#endif
G4bool inverseKinematics;
G4bool srcPairCorrelations;
G4float srcPairDistance;
G4double decayTimeThreshold;
@@ -74,10 +74,7 @@ namespace G4INCL {
enum DeExcitationType {
DeExcitationNone
#ifdef INCL_DEEXCITATION_ABLAXX
, DeExcitationABLAv3p
#endif
#ifdef INCL_DEEXCITATION_ABLACXX
, DeExcitationABLACXX
, DeExcitationABLAXX
#endif
#ifdef INCL_DEEXCITATION_ABLA07
, DeExcitationABLA07
@@ -122,7 +119,8 @@ namespace G4INCL {
MultiPionsCrossSections,
TruncatedMultiPionsCrossSections,
MultiPionsAndResonancesCrossSections,
StrangenessCrossSections
StrangenessCrossSections,
AntiparticlesCrossSections
};
// Enumerator for phase-space generator
@@ -67,6 +67,7 @@ namespace G4INCL {
struct EventInfo {
EventInfo() :
nParticles(0),
event(0),
eventBias((Float_t)0.0),
nRemnants(0),
projectileType(0),
@@ -81,6 +82,7 @@ namespace G4INCL {
nCollisions(0),
stoppingTime((Float_t)0.0),
EBalance((Float_t)0.0),
firstEBalance((Float_t)0.0),
pLongBalance((Float_t)0.0),
pTransBalance((Float_t)0.0),
nCascadeParticles(0),
@@ -91,6 +93,8 @@ namespace G4INCL {
nucleonAbsorption(false),
pionAbsorption(false),
nDecays(0),
nSrcCollisions(0),
nSrcPairs(0),
nBlockedCollisions(0),
nBlockedDecays(0),
effectiveImpactParameter((Float_t)0.0),
@@ -117,13 +121,13 @@ namespace G4INCL {
nCollisionAvatars(0),
nDecayAvatars(0),
nUnmergedSpectators(0),
nEnergyViolationInteraction(0),
event(0)
nEnergyViolationInteraction(0)
{
std::fill_n(A, maxSizeParticles, 0);
std::fill_n(Z, maxSizeParticles, 0);
std::fill_n(S, maxSizeParticles, 0);
std::fill_n(J, maxSizeParticles, 0);
std::fill_n(PDGCode, maxSizeParticles, 0);
std::fill_n(ParticleBias, maxSizeParticles, (Float_t)0.0);
std::fill_n(EKin, maxSizeParticles, (Float_t)0.0);
@@ -166,18 +170,22 @@ namespace G4INCL {
/** \brief Number of particles in the final state */
Short_t nParticles;
/** \brief Sequential number of the event in the event loop */
Int_t event;
/** \brief Particle mass number */
Short_t A[maxSizeParticles];
/** \brief Particle charge number */
Short_t Z[maxSizeParticles];
/** \brief Particle strangeness number */
Short_t S[maxSizeParticles];
/** \brief Particle angular momemtum */
Short_t J[maxSizeParticles];
/** \brief PDG numbering of the particles */
Int_t PDGCode[maxSizeParticles];
/** \brief Particle weight due to the bias */
Float_t ParticleBias[maxSizeParticles];
/** \brief Event bias */
Float_t eventBias;
/** \brief Particle weight due to the bias */
Float_t ParticleBias[maxSizeParticles];
/** \brief Particle kinetic energy [MeV] */
Float_t EKin[maxSizeParticles];
/** \brief Particle momentum, x component [MeV/c] */
@@ -199,8 +207,6 @@ namespace G4INCL {
Int_t parentResonancePDGCode[maxSizeParticles];
/** \brief Particle's parent resonance unique ID identifier */
Int_t parentResonanceID[maxSizeParticles];
/** \brief Emission time [fm/c] */
Float_t emissionTime[maxSizeParticles];
/** \brief History of the particle
*
* Condensed information about the de-excitation chain of a particle. For
@@ -222,34 +228,6 @@ namespace G4INCL {
std::vector<std::string> history;
/** \brief Number of remnants */
Short_t nRemnants;
/** \brief Remnant mass number */
Short_t ARem[maxSizeRemnants];
/** \brief Remnant charge number */
Short_t ZRem[maxSizeRemnants];
/** \brief Remnant strangeness number */
Short_t SRem[maxSizeRemnants];
/** \brief Remnant excitation energy [MeV] */
Float_t EStarRem[maxSizeRemnants];
/** \brief Remnant spin [\f$\hbar\f$] */
Float_t JRem[maxSizeRemnants];
/** \brief Remnant kinetic energy [MeV] */
Float_t EKinRem[maxSizeRemnants];
/** \brief Remnant momentum, x component [MeV/c] */
Float_t pxRem[maxSizeRemnants];
/** \brief Remnant momentum, y component [MeV/c] */
Float_t pyRem[maxSizeRemnants];
/** \brief Remnant momentum, z component [MeV/c] */
Float_t pzRem[maxSizeRemnants];
/** \brief Remnant momentum polar angle [radians] */
Float_t thetaRem[maxSizeRemnants];
/** \brief Remnant momentum azimuthal angle [radians] */
Float_t phiRem[maxSizeRemnants];
/** \brief Remnant angular momentum, x component [\f$\hbar\f$] */
Float_t jxRem[maxSizeRemnants];
/** \brief Remnant angular momentum, y component [\f$\hbar\f$] */
Float_t jyRem[maxSizeRemnants];
/** \brief Remnant angular momentum, z component [\f$\hbar\f$] */
Float_t jzRem[maxSizeRemnants];
/** \brief Projectile particle type */
Int_t projectileType;
/** \brief Mass number of the target nucleus */
@@ -274,6 +252,8 @@ namespace G4INCL {
Float_t stoppingTime;
/** \brief Energy-conservation balance [MeV] */
Float_t EBalance;
/** \brief First value for the energy-conservation balance [MeV] */
Float_t firstEBalance;
/** \brief Longitudinal momentum-conservation balance [MeV/c] */
Float_t pLongBalance;
/** \brief Transverse momentum-conservation balance [MeV/c] */
@@ -294,6 +274,10 @@ namespace G4INCL {
Bool_t pionAbsorption;
/** \brief Number of accepted Delta decays */
Int_t nDecays;
/** \brief Number of accepted SRC collisions */
Int_t nSrcCollisions;
/** \brief Number of src pairs */
Int_t nSrcPairs;
/** \brief Number of two-body collisions blocked by Pauli or CDPP */
Int_t nBlockedCollisions;
/** \brief Number of decays blocked by Pauli or CDPP */
@@ -348,8 +332,36 @@ namespace G4INCL {
Int_t nUnmergedSpectators;
/** \brief Number of attempted collisions/decays for which the energy-conservation algorithm failed to find a solution. */
Int_t nEnergyViolationInteraction;
/** \brief Sequential number of the event in the event loop */
Int_t event;
/** \brief Emission time [fm/c] */
Float_t emissionTime[maxSizeParticles];
/** \brief Remnant mass number */
Short_t ARem[maxSizeRemnants];
/** \brief Remnant charge number */
Short_t ZRem[maxSizeRemnants];
/** \brief Remnant strangeness number */
Short_t SRem[maxSizeRemnants];
/** \brief Remnant excitation energy [MeV] */
Float_t EStarRem[maxSizeRemnants];
/** \brief Remnant spin [\f$\hbar\f$] */
Float_t JRem[maxSizeRemnants];
/** \brief Remnant kinetic energy [MeV] */
Float_t EKinRem[maxSizeRemnants];
/** \brief Remnant momentum, x component [MeV/c] */
Float_t pxRem[maxSizeRemnants];
/** \brief Remnant momentum, y component [MeV/c] */
Float_t pyRem[maxSizeRemnants];
/** \brief Remnant momentum, z component [MeV/c] */
Float_t pzRem[maxSizeRemnants];
/** \brief Remnant momentum polar angle [radians] */
Float_t thetaRem[maxSizeRemnants];
/** \brief Remnant momentum azimuthal angle [radians] */
Float_t phiRem[maxSizeRemnants];
/** \brief Remnant angular momentum, x component [\f$\hbar\f$] */
Float_t jxRem[maxSizeRemnants];
/** \brief Remnant angular momentum, y component [\f$\hbar\f$] */
Float_t jyRem[maxSizeRemnants];
/** \brief Remnant angular momentum, z component [\f$\hbar\f$] */
Float_t jzRem[maxSizeRemnants];
/** \brief Particle kinetic energy, in inverse kinematics [MeV] */
Float_t EKinPrime[maxSizeParticles];
/** \brief Particle momentum, z component, in inverse kinematics [MeV/c] */
@@ -360,6 +372,7 @@ namespace G4INCL {
/** \brief Reset the EventInfo members */
void reset() {
nParticles = 0;
event = 0;
eventBias = (Float_t)0.0;
history.clear();
nRemnants = 0;
@@ -375,6 +388,7 @@ namespace G4INCL {
nCollisions = 0;
stoppingTime = (Float_t)0.0;
EBalance = (Float_t)0.0;
firstEBalance = (Float_t)0.0;
pLongBalance = (Float_t)0.0;
pTransBalance = (Float_t)0.0;
nCascadeParticles = 0;
@@ -385,6 +399,8 @@ namespace G4INCL {
nucleonAbsorption = false;
pionAbsorption = false;
nDecays = 0;
nSrcCollisions = 0;
nSrcPairs = 0;
nBlockedCollisions = 0;
nBlockedDecays = 0;
effectiveImpactParameter = (Float_t)0.0;
@@ -412,7 +428,6 @@ namespace G4INCL {
nDecayAvatars = 0;
nUnmergedSpectators = 0;
nEnergyViolationInteraction = 0;
event = 0;
}
@@ -257,12 +257,57 @@ namespace G4INCL {
theA = 1;
theZ = -1;
theS = -1;
break;
break;
case antiProton:
theA = -1;
theZ = -1;
theS = 0;
break;
break;
case XiMinus:
theA = 1;
theZ = -1;
theS = -2;
break;
case XiZero:
theA = 1;
theZ = 0;
theS = -2;
break;
case antiNeutron:
theA = -1;
theZ = 0;
theS = 0;
break;
case antiLambda:
theA = -1;
theZ = 0;
theS = 1;
break;
case antiSigmaMinus:
theA = -1;
theZ = 1;
theS = 1;
break;
case antiSigmaPlus:
theA = -1;
theZ = -1;
theS = 1;
break;
case antiSigmaZero:
theA = -1;
theZ = 0;
theS = 1;
break;
case antiXiMinus:
theA = -1;
theZ = 1;
theS = 2;
break;
case antiXiZero:
theA = -1;
theZ = 0;
theS = 2;
break;
case KPlus:
theA = 0;
theZ = 1;
@@ -298,7 +343,7 @@ namespace G4INCL {
theA = 0;
theZ = 0;
theS = 0;
break;
break;
case UnknownParticle:
theA = 0;
theZ = 0;
@@ -377,10 +422,10 @@ namespace G4INCL {
theType==DeltaZero || theType==DeltaMinus); }
/** \brief Is this a Sigma? */
G4bool isSigma() const { return (theType == SigmaPlus || theType == SigmaZero || theType == SigmaMinus); }
G4bool isSigma() const { return (theType == SigmaPlus || theType == SigmaZero || theType == SigmaMinus); }
/** \brief Is this a Kaon? */
G4bool isKaon() const { return (theType == KPlus || theType == KZero); }
G4bool isKaon() const { return (theType == KPlus || theType == KZero); }
/** \brief Is this an antiKaon? */
G4bool isAntiKaon() const { return (theType == KZeroBar || theType == KMinus); }
@@ -392,7 +437,7 @@ namespace G4INCL {
G4bool isNucleonorLambda() const { return (isNucleon() || isLambda()); }
/** \brief Is this an Hyperon? */
G4bool isHyperon() const { return (isLambda() || isSigma()); }
G4bool isHyperon() const { return (isLambda() || isSigma() ); } //|| isXi()
/** \brief Is this a Meson? */
G4bool isMeson() const { return (isPion() || isKaon() || isAntiKaon() || isEta() || isEtaPrime() || isOmega()); }
@@ -402,9 +447,30 @@ namespace G4INCL {
/** \brief Is this a Strange? */
G4bool isStrange() const { return (isKaon() || isAntiKaon() || isHyperon()); }
/** \brief Is this a Xi? */
G4bool isXi() const { return (theType == XiZero || theType == XiMinus); }
/** \brief Is this an antinucleon? */
G4bool isAntiNucleon() const { return (theType == G4INCL::antiProton ); } //|| theType == G4INCL::antiNeutron
G4bool isAntiNucleon() const { return (theType == antiProton || theType == antiNeutron); }
/** \brief Is this an antiSigma? */
G4bool isAntiSigma() const { return (theType == antiSigmaPlus || theType == antiSigmaZero || theType == antiSigmaMinus); }
/** \brief Is this an antiXi? */
G4bool isAntiXi() const { return (theType == antiXiZero || theType == antiXiMinus); }
/** \brief Is this an antiLambda? */
G4bool isAntiLambda() const { return (theType == antiLambda); }
/** \brief Is this an antiHyperon? */
G4bool isAntiHyperon() const { return (isAntiLambda() || isAntiSigma() || isAntiXi()); }
/** \brief Is this an antiBaryon? */
G4bool isAntiBaryon() const { return (isAntiNucleon() || isAntiHyperon()); }
/** \brief Is this an antiNucleon or an antiLambda? */
G4bool isAntiNucleonorAntiLambda() const { return (isAntiNucleon() || isAntiLambda()); }
/** \brief Returns the baryon number. */
G4int getA() const { return theA; }
@@ -478,8 +544,17 @@ namespace G4INCL {
case Lambda:
case SigmaPlus:
case SigmaZero:
case SigmaMinus:
case antiProton:
case SigmaMinus:
case antiProton:
case XiZero:
case XiMinus:
case antiNeutron:
case antiLambda:
case antiSigmaPlus:
case antiSigmaZero:
case antiSigmaMinus:
case antiXiZero:
case antiXiMinus:
case KPlus:
case KZero:
case KZeroBar:
@@ -489,7 +564,7 @@ namespace G4INCL {
case Eta:
case Omega:
case EtaPrime:
case Photon:
case Photon:
return ParticleTable::getINCLMass(theType);
break;
@@ -522,8 +597,17 @@ namespace G4INCL {
case Lambda:
case SigmaPlus:
case SigmaZero:
case SigmaMinus:
case antiProton:
case SigmaMinus:
case antiProton:
case XiZero:
case XiMinus:
case antiNeutron:
case antiLambda:
case antiSigmaPlus:
case antiSigmaZero:
case antiSigmaMinus:
case antiXiZero:
case antiXiMinus:
case KPlus:
case KZero:
case KZeroBar:
@@ -533,7 +617,7 @@ namespace G4INCL {
case Eta:
case Omega:
case EtaPrime:
case Photon:
case Photon:
return ParticleTable::getTableParticleMass(theType);
break;
@@ -566,8 +650,17 @@ namespace G4INCL {
case Lambda:
case SigmaPlus:
case SigmaZero:
case SigmaMinus:
case antiProton:
case SigmaMinus:
case antiProton:
case XiZero:
case XiMinus:
case antiNeutron:
case antiLambda:
case antiSigmaPlus:
case antiSigmaZero:
case antiSigmaMinus:
case antiXiZero:
case antiXiMinus:
case KPlus:
case KZero:
case KZeroBar:
@@ -577,7 +670,7 @@ namespace G4INCL {
case Eta:
case Omega:
case EtaPrime:
case Photon:
case Photon:
return ParticleTable::getRealMass(theType);
break;
@@ -644,7 +737,6 @@ namespace G4INCL {
return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
}
//D
G4double getEmissionPbarQvalueCorrection(const G4int AParent, const G4int ZParent, const G4bool Victim) const {
G4int SParent = 0;
G4int SDaughter = 0;
@@ -658,7 +750,6 @@ namespace G4INCL {
ZDaughter = ZParent;
}
G4double theQValue; //same procedure as for normal case
const G4double massTableParent = ParticleTable::getTableMass(AParent,ZParent,SParent);
@@ -672,7 +763,6 @@ namespace G4INCL {
return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
}
//D
/**\brief Computes correction on the transfer Q-value
*
@@ -292,6 +292,18 @@ namespace G4INCL {
/// \brief Get the type of antikaon
ParticleType getAntiKaonType(const G4int isosp);
/// \brief Get the type of xi
ParticleType getXiType(const G4int isosp);
/// \brief Get the type of antinucleon
ParticleType getAntiNucleonType(const G4int isosp);
/// \brief Get the type of antidelta
ParticleType getAntiXiType(const G4int isosp);
/// \brief Get the type of antisigma
ParticleType getAntiSigmaType(const G4int isosp);
/// \brief Get particle width (in s)
G4double getWidth(const ParticleType t);
@@ -65,14 +65,23 @@ namespace G4INCL {
Lambda,
SigmaPlus,
SigmaZero,
SigmaMinus,
SigmaMinus,
antiProton,
XiMinus,
XiZero,
antiNeutron,
antiLambda,
antiSigmaPlus,
antiSigmaZero,
antiSigmaMinus,
antiXiMinus,
antiXiZero,
KPlus,
KZero,
KZeroBar,
KMinus,
KShort,
KLong,
KLong,
// WARNING: if you add more particle types, you MUST add them BEFORE the
// UnknownParticle type! This is because UnknownParticle is used as a
// counter of the number of available particle types.