Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Typedefs | Functions | Variables
G4INCL::ParticleTable Namespace Reference

Typedefs

typedef G4double(* NuclearMassFn )(const G4int, const G4int)
 
typedef G4double(* ParticleMassFn )(const ParticleType)
 
typedef G4double(* SeparationEnergyFn )(const ParticleType, const G4int, const G4int)
 
typedef G4double(* FermiMomentumFn )(const G4int, const G4int)
 

Functions

void initialize (Config const *const theConfig=0)
 Initialize the particle table. More...
 
G4int getIsospin (const ParticleType t)
 Get the isospin of a particle. More...
 
std::string getName (const ParticleType t)
 Get the native INCL name of the particle. More...
 
std::string getShortName (const ParticleType t)
 Get the short INCL name of the particle. More...
 
std::string getName (const ParticleSpecies &s)
 Get the native INCL name of the particle. More...
 
std::string getShortName (const ParticleSpecies &s)
 Get the short INCL name of the particle. More...
 
std::string getName (const G4int A, const G4int Z)
 Get the native INCL name of the ion. More...
 
std::string getShortName (const G4int A, const G4int Z)
 Get the short INCL name of the ion. More...
 
G4double getINCLMass (const G4int A, const G4int Z)
 Get INCL nuclear mass (in MeV/c^2) More...
 
G4double getINCLMass (const ParticleType t)
 Get INCL particle mass (in MeV/c^2) More...
 
G4double getRealMass (const G4INCL::ParticleType t)
 Get particle mass (in MeV/c^2) More...
 
G4double getRealMass (const G4int A, const G4int Z)
 Get nuclear mass (in MeV/c^2) More...
 
G4double getTableQValue (const G4int A1, const G4int Z1, const G4int A2, const G4int Z2)
 Get Q-value (in MeV/c^2) More...
 
G4double getTableQValue (const G4int A1, const G4int Z1, const G4int A2, const G4int Z2, const G4int A3, const G4int Z3)
 Get Q-value (in MeV/c^2) More...
 
G4double getTableSpeciesMass (const ParticleSpecies &p)
 
G4int getMassNumber (const ParticleType t)
 Get mass number from particle type. More...
 
G4int getChargeNumber (const ParticleType t)
 Get charge number from particle type. More...
 
G4double getNuclearRadius (const ParticleType t, const G4int A, const G4int Z)
 
G4double getLargestNuclearRadius (const G4int A, const G4int Z)
 
G4double getRadiusParameter (const ParticleType t, const G4int A, const G4int Z)
 
G4double getMaximumNuclearRadius (const ParticleType t, const G4int A, const G4int Z)
 
G4double getSurfaceDiffuseness (const ParticleType t, const G4int A, const G4int Z)
 
G4double getMomentumRMS (const G4int A, const G4int Z)
 Return the RMS of the momentum distribution (light clusters) More...
 
G4double getSeparationEnergyINCL (const ParticleType t, const G4int, const G4int)
 Return INCL's default separation energy. More...
 
G4double getSeparationEnergyReal (const ParticleType t, const G4int A, const G4int Z)
 Return the real separation energy. More...
 
G4double getSeparationEnergyRealForLight (const ParticleType t, const G4int A, const G4int Z)
 Return the real separation energy only for light nuclei. More...
 
G4double getProtonSeparationEnergy ()
 Getter for protonSeparationEnergy. More...
 
G4double getNeutronSeparationEnergy ()
 Getter for neutronSeparationEnergy. More...
 
void setProtonSeparationEnergy (const G4double s)
 Setter for protonSeparationEnergy. More...
 
void setNeutronSeparationEnergy (const G4double s)
 Setter for protonSeparationEnergy. More...
 
std::string getElementName (const G4int Z)
 Get the name of the element from the atomic number. More...
 
std::string getIUPACElementName (const G4int Z)
 Get the name of an unnamed element from the IUPAC convention. More...
 
G4int parseElement (std::string pS)
 Get the name of the element from the atomic number. More...
 
G4int parseIUPACElement (std::string const &pS)
 Parse a IUPAC element name. More...
 
IsotopicDistribution const & getNaturalIsotopicDistribution (const G4int Z)
 
G4int drawRandomNaturalIsotope (const G4int Z)
 
G4double getFermiMomentumConstant (const G4int, const G4int)
 Return the constant value of the Fermi momentum. More...
 
G4double getFermiMomentumConstantLight (const G4int A, const G4int Z)
 Return the constant value of the Fermi momentum - special for light. More...
 
G4double getFermiMomentumMassDependent (const G4int A, const G4int)
 Return the value Fermi momentum from a fit. More...
 
G4double getRPCorrelationCoefficient (const ParticleType t)
 Get the value of the r-p correlation coefficient. More...
 
G4double getNeutronSkinThickness ()
 Get the value of the neutron skin thickness. More...
 
G4double getNeutronSkinAdditionalDiffuseness ()
 Get the value of the additional neutron skin diffuseness. More...
 

Variables

const G4int maxClusterMass = 12
 
const G4int maxClusterCharge = 8
 
const G4int clusterTableZSize = maxClusterCharge+1
 
const G4int clusterTableASize = maxClusterMass+1
 
const G4double effectiveNucleonMass = 938.2796
 
const G4double effectiveNucleonMass2 = 8.8036860777616e5
 
const G4double effectiveDeltaMass = 1232.0
 
const G4double effectivePionMass = 138.0
 
G4ThreadLocal G4double effectiveDeltaDecayThreshold = 0.
 
G4ThreadLocal NuclearMassFn getTableMass = NULL
 Static pointer to the mass function for nuclei. More...
 
G4ThreadLocal ParticleMassFn getTableParticleMass = NULL
 Static pointer to the mass function for particles. More...
 
G4ThreadLocal SeparationEnergyFn getSeparationEnergy = NULL
 Static pointer to the separation-energy function. More...
 
G4ThreadLocal FermiMomentumFn getFermiMomentum = NULL
 

Typedef Documentation

typedef G4double(* G4INCL::ParticleTable::FermiMomentumFn)(const G4int, const G4int)

Definition at line 213 of file G4INCLParticleTable.hh.

typedef G4double(* G4INCL::ParticleTable::NuclearMassFn)(const G4int, const G4int)

Definition at line 200 of file G4INCLParticleTable.hh.

typedef G4double(* G4INCL::ParticleTable::ParticleMassFn)(const ParticleType)

Definition at line 201 of file G4INCLParticleTable.hh.

typedef G4double(* G4INCL::ParticleTable::SeparationEnergyFn)(const ParticleType, const G4int, const G4int)

Definition at line 208 of file G4INCLParticleTable.hh.

Function Documentation

G4int G4INCL::ParticleTable::drawRandomNaturalIsotope ( const G4int  Z)

Definition at line 776 of file G4INCLParticleTable.cc.

Referenced by G4INCL::INCL::prepareReaction().

776  {
777  return getNaturalIsotopicDistributions()->drawRandomIsotope(Z);
778  }
G4int G4INCL::ParticleTable::getChargeNumber ( const ParticleType  t)

Get charge number from particle type.

Definition at line 561 of file G4INCLParticleTable.cc.

References G4INCL::DeltaMinus, G4INCL::DeltaPlus, G4INCL::DeltaPlusPlus, G4INCL::DeltaZero, G4INCL::Neutron, G4INCL::PiMinus, G4INCL::PiPlus, G4INCL::PiZero, and G4INCL::Proton.

561  {
562  switch(t) {
563  case DeltaPlusPlus:
564  return 2;
565  break;
566  case Proton:
567  case DeltaPlus:
568  case PiPlus:
569  return 1;
570  break;
571  case Neutron:
572  case DeltaZero:
573  case PiZero:
574  return 0;
575  break;
576  case DeltaMinus:
577  case PiMinus:
578  return -1;
579  break;
580  default:
581  return 0;
582  break;
583  }
584  }
std::string G4INCL::ParticleTable::getElementName ( const G4int  Z)

Get the name of the element from the atomic number.

Definition at line 727 of file G4INCLParticleTable.cc.

References getIUPACElementName(), and INCL_WARN.

Referenced by getName(), and getShortName().

727  {
728  if(Z<1) {
729  INCL_WARN("getElementName called with Z<1" << std::endl);
730  return elementTable[0];
731  } else if(Z<elementTableSize)
732  return elementTable[Z];
733  else
734  return getIUPACElementName(Z);
735  }
#define INCL_WARN(x)
std::string getIUPACElementName(const G4int Z)
Get the name of an unnamed element from the IUPAC convention.
G4double G4INCL::ParticleTable::getFermiMomentumConstant ( const G4int  ,
const G4int   
)

Return the constant value of the Fermi momentum.

This function should always return PhysicalConstants::Pf.

Definition at line 780 of file G4INCLParticleTable.cc.

References G4INCL::PhysicalConstants::Pf.

Referenced by getFermiMomentumConstantLight(), and initialize().

780  {
781  return PhysicalConstants::Pf;
782  }
const G4double Pf
Fermi momentum [MeV/c].
G4double G4INCL::ParticleTable::getFermiMomentumConstantLight ( const G4int  A,
const G4int  Z 
)

Return the constant value of the Fermi momentum - special for light.

This function should always return PhysicalConstants::Pf for heavy nuclei, and values from the momentumRMS table for light nuclei.

Parameters
Amass number
Zcharge number

Definition at line 784 of file G4INCLParticleTable.cc.

References clusterTableASize, clusterTableZSize, getFermiMomentumConstant(), and G4INCL::Math::sqrtFiveThirds.

Referenced by initialize().

784  {
785 // assert(Z>0 && A>0 && Z<=A);
787  const G4double rms = momentumRMS[Z][A];
788  return ((rms>0.) ? rms : momentumRMS[6][12]) * Math::sqrtFiveThirds;
789  } else
790  return getFermiMomentumConstant(A,Z);
791  }
G4double getFermiMomentumConstant(const G4int, const G4int)
Return the constant value of the Fermi momentum.
const G4double sqrtFiveThirds
double G4double
Definition: G4Types.hh:76
G4double G4INCL::ParticleTable::getFermiMomentumMassDependent ( const G4int  A,
const G4int   
)

Return the value Fermi momentum from a fit.

This function returns a fitted Fermi momentum, based on data from Moniz et al., Phys. Rev. Lett. 26 (1971) 445. The fitted functional form is

\[ p_F(A)=\alpha-\beta\cdot e^{(-A\cdot\gamma)} \]

with $\alpha=259.416$ MeV/ $c$, $\beta=152.824$ MeV/ $c$ and $\gamma=9.5157\cdot10^{-2}$.

Parameters
Amass number

Definition at line 793 of file G4INCLParticleTable.cc.

Referenced by initialize().

793  {
794 // assert(A>0);
795  static const G4double alphaParam = 259.416; // MeV/c
796  static const G4double betaParam = 152.824; // MeV/c
797  static const G4double gammaParam = 9.5157E-2;
798  return alphaParam - betaParam*std::exp(-gammaParam*((G4double)A));
799  }
double G4double
Definition: G4Types.hh:76
G4double G4INCL::ParticleTable::getINCLMass ( const G4int  A,
const G4int  Z 
)

Get INCL nuclear mass (in MeV/c^2)

Definition at line 508 of file G4INCLParticleTable.cc.

References G4INCL::Neutron, G4INCL::PiMinus, G4INCL::PiPlus, and G4INCL::Proton.

Referenced by G4INCL::Particle::getEmissionQValueCorrection(), G4INCL::DeltaDecayChannel::getFinalState(), G4INCL::Particle::getINCLMass(), G4INCL::Particle::getTransferQValueCorrection(), and initialize().

508  {
509 // assert(A>=0);
510  // For nuclei with Z<0 or Z>A, assume that the exotic charge state is due to pions
511  if(Z<0)
512  return A*neutronMass - Z*getINCLMass(PiMinus);
513  else if(Z>A)
514  return A*protonMass + (A-Z)*getINCLMass(PiPlus);
515  else if(A>1)
516  return Z*(protonMass - protonSeparationEnergy) + (A-Z)*(neutronMass - neutronSeparationEnergy);
517  else if(A==1 && Z==0)
518  return getINCLMass(Neutron);
519  else if(A==1 && Z==1)
520  return getINCLMass(Proton);
521  else
522  return 0.;
523  }
G4double getINCLMass(const G4int A, const G4int Z)
Get INCL nuclear mass (in MeV/c^2)
G4double G4INCL::ParticleTable::getINCLMass ( const ParticleType  t)

Get INCL particle mass (in MeV/c^2)

Definition at line 448 of file G4INCLParticleTable.cc.

References INCL_ERROR, G4INCL::Neutron, G4INCL::PiMinus, G4INCL::PiPlus, G4INCL::PiZero, and G4INCL::Proton.

448  {
449  if(pt == Proton) {
450  return protonMass;
451  } else if(pt == Neutron) {
452  return neutronMass;
453  } else if(pt == PiPlus) {
454  return piPlusMass;
455  } else if(pt == PiMinus) {
456  return piMinusMass;
457  } else if(pt == PiZero) {
458  return piZeroMass;
459  } else {
460  INCL_ERROR("getMass : Unknown particle type." << std::endl);
461  return 0.0;
462  }
463  }
#define INCL_ERROR(x)
G4int G4INCL::ParticleTable::getIsospin ( const ParticleType  t)

Get the isospin of a particle.

Definition at line 344 of file G4INCLParticleTable.cc.

References G4INCL::DeltaMinus, G4INCL::DeltaPlus, G4INCL::DeltaPlusPlus, G4INCL::DeltaZero, INCL_ERROR, G4INCL::Neutron, G4INCL::PiMinus, G4INCL::PiPlus, G4INCL::PiZero, and G4INCL::Proton.

Referenced by G4INCL::CrossSectionsINCL46::deltaProduction(), G4INCL::CrossSectionsINCL46::elasticNNLegacy(), G4INCL::DeltaProductionChannel::getFinalState(), G4INCL::ElasticChannel::getFinalState(), G4INCL::Nucleus::insertParticle(), G4INCL::CrossSectionsINCL46::pionNucleon(), and G4INCL::CrossSectionsINCL46::recombination().

344  {
345  // Actually this is the 3rd component of isospin (I_z) multiplied by 2!
346  if(t == Proton) {
347  return 1;
348  } else if(t == Neutron) {
349  return -1;
350  } else if(t == PiPlus) {
351  return 2;
352  } else if(t == PiMinus) {
353  return -2;
354  } else if(t == PiZero) {
355  return 0;
356  } else if(t == DeltaPlusPlus) {
357  return 3;
358  } else if(t == DeltaPlus) {
359  return 1;
360  } else if(t == DeltaZero) {
361  return -1;
362  } else if(t == DeltaMinus) {
363  return -3;
364  }
365 
366  INCL_ERROR("Requested isospin of an unknown particle!");
367  return -10; // Unknown
368  }
#define INCL_ERROR(x)
std::string G4INCL::ParticleTable::getIUPACElementName ( const G4int  Z)

Get the name of an unnamed element from the IUPAC convention.

Definition at line 737 of file G4INCLParticleTable.cc.

Referenced by getElementName().

737  {
738  std::stringstream elementStream;
739  elementStream << Z;
740  std::string elementName = elementStream.str();
741  std::transform(elementName.begin(), elementName.end(), elementName.begin(), intToIUPAC);
742  elementName[0] = std::toupper(elementName.at(0));
743  return elementName;
744  }
G4double G4INCL::ParticleTable::getLargestNuclearRadius ( const G4int  A,
const G4int  Z 
)

Definition at line 614 of file G4INCLParticleTable.cc.

References getNuclearRadius(), G4INCL::Math::max(), G4INCL::Neutron, and G4INCL::Proton.

Referenced by G4INCL::CoulombNone::maxImpactParameter(), G4INCL::CoulombNonRelativistic::maxImpactParameter(), and G4INCL::StandardPropagationModel::shootComposite().

614  {
616  }
G4double getNuclearRadius(const ParticleType t, const G4int A, const G4int Z)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4int G4INCL::ParticleTable::getMassNumber ( const ParticleType  t)

Get mass number from particle type.

Definition at line 540 of file G4INCLParticleTable.cc.

References G4INCL::DeltaMinus, G4INCL::DeltaPlus, G4INCL::DeltaPlusPlus, G4INCL::DeltaZero, G4INCL::Neutron, G4INCL::PiMinus, G4INCL::PiPlus, G4INCL::PiZero, and G4INCL::Proton.

540  {
541  switch(t) {
542  case Proton:
543  case Neutron:
544  case DeltaPlusPlus:
545  case DeltaPlus:
546  case DeltaZero:
547  case DeltaMinus:
548  return 1;
549  break;
550  case PiPlus:
551  case PiMinus:
552  case PiZero:
553  return 0;
554  break;
555  default:
556  return 0;
557  break;
558  }
559  }
G4double G4INCL::ParticleTable::getMaximumNuclearRadius ( const ParticleType  t,
const G4int  A,
const G4int  Z 
)

Definition at line 650 of file G4INCLParticleTable.cc.

References getNuclearRadius(), getSurfaceDiffuseness(), and INCL_ERROR.

Referenced by G4INCL::NuclearDensityFactory::createRCDFTable(), and G4INCL::NuclearDensityFactory::createRPCorrelationTable().

650  {
651  const G4double XFOISA = 8.0;
652  if(A >= 19) {
653  return getNuclearRadius(t,A,Z) + XFOISA * getSurfaceDiffuseness(t,A,Z);
654  } else if(A < 19 && A >= 6) {
655  return 5.5 + 0.3 * (G4double(A) - 6.0)/12.0;
656  } else if(A >= 2) {
657  return getNuclearRadius(t, A, Z) + 4.5;
658  } else {
659  INCL_ERROR("getMaximumNuclearRadius : No maximum radius for nucleus A = " << A << " Z = " << Z << std::endl);
660  return 0.0;
661  }
662  }
#define INCL_ERROR(x)
G4double getNuclearRadius(const ParticleType t, const G4int A, const G4int Z)
G4double getSurfaceDiffuseness(const ParticleType t, const G4int A, const G4int Z)
double G4double
Definition: G4Types.hh:76
G4double G4INCL::ParticleTable::getMomentumRMS ( const G4int  A,
const G4int  Z 
)

Return the RMS of the momentum distribution (light clusters)

Definition at line 683 of file G4INCLParticleTable.cc.

References getFermiMomentum, and G4INCL::Math::sqrtThreeFifths.

Referenced by G4INCL::NuclearDensityFactory::createPCDFTable().

683  {
684 // assert(Z>=0 && A>=0 && Z<=A);
686  }
const G4double sqrtThreeFifths
G4ThreadLocal FermiMomentumFn getFermiMomentum
std::string G4INCL::ParticleTable::getName ( const ParticleType  t)

Get the native INCL name of the particle.

Definition at line 398 of file G4INCLParticleTable.cc.

References G4INCL::Composite, G4INCL::DeltaMinus, G4INCL::DeltaPlus, G4INCL::DeltaPlusPlus, G4INCL::DeltaZero, G4INCL::Neutron, G4INCL::PiMinus, G4INCL::PiPlus, G4INCL::PiZero, and G4INCL::Proton.

Referenced by G4INCL::Particle::dump(), getName(), G4INCL::Cluster::print(), G4INCL::Particle::print(), and G4INCL::Config::summary().

398  {
399  if(p == G4INCL::Proton) {
400  return std::string("proton");
401  } else if(p == G4INCL::Neutron) {
402  return std::string("neutron");
403  } else if(p == G4INCL::DeltaPlusPlus) {
404  return std::string("delta++");
405  } else if(p == G4INCL::DeltaPlus) {
406  return std::string("delta+");
407  } else if(p == G4INCL::DeltaZero) {
408  return std::string("delta0");
409  } else if(p == G4INCL::DeltaMinus) {
410  return std::string("delta-");
411  } else if(p == G4INCL::PiPlus) {
412  return std::string("pi+");
413  } else if(p == G4INCL::PiZero) {
414  return std::string("pi0");
415  } else if(p == G4INCL::PiMinus) {
416  return std::string("pi-");
417  } else if(p == G4INCL::Composite) {
418  return std::string("composite");
419  }
420  return std::string("unknown");
421  }
const char * p
Definition: xmltok.h:285
std::string G4INCL::ParticleTable::getName ( const ParticleSpecies &  s)

Get the native INCL name of the particle.

Definition at line 377 of file G4INCLParticleTable.cc.

References G4INCL::Composite, getName(), G4INCL::ParticleSpecies::theA, G4INCL::ParticleSpecies::theType, and G4INCL::ParticleSpecies::theZ.

377  {
378  if(s.theType==Composite)
379  return getName(s.theA,s.theZ);
380  else
381  return getName(s.theType);
382  }
const XML_Char * s
std::string getName(const ParticleType t)
Get the native INCL name of the particle.
std::string G4INCL::ParticleTable::getName ( const G4int  A,
const G4int  Z 
)

Get the native INCL name of the ion.

Definition at line 384 of file G4INCLParticleTable.cc.

References getElementName().

384  {
385  std::stringstream stream;
386  stream << getElementName(Z) << "-" << A;
387  return stream.str();
388  }
std::string getElementName(const G4int Z)
Get the name of the element from the atomic number.
IsotopicDistribution const & G4INCL::ParticleTable::getNaturalIsotopicDistribution ( const G4int  Z)

Definition at line 772 of file G4INCLParticleTable.cc.

772  {
773  return getNaturalIsotopicDistributions()->getIsotopicDistribution(Z);
774  }
G4double G4INCL::ParticleTable::getNeutronSeparationEnergy ( )

Getter for neutronSeparationEnergy.

Definition at line 721 of file G4INCLParticleTable.cc.

721 { return neutronSeparationEnergy; }
G4double G4INCL::ParticleTable::getNeutronSkinAdditionalDiffuseness ( )

Get the value of the additional neutron skin diffuseness.

Definition at line 808 of file G4INCLParticleTable.cc.

808 { return neutronSkinAdditionalDiffuseness; }
G4double G4INCL::ParticleTable::getNeutronSkinThickness ( )

Get the value of the neutron skin thickness.

Definition at line 806 of file G4INCLParticleTable.cc.

806 { return neutronSkinThickness; }
G4double G4INCL::ParticleTable::getNuclearRadius ( const ParticleType  t,
const G4int  A,
const G4int  Z 
)

Definition at line 586 of file G4INCLParticleTable.cc.

References getRadiusParameter(), getSurfaceDiffuseness(), INCL_DEBUG, and INCL_ERROR.

Referenced by G4INCL::PauliStandard::getBlockingProbability(), getLargestNuclearRadius(), getMaximumNuclearRadius(), and G4INCL::NuclearDensity::getTransmissionRadius().

586  {
587 // assert(A>=0);
588  if(A >= 19 || (A < 6 && A >= 2)) {
589  // For large (Woods-Saxon or Modified Harmonic Oscillator) or small
590  // (Gaussian) nuclei, the radius parameter is just the nuclear radius
591  return getRadiusParameter(t,A,Z);
592  } else if(A < clusterTableASize && Z>=0 && Z < clusterTableZSize && A >= 6) {
593  const G4double thisRMS = positionRMS[Z][A];
594  if(thisRMS>0.0)
595  return thisRMS;
596  else {
597  INCL_DEBUG("getNuclearRadius: Radius for nucleus A = " << A << " Z = " << Z << " is not available" << std::endl
598  << "returning radius for C12");
599  return positionRMS[6][12];
600  }
601  } else if(A < 19) {
602  const G4double theRadiusParameter = getRadiusParameter(t, A, Z);
603  const G4double theDiffusenessParameter = getSurfaceDiffuseness(t, A, Z);
604  // The formula yields the nuclear RMS radius based on the parameters of
605  // the nuclear-density function
606  return 1.581*theDiffusenessParameter*
607  (2.+5.*theRadiusParameter)/(2.+3.*theRadiusParameter);
608  } else {
609  INCL_ERROR("getNuclearRadius: No radius for nucleus A = " << A << " Z = " << Z << std::endl);
610  return 0.0;
611  }
612  }
#define INCL_ERROR(x)
G4double getSurfaceDiffuseness(const ParticleType t, const G4int A, const G4int Z)
G4double getRadiusParameter(const ParticleType t, const G4int A, const G4int Z)
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
G4double G4INCL::ParticleTable::getProtonSeparationEnergy ( )

Getter for protonSeparationEnergy.

Definition at line 719 of file G4INCLParticleTable.cc.

719 { return protonSeparationEnergy; }
G4double G4INCL::ParticleTable::getRadiusParameter ( const ParticleType  t,
const G4int  A,
const G4int  Z 
)

Definition at line 618 of file G4INCLParticleTable.cc.

References INCL_DEBUG, INCL_ERROR, and G4INCL::Neutron.

Referenced by G4INCL::NuclearDensityFactory::createRCDFTable(), G4INCL::NuclearDensityFactory::createRPCorrelationTable(), and getNuclearRadius().

618  {
619 // assert(A>0);
620  if(A >= 28) {
621  // phenomenological radius fit
622  G4double r0 = (2.745e-4 * A + 1.063) * std::pow(A, 1.0/3.0);
623  if(t==Neutron)
624  r0 += neutronSkinThickness;
625  return r0;
626  } else if(A < 6 && A >= 2) {
627  if(Z<clusterTableZSize && Z>=0) {
628  const G4double thisRMS = positionRMS[Z][A];
629  if(thisRMS>0.0)
630  return thisRMS;
631  else {
632  INCL_DEBUG("getRadiusParameter: Radius for nucleus A = " << A << " Z = " << Z << " is not available" << std::endl
633  << "returning radius for C12");
634  return positionRMS[6][12];
635  }
636  } else {
637  INCL_DEBUG("getRadiusParameter: Radius for nucleus A = " << A << " Z = " << Z << " is not available" << std::endl
638  << "returning radius for C12");
639  return positionRMS[6][12];
640  }
641  } else if(A < 28 && A >= 6) {
642  return mediumRadius[A-1];
643  // return 1.581*mediumDiffuseness[A-1]*(2.+5.*mediumRadius[A-1])/(2.+3.*mediumRadius[A-1]);
644  } else {
645  INCL_ERROR("getRadiusParameter: No radius for nucleus A = " << A << " Z = " << Z << std::endl);
646  return 0.0;
647  }
648  }
#define INCL_ERROR(x)
double G4double
Definition: G4Types.hh:76
#define INCL_DEBUG(x)
G4double G4INCL::ParticleTable::getRealMass ( const G4INCL::ParticleType  t)

Get particle mass (in MeV/c^2)

Definition at line 465 of file G4INCLParticleTable.cc.

References INCL_ERROR, G4INCL::Neutron, G4INCL::PiMinus, G4INCL::PiPlus, G4INCL::PiZero, and G4INCL::Proton.

Referenced by getRealMass(), G4INCL::Particle::getRealMass(), and initialize().

465  {
466  switch(t) {
467  case Proton:
468  return theRealProtonMass;
469  break;
470  case Neutron:
471  return theRealNeutronMass;
472  break;
473  case PiPlus:
474  case PiMinus:
475  return theRealChargedPiMass;
476  break;
477  case PiZero:
478  return theRealPiZeroMass;
479  break;
480  default:
481  INCL_ERROR("Particle::getRealMass : Unknown particle type." << std::endl);
482  return 0.0;
483  break;
484  }
485  }
#define INCL_ERROR(x)
G4double G4INCL::ParticleTable::getRealMass ( const G4int  A,
const G4int  Z 
)

Get nuclear mass (in MeV/c^2)

Definition at line 487 of file G4INCLParticleTable.cc.

References getRealMass(), python.hepunit::MeV, G4INCL::Neutron, G4INCL::PiMinus, G4INCL::PiPlus, and G4INCL::Proton.

487  {
488 // assert(A>=0);
489  // For nuclei with Z<0 or Z>A, assume that the exotic charge state is due to pions
490  if(Z<0)
491  return A*neutronMass - Z*getRealMass(PiMinus);
492  else if(Z>A)
493  return A*protonMass + (A-Z)*getRealMass(PiPlus);
494  else if(Z==0)
495  return A*getRealMass(Neutron);
496  else if(A==Z)
497  return A*getRealMass(Proton);
498  else if(A>1) {
499 #ifndef INCLXX_IN_GEANT4_MODE
500  return ::G4INCL::NuclearMassTable::getMass(A,Z);
501 #else
502  return theG4IonTable->GetNucleusMass(Z,A) / MeV;
503 #endif
504  } else
505  return 0.;
506  }
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2)
G4double G4INCL::ParticleTable::getRPCorrelationCoefficient ( const ParticleType  t)

Get the value of the r-p correlation coefficient.

Parameters
tthe type of the particle (Proton or Neutron)
Returns
the value of the r-p correlation coefficient

Definition at line 801 of file G4INCLParticleTable.cc.

Referenced by G4INCL::ParticleSampler::ParticleSampler().

801  {
802 // assert(t==Proton || t==Neutron);
803  return rpCorrelationCoefficient[t];
804  }
G4double G4INCL::ParticleTable::getSeparationEnergyINCL ( const ParticleType  t,
const G4int  ,
const G4int   
)

Return INCL's default separation energy.

Definition at line 688 of file G4INCLParticleTable.cc.

References INCL_ERROR, G4INCL::Neutron, and G4INCL::Proton.

Referenced by getSeparationEnergyRealForLight(), and initialize().

688  {
689  if(t==Proton)
690  return theINCLProtonSeparationEnergy;
691  else if(t==Neutron)
692  return theINCLNeutronSeparationEnergy;
693  else {
694  INCL_ERROR("ParticleTable::getSeparationEnergyINCL : Unknown particle type." << std::endl);
695  return 0.0;
696  }
697  }
#define INCL_ERROR(x)
G4double G4INCL::ParticleTable::getSeparationEnergyReal ( const ParticleType  t,
const G4int  A,
const G4int  Z 
)

Return the real separation energy.

Definition at line 699 of file G4INCLParticleTable.cc.

References getTableMass, getTableParticleMass, INCL_ERROR, G4INCL::Neutron, and G4INCL::Proton.

Referenced by getSeparationEnergyRealForLight(), and initialize().

699  {
700  // Real separation energies for all nuclei
701  if(t==Proton)
702  return (*getTableParticleMass)(Proton) + (*getTableMass)(A-1,Z-1) - (*getTableMass)(A,Z);
703  else if(t==Neutron)
704  return (*getTableParticleMass)(Neutron) + (*getTableMass)(A-1,Z) - (*getTableMass)(A,Z);
705  else {
706  INCL_ERROR("ParticleTable::getSeparationEnergyReal : Unknown particle type." << std::endl);
707  return 0.0;
708  }
709  }
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.
#define INCL_ERROR(x)
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4double G4INCL::ParticleTable::getSeparationEnergyRealForLight ( const ParticleType  t,
const G4int  A,
const G4int  Z 
)

Return the real separation energy only for light nuclei.

Definition at line 711 of file G4INCLParticleTable.cc.

References clusterTableASize, clusterTableZSize, getSeparationEnergyINCL(), and getSeparationEnergyReal().

Referenced by initialize().

711  {
712  // Real separation energies for light nuclei, fixed values for heavy nuclei
714  return getSeparationEnergyReal(t, A, Z);
715  else
716  return getSeparationEnergyINCL(t, A, Z);
717  }
G4double getSeparationEnergyReal(const ParticleType t, const G4int A, const G4int Z)
Return the real separation energy.
G4double getSeparationEnergyINCL(const ParticleType t, const G4int, const G4int)
Return INCL's default separation energy.
std::string G4INCL::ParticleTable::getShortName ( const ParticleType  t)

Get the short INCL name of the particle.

Definition at line 423 of file G4INCLParticleTable.cc.

References G4INCL::Composite, G4INCL::DeltaMinus, G4INCL::DeltaPlus, G4INCL::DeltaPlusPlus, G4INCL::DeltaZero, G4INCL::Neutron, G4INCL::PiMinus, G4INCL::PiPlus, G4INCL::PiZero, and G4INCL::Proton.

Referenced by getShortName().

423  {
424  if(p == G4INCL::Proton) {
425  return std::string("p");
426  } else if(p == G4INCL::Neutron) {
427  return std::string("n");
428  } else if(p == G4INCL::DeltaPlusPlus) {
429  return std::string("d++");
430  } else if(p == G4INCL::DeltaPlus) {
431  return std::string("d+");
432  } else if(p == G4INCL::DeltaZero) {
433  return std::string("d0");
434  } else if(p == G4INCL::DeltaMinus) {
435  return std::string("d-");
436  } else if(p == G4INCL::PiPlus) {
437  return std::string("pi+");
438  } else if(p == G4INCL::PiZero) {
439  return std::string("pi0");
440  } else if(p == G4INCL::PiMinus) {
441  return std::string("pi-");
442  } else if(p == G4INCL::Composite) {
443  return std::string("comp");
444  }
445  return std::string("unknown");
446  }
const char * p
Definition: xmltok.h:285
std::string G4INCL::ParticleTable::getShortName ( const ParticleSpecies &  s)

Get the short INCL name of the particle.

Definition at line 370 of file G4INCLParticleTable.cc.

References G4INCL::Composite, getShortName(), G4INCL::ParticleSpecies::theA, G4INCL::ParticleSpecies::theType, and G4INCL::ParticleSpecies::theZ.

370  {
371  if(s.theType==Composite)
372  return getShortName(s.theA,s.theZ);
373  else
374  return getShortName(s.theType);
375  }
const XML_Char * s
std::string getShortName(const ParticleType t)
Get the short INCL name of the particle.
std::string G4INCL::ParticleTable::getShortName ( const G4int  A,
const G4int  Z 
)

Get the short INCL name of the ion.

Definition at line 390 of file G4INCLParticleTable.cc.

References getElementName().

390  {
391  std::stringstream stream;
392  stream << getElementName(Z);
393  if(A>0)
394  stream << A;
395  return stream.str();
396  }
std::string getElementName(const G4int Z)
Get the name of the element from the atomic number.
G4double G4INCL::ParticleTable::getSurfaceDiffuseness ( const ParticleType  t,
const G4int  A,
const G4int  Z 
)

Definition at line 664 of file G4INCLParticleTable.cc.

References test::a, INCL_ERROR, and G4INCL::Neutron.

Referenced by G4INCL::NuclearDensityFactory::createRCDFTable(), G4INCL::NuclearDensityFactory::createRPCorrelationTable(), getMaximumNuclearRadius(), and getNuclearRadius().

664  {
665  if(A >= 28) {
666  G4double a = 1.63e-4 * A + 0.510;
667  if(t==Neutron)
668  a += neutronSkinAdditionalDiffuseness;
669  return a;
670  } else if(A < 28 && A >= 19) {
671  return mediumDiffuseness[A-1];
672  } else if(A < 19 && A >= 6) {
673  return mediumDiffuseness[A-1];
674  } else if(A < 6 && A >= 2) {
675  INCL_ERROR("getSurfaceDiffuseness: was called for A = " << A << " Z = " << Z << std::endl);
676  return 0.0;
677  } else {
678  INCL_ERROR("getSurfaceDiffuseness: No diffuseness for nucleus A = " << A << " Z = " << Z << std::endl);
679  return 0.0;
680  }
681  }
#define INCL_ERROR(x)
double G4double
Definition: G4Types.hh:76
G4double G4INCL::ParticleTable::getTableQValue ( const G4int  A1,
const G4int  Z1,
const G4int  A2,
const G4int  Z2 
)

Get Q-value (in MeV/c^2)

Uses the getTableMass function to compute the Q-value for the following reaction:

\[ (A_1,Z_1) + (A_2, Z_2) --> (A_1+A_2,Z_1+Z_2) \]

Definition at line 525 of file G4INCLParticleTable.cc.

References getTableMass.

Referenced by G4INCL::Particle::getEmissionQValueCorrection(), and G4INCL::Particle::getTransferQValueCorrection().

525  {
526  return getTableMass(A1,Z1) + getTableMass(A2,Z2) - getTableMass(A1+A2,Z1+Z2);
527  }
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4double G4INCL::ParticleTable::getTableQValue ( const G4int  A1,
const G4int  Z1,
const G4int  A2,
const G4int  Z2,
const G4int  A3,
const G4int  Z3 
)

Get Q-value (in MeV/c^2)

Uses the getTableMass function to compute the Q-value for the following reaction:

\[ (A_1,Z_1) + (A_2, Z_2) --> (A_3,Z_3) + (A1+A2-A3,Z1+Z2-Z3) \]

Definition at line 529 of file G4INCLParticleTable.cc.

References getTableMass.

529  {
530  return getTableMass(A1,Z1) + getTableMass(A2,Z2) - getTableMass(A3,Z3) - getTableMass(A1+A2-A3,Z1+Z2-Z3);
531  }
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4double G4INCL::ParticleTable::getTableSpeciesMass ( const ParticleSpecies &  p)

Definition at line 533 of file G4INCLParticleTable.cc.

References G4INCL::Composite, getTableMass, getTableParticleMass, G4INCL::ParticleSpecies::theA, G4INCL::ParticleSpecies::theType, and G4INCL::ParticleSpecies::theZ.

533  {
534  if(p.theType == Composite)
535  return (*getTableMass)(p.theA, p.theZ);
536  else
537  return (*getTableParticleMass)(p.theType);
538  }
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.
const char * p
Definition: xmltok.h:285
G4ThreadLocal NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
void G4INCL::ParticleTable::initialize ( Config const *const  theConfig = 0)

Initialize the particle table.

Definition at line 270 of file G4INCLParticleTable.cc.

References G4INCL::ConstantFermiMomentum, G4INCL::ConstantLightFermiMomentum, effectiveDeltaDecayThreshold, G4ParticleTable::FindParticle(), getFermiMomentum, getFermiMomentumConstant(), getFermiMomentumConstantLight(), getFermiMomentumMassDependent(), G4INCL::Config::getFermiMomentumType(), getINCLMass(), G4INCL::Config::getINCLXXDataFilePath(), G4ParticleTable::GetIonTable(), G4INCL::Config::getNeutronSkinAdditionalDiffuseness(), G4INCL::Config::getNeutronSkinThickness(), G4ParticleTable::GetParticleTable(), G4ParticleDefinition::GetPDGMass(), getRealMass(), G4INCL::Config::getRPCorrelationCoefficient(), getSeparationEnergy, getSeparationEnergyINCL(), getSeparationEnergyReal(), getSeparationEnergyRealForLight(), G4INCL::Config::getSeparationEnergyType(), getTableMass, getTableParticleMass, G4INCL::Config::getUseRealMasses(), INCL_FATAL, G4INCL::INCLSeparationEnergy, G4INCL::MassDependentFermiMomentum, python.hepunit::MeV, G4INCL::Neutron, G4INCL::Proton, G4INCL::RealForLightSeparationEnergy, G4INCL::RealSeparationEnergy, and G4INCL::UnknownParticle.

Referenced by G4INCL::INCL::INCL().

270  {
271  protonMass = theINCLNucleonMass;
272  neutronMass = theINCLNucleonMass;
273  piPlusMass = theINCLPionMass;
274  piMinusMass = theINCLPionMass;
275  piZeroMass = theINCLPionMass;
276 
277  if(theConfig && theConfig->getUseRealMasses()) {
280  } else {
283  }
284 
285 #ifndef INCLXX_IN_GEANT4_MODE
286  std::string dataFilePath;
287  if(theConfig)
288  dataFilePath = theConfig->getINCLXXDataFilePath();
290 #endif
291 
292 #ifdef INCLXX_IN_GEANT4_MODE
293  G4ParticleTable *theG4ParticleTable = G4ParticleTable::GetParticleTable();
294  theG4IonTable = theG4ParticleTable->GetIonTable();
295  theRealProtonMass = theG4ParticleTable->FindParticle("proton")->GetPDGMass() / MeV;
296  theRealNeutronMass = theG4ParticleTable->FindParticle("neutron")->GetPDGMass() / MeV;
297  theRealChargedPiMass = theG4ParticleTable->FindParticle("pi+")->GetPDGMass() / MeV;
298  theRealPiZeroMass = theG4ParticleTable->FindParticle("pi0")->GetPDGMass() / MeV;
299 #endif
300 
301  effectiveDeltaDecayThreshold = theRealNeutronMass + theRealChargedPiMass + 0.5;
302 
303  // Initialise the separation-energy function
304  if(!theConfig || theConfig->getSeparationEnergyType()==INCLSeparationEnergy)
306  else if(theConfig->getSeparationEnergyType()==RealSeparationEnergy)
308  else if(theConfig->getSeparationEnergyType()==RealForLightSeparationEnergy)
310  else {
311  INCL_FATAL("Unrecognized separation-energy type in ParticleTable initialization: " << theConfig->getSeparationEnergyType() << std::endl);
312  std::abort();
313  return;
314  }
315 
316  // Initialise the Fermi-momentum function
317  if(!theConfig || theConfig->getFermiMomentumType()==ConstantFermiMomentum)
319  else if(theConfig->getFermiMomentumType()==ConstantLightFermiMomentum)
321  else if(theConfig->getFermiMomentumType()==MassDependentFermiMomentum)
323  else {
324  INCL_FATAL("Unrecognized Fermi-momentum type in ParticleTable initialization: " << theConfig->getFermiMomentumType() << std::endl);
325  std::abort();
326  return;
327  }
328 
329  // Initialise the r-p correlation coefficients
330  std::fill(rpCorrelationCoefficient, rpCorrelationCoefficient + UnknownParticle, 1.);
331  if(theConfig) {
332  rpCorrelationCoefficient[Proton] = theConfig->getRPCorrelationCoefficient(Proton);
333  rpCorrelationCoefficient[Neutron] = theConfig->getRPCorrelationCoefficient(Neutron);
334  }
335 
336  // Initialise the neutron-skin parameters
337  if(theConfig) {
338  neutronSkinThickness = theConfig->getNeutronSkinThickness();
339  neutronSkinAdditionalDiffuseness = theConfig->getNeutronSkinAdditionalDiffuseness();
340  }
341 
342  }
#define INCL_FATAL(x)
G4double getSeparationEnergyReal(const ParticleType t, const G4int A, const G4int Z)
Return the real separation energy.
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4ThreadLocal ParticleMassFn getTableParticleMass
Static pointer to the mass function for particles.
G4double getFermiMomentumConstant(const G4int, const G4int)
Return the constant value of the Fermi momentum.
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2)
G4IonTable * GetIonTable() const
G4ThreadLocal SeparationEnergyFn getSeparationEnergy
Static pointer to the separation-energy function.
G4double GetPDGMass() const
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 NuclearMassFn getTableMass
Static pointer to the mass function for nuclei.
G4ThreadLocal G4double effectiveDeltaDecayThreshold
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.
void initialize(Config const *const theConfig=0)
Initialize the particle table.
G4double getFermiMomentumConstantLight(const G4int A, const G4int Z)
Return the constant value of the Fermi momentum - special for light.
G4ThreadLocal FermiMomentumFn getFermiMomentum
G4int G4INCL::ParticleTable::parseElement ( std::string  pS)

Get the name of the element from the atomic number.

Definition at line 746 of file G4INCLParticleTable.cc.

References parseIUPACElement().

746  {
747  // Normalize the element name
748  std::transform(pS.begin(), pS.end(), pS.begin(), ::tolower);
749  pS[0] = ::toupper(pS[0]);
750 
751  const std::string *iter = std::find(elementTable, elementTable+elementTableSize, pS);
752  if(iter != elementTable+elementTableSize)
753  return iter - elementTable;
754  else
756  }
G4int parseIUPACElement(std::string const &pS)
Parse a IUPAC element name.
G4int G4INCL::ParticleTable::parseIUPACElement ( std::string const &  pS)

Parse a IUPAC element name.

Note: this function is UGLY. Look at it at your own peril.

Parameters
pSa normalised string (lowercase)
Returns
the charge number of the nuclide, or zero on fail

Definition at line 758 of file G4INCLParticleTable.cc.

Referenced by parseElement().

758  {
759  // Normalise to lower case
760  std::string elementName(s);
761  std::transform(elementName.begin(), elementName.end(), elementName.begin(), ::tolower);
762  // Return 0 if the element name contains anything but IUPAC digits
763  if(elementName.find_first_not_of(elementIUPACDigits)!=std::string::npos)
764  return 0;
765  std::transform(elementName.begin(), elementName.end(), elementName.begin(), iupacToInt);
766  std::stringstream elementStream(elementName);
767  G4int Z;
768  elementStream >> Z;
769  return Z;
770  }
const XML_Char * s
int G4int
Definition: G4Types.hh:78
void G4INCL::ParticleTable::setNeutronSeparationEnergy ( const G4double  s)

Setter for protonSeparationEnergy.

Definition at line 725 of file G4INCLParticleTable.cc.

Referenced by G4INCL::Nucleus::Nucleus().

725 { neutronSeparationEnergy = s; }
const XML_Char * s
void G4INCL::ParticleTable::setProtonSeparationEnergy ( const G4double  s)

Setter for protonSeparationEnergy.

Definition at line 723 of file G4INCLParticleTable.cc.

Referenced by G4INCL::Nucleus::Nucleus().

723 { protonSeparationEnergy = s; }
const XML_Char * s

Variable Documentation

const G4int G4INCL::ParticleTable::clusterTableASize = maxClusterMass+1
const G4int G4INCL::ParticleTable::clusterTableZSize = maxClusterCharge+1
G4ThreadLocal G4double G4INCL::ParticleTable::effectiveDeltaDecayThreshold = 0.
const G4double G4INCL::ParticleTable::effectiveDeltaMass = 1232.0

Definition at line 68 of file G4INCLParticleTable.hh.

const G4double G4INCL::ParticleTable::effectiveNucleonMass = 938.2796
const G4double G4INCL::ParticleTable::effectiveNucleonMass2 = 8.8036860777616e5
const G4double G4INCL::ParticleTable::effectivePionMass = 138.0
G4ThreadLocal FermiMomentumFn G4INCL::ParticleTable::getFermiMomentum = NULL
G4ThreadLocal SeparationEnergyFn G4INCL::ParticleTable::getSeparationEnergy = NULL

Static pointer to the separation-energy function.

Definition at line 813 of file G4INCLParticleTable.cc.

Referenced by initialize().

G4ThreadLocal NuclearMassFn G4INCL::ParticleTable::getTableMass = NULL
G4ThreadLocal ParticleMassFn G4INCL::ParticleTable::getTableParticleMass = NULL
const G4int G4INCL::ParticleTable::maxClusterCharge = 8

Definition at line 61 of file G4INCLParticleTable.hh.

const G4int G4INCL::ParticleTable::maxClusterMass = 12