34 #define INCLXX_IN_GEANT4_MODE 1    45 #ifdef INCLXX_IN_GEANT4_MODE    49 #ifdef INCLXX_IN_GEANT4_MODE    56   namespace ParticleTable {
    61       const NaturalIsotopicDistributions *theNaturalIsotopicDistributions = NULL;
    63       const G4double theINCLNucleonMass = 938.2796;
    64       const G4double theINCLPionMass = 138.0;
    77       const G4int mediumNucleiTableSize = 30;
    79       const G4double mediumDiffuseness[mediumNucleiTableSize] =
    80       {0.0,0.0,0.0,0.0,0.0,1.78,1.77,1.77,1.77,1.71,
    81         1.69,1.69,1.635,1.730,1.81,1.833,1.798,
    82         1.841,0.567,0.571, 0.560,0.549,0.550,0.551,
    83         0.580,0.575,0.569,0.537,0.0,0.0};
    84       const G4double mediumRadius[mediumNucleiTableSize] =
    85       {0.0,0.0,0.0,0.0,0.0,0.334,0.327,0.479,0.631,0.838,
    86         0.811,1.07,1.403,1.335,1.25,1.544,1.498,1.513,
    87         2.58,2.77, 2.775,2.78,2.88,2.98,3.22,3.03,2.84,
    92          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0},
    93          {-1.0, -1.0, 2.10, 1.80, 1.70, 1.83, 2.60, 2.50, -1.0, -1.0, -1.0, -1.0, -1.0},
    94          {-1.0, -1.0, -1.0, 1.80, 1.68, 1.70, 2.60, 2.50, 2.50, 2.50, 2.50, -1.0, -1.0},
    95          {-1.0, -1.0, -1.0, -1.0, 1.70, 1.83, 2.56, 2.40, 2.50, 2.50, 2.50, 2.50, 2.50},
    96          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 2.60, 2.50, 2.50, 2.51, 2.50, 2.50, 2.50},
    97          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 2.50, 2.50, 2.50, 2.50, 2.45, 2.40, 2.50},
    98          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 2.50, 2.50, 2.50, 2.50, 2.47},
    99          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 2.50, 2.50, 2.50},
   100          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 2.50}
   105          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0},
   106          {-1.0, -1.0, 77.0, 110., 153., 100., 100., 100., -1.0, -1.0, -1.0, -1.0, -1.0},
   107          {-1.0, -1.0, -1.0, 110., 153., 100., 100., 100., 100., 100., 100., -1.0, -1.0},
   108          {-1.0, -1.0, -1.0, -1.0, 153., 100., 100., 100., 100., 100., 100., 100., 100.},
   109          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 100., 100., 100., 100., 100., 100., 100.},
   110          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 100., 100., 100., 100., 100., 100., 100.},
   111          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 100., 100., 100., 100., 100.},
   112          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 100., 100., 100.},
   113          {-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 100.}
   116       const G4int elementTableSize = 113; 
   119       const std::string elementTable[elementTableSize] = {
   236       const std::string elementIUPACDigits = 
"nubtqphsoe";
   238 #define INCL_DEFAULT_SEPARATION_ENERGY 6.83   243 #undef INCL_DEFAULT_SEPARATION_ENERGY   250 #ifdef INCLXX_IN_GEANT4_MODE   258       char iupacToInt(
char c) {
   259         return (
char)(((
G4int)
'0')+elementIUPACDigits.find(c));
   263       char intToIUPAC(
char n) { 
return elementIUPACDigits.at(n); }
   266       const NaturalIsotopicDistributions *getNaturalIsotopicDistributions() {
   267         if(!theNaturalIsotopicDistributions)
   268           theNaturalIsotopicDistributions = 
new NaturalIsotopicDistributions;
   269         return theNaturalIsotopicDistributions;
   275       protonMass = theINCLNucleonMass;
   276       neutronMass = theINCLNucleonMass;
   277       piPlusMass = theINCLPionMass;
   278       piMinusMass = theINCLPionMass;
   279       piZeroMass = theINCLPionMass;
   289 #ifndef INCLXX_IN_GEANT4_MODE   290       std::string dataFilePath;
   296 #ifdef INCLXX_IN_GEANT4_MODE   305       minDeltaMass = theRealNeutronMass + theRealChargedPiMass + 0.5;
   326           if(aFermiMomentum>0.)
   327             constantFermiMomentum = aFermiMomentum;
   343       std::fill(rpCorrelationCoefficient, rpCorrelationCoefficient + 
UnknownParticle, 1.);
   379       INCL_ERROR(
"Requested isospin of an unknown particle!");
   398       std::stringstream stream;
   404       std::stringstream stream;
   413         return std::string(
"proton");
   415         return std::string(
"neutron");
   417         return std::string(
"delta++");
   419         return std::string(
"delta+");
   421         return std::string(
"delta0");
   423         return std::string(
"delta-");
   425         return std::string(
"pi+");
   427         return std::string(
"pi0");
   429         return std::string(
"pi-");
   431         return std::string(
"composite");
   433       return std::string(
"unknown");
   438         return std::string(
"p");
   440         return std::string(
"n");
   442         return std::string(
"d++");
   444         return std::string(
"d+");
   446         return std::string(
"d0");
   448         return std::string(
"d-");
   450         return std::string(
"pi+");
   452         return std::string(
"pi0");
   454         return std::string(
"pi-");
   456         return std::string(
"comp");
   458       return std::string(
"unknown");
   473         INCL_ERROR(
"getMass : Unknown particle type." << 
'\n');
   481           return theRealProtonMass;
   484           return theRealNeutronMass;
   488           return theRealChargedPiMass;
   491           return theRealPiZeroMass;
   494           INCL_ERROR(
"Particle::getRealMass : Unknown particle type." << 
'\n');
   512 #ifndef INCLXX_IN_GEANT4_MODE   513         return ::G4INCL::NuclearMassTable::getMass(A,Z);
   515         return theG4IonTable->GetNucleusMass(Z,A) / 
MeV;
   529         return Z*(protonMass - protonSeparationEnergy) + (A-Z)*(neutronMass - neutronSeparationEnergy);
   530       else if(A==1 && Z==0)
   532       else if(A==1 && Z==1)
   601       if(A >= 19 || (A < 6 && A >= 2)) {
   605       } 
else if(A < clusterTableASize && Z>=0 && Z < clusterTableZSize && A >= 6) {
   610           INCL_DEBUG(
"getNuclearRadius: Radius for nucleus A = " << A << 
" Z = " << Z << 
" is not available" << 
'\n'   611                      << 
"returning radius for C12");
   612           return positionRMS[6][12];
   619         return 1.225*theDiffusenessParameter*
   620           std::sqrt((2.+5.*theRadiusParameter)/(2.+3.*theRadiusParameter));
   622         INCL_ERROR(
"getNuclearRadius: No radius for nucleus A = " << A << 
" Z = " << Z << 
'\n');
   635         G4double r0 = (2.745e-4 * A + 1.063) * std::pow(A, 1.0/3.0);
   639       } 
else if(A < 6 && A >= 2) {
   640         if(Z<clusterTableZSize && Z>=0) {
   645             INCL_DEBUG(
"getRadiusParameter: Radius for nucleus A = " << A << 
" Z = " << Z << 
" is not available" << 
'\n'   646                        << 
"returning radius for C12");
   647             return positionRMS[6][12];
   650           INCL_DEBUG(
"getRadiusParameter: Radius for nucleus A = " << A << 
" Z = " << Z << 
" is not available" << 
'\n'   651                      << 
"returning radius for C12");
   652           return positionRMS[6][12];
   654       } 
else if(A < 28 && A >= 6) {
   655         return mediumRadius[A-1];
   658         INCL_ERROR(
"getRadiusParameter: No radius for nucleus A = " << A << 
" Z = " << Z << 
'\n');
   667       } 
else if(A < 19 && A >= 6) {
   668         return 5.5 + 0.3 * (
G4double(A) - 6.0)/12.0;
   672         INCL_ERROR(
"getMaximumNuclearRadius : No maximum radius for nucleus A = " << A << 
" Z = " << Z << 
'\n');
   683       } 
else if(A < 28 && A >= 19) {
   684         return mediumDiffuseness[A-1];
   685       } 
else if(A < 19 && A >= 6) {
   686         return mediumDiffuseness[A-1];
   687       } 
else if(A < 6 && A >= 2) {
   688         INCL_ERROR(
"getSurfaceDiffuseness: was called for A = " << A << 
" Z = " << Z << 
'\n');
   691         INCL_ERROR(
"getSurfaceDiffuseness: No diffuseness for nucleus A = " << A << 
" Z = " << Z << 
'\n');
   703         return theINCLProtonSeparationEnergy;
   705         return theINCLNeutronSeparationEnergy;
   707         INCL_ERROR(
"ParticleTable::getSeparationEnergyINCL : Unknown particle type." << 
'\n');
   719         INCL_ERROR(
"ParticleTable::getSeparationEnergyReal : Unknown particle type." << 
'\n');
   742         INCL_WARN(
"getElementName called with Z<1" << 
'\n');
   743         return elementTable[0];
   744       } 
else if(Z<elementTableSize)
   745         return elementTable[
Z];
   751       std::stringstream elementStream;
   753       std::string elementName = elementStream.str();
   754       std::transform(elementName.begin(), elementName.end(), elementName.begin(), intToIUPAC);
   755       elementName[0] = std::toupper(elementName.at(0));
   761       std::transform(pS.begin(), pS.end(), pS.begin(), ::tolower);
   762       pS[0] = ::toupper(pS[0]);
   764       const std::string *iter = std::find(elementTable, elementTable+elementTableSize, pS);
   765       if(iter != elementTable+elementTableSize)
   766         return iter - elementTable;
   773       std::string elementName(s);
   774       std::transform(elementName.begin(), elementName.end(), elementName.begin(), ::tolower);
   776       if(elementName.find_first_not_of(elementIUPACDigits)!=std::string::npos)
   778       std::transform(elementName.begin(), elementName.end(), elementName.begin(), iupacToInt);
   779       std::stringstream elementStream(elementName);
   786       return getNaturalIsotopicDistributions()->getIsotopicDistribution(Z);
   790       return getNaturalIsotopicDistributions()->drawRandomIsotope(Z);
   794       return constantFermiMomentum;
   808       static const G4double alphaParam = 259.416; 
   809       static const G4double betaParam  = 152.824; 
   810       static const G4double gammaParam = 9.5157E-2;
   811       return alphaParam - betaParam*std::exp(-gammaParam*((
G4double)A));
   816       return rpCorrelationCoefficient[t];
   836         else if (isosp == 0) {
   859         else if (isosp == -1) {
   862         else if (isosp == 1) {
 
const G4double sqrtThreeFifths
 
G4double(* NuclearMassFn)(const G4int, const G4int)
 
G4double getSeparationEnergyReal(const ParticleType t, const G4int A, const G4int Z)
Return the real separation energy. 
 
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
 
const G4int clusterTableASize
 
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles. 
 
G4ThreadLocal G4double minDeltaMassRndm
 
G4double getNeutronSkin()
Get the thickness of the neutron skin. 
 
G4double getNeutronSeparationEnergy()
Getter for neutronSeparationEnergy. 
 
G4ThreadLocal G4double minDeltaMass2
 
G4double getProtonSeparationEnergy()
Getter for protonSeparationEnergy. 
 
G4double getNeutronHalo() const
Get the neutron-halo size. 
 
G4double getTableQValue(const G4int A1, const G4int Z1, const G4int A2, const G4int Z2)
Get Q-value (in MeV/c^2) 
 
G4int getChargeNumber(const ParticleType t)
Get charge number from particle type. 
 
G4double getRPCorrelationCoefficient(const ParticleType t) const
Get the r-p correlation coefficient. 
 
G4double getFermiMomentumConstant(const G4int, const G4int)
Return the constant value of the Fermi momentum. 
 
std::string const  & getINCLXXDataFilePath() const
 
ParticleType getNucleonType(const G4int isosp)
Get the type of nucleon. 
 
void setProtonSeparationEnergy(const G4double s)
Setter for protonSeparationEnergy. 
 
G4double getNuclearRadius(const ParticleType t, const G4int A, const G4int Z)
 
ParticleType getPionType(const G4int isosp)
Get the type of pion. 
 
SeparationEnergyType getSeparationEnergyType() const
Get the separation-energy type. 
 
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2) 
 
G4int getMassNumber(const ParticleType t)
Get mass number from particle type. 
 
G4double(* SeparationEnergyFn)(const ParticleType, const G4int, const G4int)
 
G4bool getUseRealMasses() const
Whether to use real masses. 
 
double A(double temperature)
 
G4IonTable * GetIonTable() const
 
G4int parseElement(std::string pS)
Get the name of the element from the atomic number. 
 
Class that stores isotopic abundances for a given element. 
 
std::string getIUPACElementName(const G4int Z)
Get the name of an unnamed element from the IUPAC convention. 
 
G4double getLargestNuclearRadius(const G4int A, const G4int Z)
 
const G4double sqrtFiveThirds
 
IsotopicDistribution const  & getNaturalIsotopicDistribution(const G4int Z)
 
void initialize(Config const *const theConfig)
Initialize the clustering model based on the Config object. 
 
ParticleType getDeltaType(const G4int isosp)
Get the type of delta. 
 
G4double getNeutronSkin() const
Get the neutron-skin thickness. 
 
Functions that encapsulate a mass table. 
 
G4double getSurfaceDiffuseness(const ParticleType t, const G4int A, const G4int Z)
 
G4double(* ParticleMassFn)(const ParticleType)
 
G4double getRadiusParameter(const ParticleType t, const G4int A, const G4int Z)
 
G4ThreadLocal SeparationEnergyFn getSeparationEnergy
Static pointer to the separation-energy function. 
 
std::string getElementName(const G4int Z)
Get the name of the element from the atomic number. 
 
G4double getMaximumNuclearRadius(const ParticleType t, const G4int A, const G4int Z)
 
const G4double effectiveDeltaWidth
 
static G4ParticleTable * GetParticleTable()
 
G4double getSeparationEnergyRealForLight(const ParticleType t, const G4int A, const G4int Z)
Return the real separation energy only for light nuclei. 
 
G4double getINCLMass(const G4int A, const G4int Z)
Get INCL nuclear mass (in MeV/c^2) 
 
G4ThreadLocal G4double minDeltaMass
 
G4int getIsospin(const ParticleType t)
Get the isospin of a particle. 
 
T max(const T t1, const T t2)
brief Return the largest of the two arguments 
 
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei. 
 
G4double GetPDGMass() const
 
const G4double Pf
Fermi momentum [MeV/c]. 
 
G4int drawRandomNaturalIsotope(const G4int Z)
 
G4double getTableSpeciesMass(const ParticleSpecies &p)
 
G4double(* FermiMomentumFn)(const G4int, const G4int)
 
G4double getMomentumRMS(const G4int A, const G4int Z)
Return the RMS of the momentum distribution (light clusters) 
 
#define INCL_DEFAULT_SEPARATION_ENERGY
 
G4double getRPCorrelationCoefficient(const ParticleType t)
Get the value of the r-p correlation coefficient. 
 
G4int parseIUPACElement(std::string const &pS)
Parse a IUPAC element name. 
 
const G4double effectiveDeltaMass
 
const G4int clusterTableZSize
 
G4double getSeparationEnergyINCL(const ParticleType t, const G4int, const G4int)
Return INCL's default separation energy. 
 
G4double getFermiMomentumMassDependent(const G4int A, const G4int)
Return the value Fermi momentum from a fit. 
 
G4double getFermiMomentum() const
Get the Fermi momentum. 
 
std::string getShortName(const ParticleType t)
Get the short INCL name of the particle. 
 
void initialize(Config const *const theConfig=0)
Initialize the particle table. 
 
void setNeutronSeparationEnergy(const G4double s)
Setter for protonSeparationEnergy. 
 
G4double getFermiMomentumConstantLight(const G4int A, const G4int Z)
Return the constant value of the Fermi momentum - special for light. 
 
std::string getName(const ParticleType t)
Get the native INCL name of the particle. 
 
G4double getNeutronHalo()
Get the size of the neutron halo. 
 
G4ThreadLocal FermiMomentumFn getFermiMomentum
 
FermiMomentumType getFermiMomentumType() const
Get the Fermi-momentum type.