Import Geant4 11.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2025-12-05 08:54:02 +01:00
parent a499fb82e9
commit b4a16de652
6484 changed files with 232674 additions and 221097 deletions
@@ -54,6 +54,8 @@ namespace G4INCL {
nBlockedCollisions = 0;
nAcceptedDecays = 0;
nBlockedDecays = 0;
nAcceptedSrc=0;
nSrcPairs = 0;
currentTime = 0.0;
firstCollisionTime = 0.0;
firstCollisionXSec = 0.0;
@@ -68,10 +70,12 @@ namespace G4INCL {
nEmittedClusters = 0;
nEnergyViolationInteraction = 0;
};
void incrementAcceptedSrcCollisions() { nAcceptedSrc++; };
void incrementAcceptedCollisions() { nAcceptedCollisions++; };
void incrementBlockedCollisions() { nBlockedCollisions++; };
void incrementAcceptedDecays() { nAcceptedDecays++; };
void incrementSrcPairs() { nSrcPairs++; };
void incrementBlockedDecays() { nBlockedDecays++; };
void incrementAvatars(AvatarType type) { nAvatars[type]++; };
void incrementCascading() { nCascading++; }
@@ -96,6 +100,12 @@ namespace G4INCL {
void setCurrentTime(G4double t) { currentTime = t; };
G4double getCurrentTime() const { return currentTime; };
void setSrcPairs(G4int n) { nSrcPairs=n; };
G4int getSrcPairs() const { return nSrcPairs; };
void setAcceptedSrcCollisions(G4int n) { nAcceptedSrc=n; };
G4int getAcceptedSrcCollisions() const { return nAcceptedSrc; };
G4int getAcceptedCollisions() const { return nAcceptedCollisions; };
G4int getBlockedCollisions() const {return nBlockedCollisions; };
@@ -107,10 +117,12 @@ namespace G4INCL {
G4int getEnergyViolationInteraction() const { return nEnergyViolationInteraction; };
private:
G4int nAcceptedSrc;
G4int nAcceptedCollisions;
G4int nBlockedCollisions;
G4int nAcceptedDecays;
G4int nBlockedDecays;
G4int nSrcPairs;
G4double currentTime;
G4double firstCollisionTime;
G4double firstCollisionXSec;
@@ -219,6 +219,16 @@ namespace G4INCL {
/// \brief Set the ABLAXX datafile path
#ifdef INCL_DEEXCITATION_ABLAXX
void setABLAXXDataFilePath(std::string const &path) { ablaxxDataFilePath=path; }
G4double getFissionDispCoeff() const { return fissdisscoeff; }
G4double getLevDensAv() const { return levdensav; }
G4double getLevDensAs() const { return levdensas; }
G4double getLevDensAk() const { return levdensak; }
G4double getTempFreezeOut() const { return tfreezeout; }
G4float getEmissionBarrierFactorH2() const { return barrierfactorh2; }
G4float getEmissionBarrierFactorH3() const { return barrierfactorh3; }
G4float getEmissionBarrierFactorHe3() const { return barrierfactorhe3; }
G4float getEmissionBarrierFactorHe4() const { return barrierfactorhe4; }
G4float getEmissionBarrierFactorHe6() const { return barrierfactorhe6; }
#endif
std::string const &getINCLXXDataFilePath() const {
@@ -382,6 +392,19 @@ namespace G4INCL {
/// \brief Set the pbar at rest annihilation threshold
void setAtrestThreshold(const G4double t) { atrestThreshold=t; }
/// \brief Get the nbar at rest annihilation threshold
G4double getnbAtrestThreshold() const {return nbatrestThreshold;}
/// \brief Set the nbar at rest annihilation threshold
void setnbAtrestThreshold(const G4double t){ nbatrestThreshold=t;}
/// \brief Get the dbar at rest annihilation threshold
G4double getdbAtrestThreshold() const {return dbatrestThreshold;}
/// \brief Set the dbar at rest annihilation threshold
void setdbAtrestThreshold(const G4double t){ dbatrestThreshold=t;}
private:
@@ -430,6 +453,16 @@ namespace G4INCL {
DeExcitationType deExcitationType;
#ifdef INCL_DEEXCITATION_ABLAXX
std::string ablaxxDataFilePath;
G4double fissdisscoeff;
G4double levdensav;
G4double levdensas;
G4double levdensak;
G4double tfreezeout;
G4float barrierfactorh2;
G4float barrierfactorh3;
G4float barrierfactorhe3;
G4float barrierfactorhe4;
G4float barrierfactorhe6;
#endif
#ifdef INCL_DEEXCITATION_ABLA07
std::string abla07DataFilePath;
@@ -460,11 +493,15 @@ namespace G4INCL {
G4double cutNN;
G4bool ann;
//G4bool ann;
G4double bias;
G4double atrestThreshold;
G4double nbatrestThreshold;
G4double dbatrestThreshold;
#ifdef INCL_ROOT_USE
std::string rootSelectionString;
@@ -93,6 +93,11 @@ namespace G4INCL {
nucleonAbsorption(false),
pionAbsorption(false),
nDecays(0),
fission(false),
fissmode(0),
EStarFis((Float_t)0.0),
ASad(0),
ZSad(0),
nSrcCollisions(0),
nSrcPairs(0),
nBlockedCollisions(0),
@@ -101,6 +106,7 @@ namespace G4INCL {
deltasInside(false),
sigmasInside(false),
kaonsInside(false),
antinucleonsInside(false),
antikaonsInside(false),
lambdasInside(false),
forcedDeltasInside(false),
@@ -110,7 +116,9 @@ namespace G4INCL {
forcedSigmaOutside(false),
forcedStrangeInside(false),
emitLambda(0),
emitAntilambda(0),
emitKaon(false),
emitAntinucleon(false),
clusterDecay(false),
firstCollisionTime((Float_t)0.0),
firstCollisionXSec((Float_t)0.0),
@@ -274,6 +282,20 @@ namespace G4INCL {
Bool_t pionAbsorption;
/** \brief Number of accepted Delta decays */
Int_t nDecays;
/** \brief True if the event is fission */
Bool_t fission;
/** \brief Fission mode */
Short_t fissmode;
/** \brief Excitation energy above fission barrier [MeV] */
Float_t EStarFis;
/** \brief Mass number at saddle */
Short_t ASad;
/** \brief Charge number at saddle */
Short_t ZSad;
/** \brief Mass number at scission */
std::vector<Int_t> ASci;
/** \brief Charge number at scission */
std::vector<Int_t> ZSci;
/** \brief Number of accepted SRC collisions */
Int_t nSrcCollisions;
/** \brief Number of src pairs */
@@ -290,6 +312,8 @@ namespace G4INCL {
Bool_t sigmasInside;
/** \brief Event involved kaons in the nucleus at the end of the cascade */
Bool_t kaonsInside;
/** \brief Event involved antinucleons in the nucleus at the end of the cascade */
Bool_t antinucleonsInside;
/** \brief Event involved antikaons in the nucleus at the end of the cascade */
Bool_t antikaonsInside;
/** \brief Event involved lambdas in the nucleus at the end of the cascade */
@@ -308,8 +332,12 @@ namespace G4INCL {
Bool_t forcedStrangeInside;
/** \brief Number of forced Lambda emit out of the nucleus */
Int_t emitLambda;
/** \brief Number of forced Antilambda emit out of the nucleus */
Int_t emitAntilambda;
/** \brief Event involved forced Kaon emission */
Bool_t emitKaon;
/** \brief Event involved forced Antinucleon emission */
Bool_t emitAntinucleon;
/** \brief Event involved cluster decay */
Bool_t clusterDecay;
/** \brief Time of the first collision [fm/c] */
@@ -399,6 +427,13 @@ namespace G4INCL {
nucleonAbsorption = false;
pionAbsorption = false;
nDecays = 0;
fission = false;
fissmode = 0;
EStarFis = (Float_t)0.0;
ASad = 0;
ZSad = 0;
ASci.clear();
ZSci.clear();
nSrcCollisions = 0;
nSrcPairs = 0;
nBlockedCollisions = 0;
@@ -407,6 +442,7 @@ namespace G4INCL {
deltasInside = false;
sigmasInside = false;
kaonsInside = false;
antinucleonsInside = false;
antikaonsInside = false;
lambdasInside = false;
forcedDeltasInside = false;
@@ -416,7 +452,9 @@ namespace G4INCL {
forcedSigmaOutside = false;
forcedStrangeInside = false;
emitLambda = 0;
emitAntilambda = 0;
emitKaon = false;
emitAntinucleon = false;
clusterDecay = false;
firstCollisionTime = (Float_t)0.0;
firstCollisionXSec = (Float_t)0.0;
@@ -82,6 +82,8 @@ namespace G4INCL {
ParticleList const &getDestroyedParticles() const;
ParticleList const &getCreatedParticles() const;
ParticleList const &getEnteringParticles() const;
ParticleList &getSrcModifiedParticles();
FinalStateValidity getValidity() const { return validity; }
void makeValid() { validity = ValidFS; }
@@ -42,6 +42,7 @@
#include <string>
#include <vector>
#include "G4INCLParticleType.hh"
#include <iostream>
namespace G4INCL {
class Particle;
@@ -45,9 +45,9 @@
#include "G4INCLParticleType.hh"
namespace G4INCL {
const G4int TableZSize = 120;
const G4int TableASize = 290;
const G4int TableZSize = 128;
const G4int TableASize = 300;
namespace HFB {
#ifdef INCLXX_IN_GEANT4_MODE
@@ -82,6 +82,7 @@ namespace G4INCL {
virtual void postInteraction(FinalState *) = 0;
G4double getTime() const { return theTime; };
G4double setTime(G4double t) const { return t; };
virtual ParticleList getParticles() const = 0;
@@ -96,6 +96,7 @@ namespace G4INCL {
thePosition(rhs.thePosition),
nCollisions(rhs.nCollisions),
nDecays(rhs.nDecays),
nSrcPair(rhs.nSrcPair),
thePotentialEnergy(rhs.thePotentialEnergy),
rpCorrelated(rhs.rpCorrelated),
uncorrelatedMomentum(rhs.uncorrelatedMomentum),
@@ -108,6 +109,7 @@ namespace G4INCL {
theHelicity(rhs.theHelicity),
emissionTime(rhs.emissionTime),
outOfWell(rhs.outOfWell),
theSrcPartner(rhs.theSrcPartner),
theMass(rhs.theMass)
{
if(rhs.thePropagationEnergy == &(rhs.theFrozenEnergy))
@@ -147,6 +149,7 @@ namespace G4INCL {
std::swap(thePosition, rhs.thePosition);
std::swap(nCollisions, rhs.nCollisions);
std::swap(nDecays, rhs.nDecays);
std::swap(nSrcPair, rhs.nSrcPair),
std::swap(thePotentialEnergy, rhs.thePotentialEnergy);
// ID intentionally not swapped
@@ -158,6 +161,7 @@ namespace G4INCL {
std::swap(theHelicity, rhs.theHelicity);
std::swap(emissionTime, rhs.emissionTime);
std::swap(outOfWell, rhs.outOfWell);
std::swap(theSrcPartner, rhs.theSrcPartner);
std::swap(theMass, rhs.theMass);
std::swap(rpCorrelated, rhs.rpCorrelated);
@@ -344,6 +348,11 @@ namespace G4INCL {
theZ = 0;
theS = 0;
break;
case antiComposite:
theA = 0;
theZ = 0;
theS = 0;
break;
case UnknownParticle:
theA = 0;
theZ = 0;
@@ -352,7 +361,7 @@ namespace G4INCL {
break;
}
if( !isResonance() && t!=Composite )
if( !isResonance() && t!=Composite && t!=antiComposite )
setINCLMass();
}
@@ -480,6 +489,9 @@ namespace G4INCL {
/** \brief Returns the strangeness number. */
G4int getS() const { return theS; }
/** \brief Returns the strangeness number. */
G4int getSrcPair() const { return nSrcPair; }
G4double getBeta() const {
const G4double P = theMomentum.mag();
@@ -578,6 +590,9 @@ namespace G4INCL {
case Composite:
return ParticleTable::getINCLMass(theA,theZ,theS);
break;
case antiComposite:
return ParticleTable::getINCLMass(-theA,-theZ,theS);
break;
default:
INCL_ERROR("Particle::getINCLMass: Unknown particle type." << '\n');
@@ -631,6 +646,9 @@ namespace G4INCL {
case Composite:
return ParticleTable::getTableMass(theA,theZ,theS);
break;
case antiComposite:
return ParticleTable::getTableMass(-theA,-theZ,theS);
break;
default:
INCL_ERROR("Particle::getTableMass: Unknown particle type." << '\n');
@@ -684,6 +702,9 @@ namespace G4INCL {
case Composite:
return ParticleTable::getRealMass(theA,theZ,theS);
break;
case antiComposite:
return ParticleTable::getRealMass(-theA,-theZ,theS);
break;
default:
INCL_ERROR("Particle::getRealMass: Unknown particle type." << '\n');
@@ -737,33 +758,6 @@ namespace G4INCL {
return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
}
G4double getEmissionPbarQvalueCorrection(const G4int AParent, const G4int ZParent, const G4bool Victim) const {
G4int SParent = 0;
G4int SDaughter = 0;
G4int ADaughter = AParent - 1;
G4int ZDaughter;
G4bool isProton = Victim;
if(isProton){ //proton is annihilated
ZDaughter = ZParent - 1;
}
else { //neutron is annihilated
ZDaughter = ZParent;
}
G4double theQValue; //same procedure as for normal case
const G4double massTableParent = ParticleTable::getTableMass(AParent,ZParent,SParent);
const G4double massTableDaughter = ParticleTable::getTableMass(ADaughter,ZDaughter,SDaughter);
const G4double massTableParticle = getTableMass();
theQValue = massTableParent - massTableDaughter - massTableParticle;
const G4double massINCLParent = ParticleTable::getINCLMass(AParent,ZParent,SParent);
const G4double massINCLDaughter = ParticleTable::getINCLMass(ADaughter,ZDaughter,SDaughter);
const G4double massINCLParticle = getINCLMass();
return theQValue - (massINCLParent-massINCLDaughter-massINCLParticle);
}
/**\brief Computes correction on the transfer Q-value
*
* Computes the correction that must be applied to INCL particles in
@@ -987,6 +981,9 @@ namespace G4INCL {
/** \brief Increment the number of decays undergone by the particle. **/
void incrementNumberOfDecays() { nDecays++; }
/** \brief Set the number of srcpairs. **/
void setNumberOfSrcPair(int n) { nSrcPair = n; }
/** \brief Mark the particle as out of its potential well
*
@@ -1000,6 +997,13 @@ namespace G4INCL {
/// \brief Check if the particle is out of its potential well
G4bool isOutOfWell() const { return outOfWell; }
/// \brief Set and reset src partner
void setSrcPartner() { theSrcPartner = true; }
void resetSrcPartner() { theSrcPartner = false; nSrcPair=0; }
/// \brief Check if the particle is a src partner
G4bool isSrcPartner() const { return theSrcPartner; }
void setEmissionTime(G4double t) { emissionTime = t; }
G4double getEmissionTime() { return emissionTime; };
@@ -1021,7 +1025,7 @@ namespace G4INCL {
G4double adjustEnergyFromMomentum();
G4bool isCluster() const {
return (theType == Composite);
return ((theType == Composite || theType == antiComposite));
}
/// \brief Set the frozen particle momentum
@@ -1094,6 +1098,8 @@ namespace G4INCL {
std::stringstream ss;
ss << "Particle (ID = " << ID << ") type = ";
ss << ParticleTable::getName(theType);
ss << ", SRC pair = " << nSrcPair;
ss << ", Potential energy = " << thePotentialEnergy;
ss << '\n'
<< " energy = " << theEnergy << '\n'
<< " momentum = "
@@ -1109,6 +1115,7 @@ namespace G4INCL {
std::stringstream ss;
ss << "(particle " << ID << " ";
ss << ParticleTable::getName(theType);
ss << nSrcPair << " ";
ss << '\n'
<< thePosition.dump()
<< '\n'
@@ -1236,6 +1243,7 @@ namespace G4INCL {
G4INCL::ThreeVector thePosition;
G4int nCollisions;
G4int nDecays;
G4int nSrcPair;
G4double thePotentialEnergy;
long ID;
@@ -1255,6 +1263,7 @@ namespace G4INCL {
G4double theHelicity;
G4double emissionTime;
G4bool outOfWell;
G4bool theSrcPartner;
/// \brief Time ordered vector of all biased vertices on the particle path
std::vector<G4int> theBiasCollisionVector;
@@ -188,12 +188,30 @@ namespace G4INCL {
/// \brief Getter for neutronSeparationEnergy
G4double getNeutronSeparationEnergy();
/// \brief Getter for antiprotonSeparationEnergy
G4double getantiProtonSeparationEnergy();
/// \brief Getter for antineutronSeparationEnergy
G4double getantiNeutronSeparationEnergy();
/// \brief Getter for antilambdaSeparationEnergy
G4double getantiLambdaSeparationEnergy();
/// \brief Getter for lambdaSeparationEnergy
G4double getLambdaSeparationEnergy();
/// \brief Setter for protonSeparationEnergy
void setProtonSeparationEnergy(const G4double s);
/// \brief Setter for protonSeparationEnergy
void setNeutronSeparationEnergy(const G4double s);
/// \brief Setter for lambdaSeparationEnergy
void setLambdaSeparationEnergy(const G4double s);
/// \brief Setter for antilambdaSeparationEnergy
void setantiLambdaSeparationEnergy(const G4double s);
/// \brief Get the name of the element from the atomic number
std::string getElementName(const G4int Z);
@@ -268,6 +286,12 @@ namespace G4INCL {
* \return the value of the r-p correlation coefficient
*/
G4double getRPCorrelationCoefficient(const ParticleType t);
/// \brief Get the configuration of src-pair correlations
G4bool getsrcPairConfig();
/// \brief Get the distance between src nucleons
G4float getsrcPairDistance();
/// \brief Get the thickness of the neutron skin
G4double getNeutronSkin();
@@ -82,6 +82,7 @@ namespace G4INCL {
KMinus,
KShort,
KLong,
antiComposite,
// 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.