#include <G4INCLParticleSpecies.hh>
Public Member Functions | |
ParticleSpecies () | |
Convert a string to a particle species. | |
ParticleSpecies (std::string const &pS) | |
ParticleSpecies (ParticleType const t) | |
ParticleSpecies (const G4int A, const G4int Z) | |
Data Fields | |
ParticleType | theType |
G4int | theA |
G4int | theZ |
Definition at line 52 of file G4INCLParticleSpecies.hh.
G4INCL::ParticleSpecies::ParticleSpecies | ( | ) | [inline] |
Convert a string to a particle species.
Definition at line 55 of file G4INCLParticleSpecies.hh.
00055 : 00056 theType(UnknownParticle), 00057 theA(0), 00058 theZ(0) 00059 {} ParticleSpecies(std::string const &pS);
G4INCL::ParticleSpecies::ParticleSpecies | ( | std::string const & | pS | ) |
Definition at line 53 of file G4INCLParticleSpecies.cc.
References G4INCL::Composite, G4INCL::DeltaMinus, G4INCL::DeltaPlus, G4INCL::DeltaPlusPlus, G4INCL::DeltaZero, G4INCL::Neutron, G4INCL::PiMinus, G4INCL::PiPlus, G4INCL::PiZero, G4INCL::Proton, theA, theType, and theZ.
00053 { 00054 // Normalise the string to lower case 00055 std::string pSNorm = pS; 00056 std::transform(pSNorm.begin(), pSNorm.end(), pSNorm.begin(), ::tolower); 00057 if(pSNorm=="p" || pSNorm=="proton") { 00058 theA = 1; 00059 theZ = 1; 00060 theType = G4INCL::Proton; 00061 } else if(pSNorm=="n" || pSNorm=="neutron") { 00062 theA = 1; 00063 theZ = 0; 00064 theType = G4INCL::Neutron; 00065 } else if(pSNorm=="delta++" || pSNorm=="deltaplusplus") { 00066 theA = 1; 00067 theZ = 2; 00068 theType = G4INCL::DeltaPlusPlus; 00069 } else if(pSNorm=="delta+" || pSNorm=="deltaplus") { 00070 theA = 1; 00071 theZ = 1; 00072 theType = G4INCL::DeltaPlus; 00073 } else if(pSNorm=="delta0" || pSNorm=="deltazero") { 00074 theA = 1; 00075 theZ = 0; 00076 theType = G4INCL::DeltaZero; 00077 } else if(pSNorm=="delta-" || pSNorm=="deltaminus") { 00078 theA = 1; 00079 theZ = -1; 00080 theType = G4INCL::DeltaMinus; 00081 } else if(pSNorm=="pi+" || pSNorm=="pion+" || pSNorm=="piplus" || pSNorm=="pionplus") { 00082 theA = 0; 00083 theZ = 1; 00084 theType = G4INCL::PiPlus; 00085 } else if(pSNorm=="pi0" || pSNorm=="pion0" || pSNorm=="pizero" || pSNorm=="pionzero") { 00086 theA = 0; 00087 theZ = 0; 00088 theType = G4INCL::PiZero; 00089 } else if(pSNorm=="pi-" || pSNorm=="pion-" || pSNorm=="piminus" || pSNorm=="pionminus") { 00090 theA = 0; 00091 theZ = -1; 00092 theType = G4INCL::PiMinus; 00093 } else if(pSNorm=="d" || pSNorm=="deuteron") { 00094 theA = 2; 00095 theZ = 1; 00096 theType = G4INCL::Composite; 00097 } else if(pSNorm=="t" || pSNorm=="triton") { 00098 theA = 3; 00099 theZ = 1; 00100 theType = G4INCL::Composite; 00101 } else if(pSNorm=="a" || pSNorm=="alpha") { 00102 theA = 4; 00103 theZ = 2; 00104 theType = G4INCL::Composite; 00105 } else 00106 parseNuclide(pSNorm); 00107 }
G4INCL::ParticleSpecies::ParticleSpecies | ( | ParticleType const | t | ) |
Definition at line 109 of file G4INCLParticleSpecies.cc.
00109 : 00110 theType(t), 00111 theA(ParticleTable::getMassNumber(theType)), 00112 theZ(ParticleTable::getChargeNumber(theType)) 00113 {}
Definition at line 65 of file G4INCLParticleSpecies.hh.
Referenced by G4INCL::Config::echo(), G4INCL::KinematicsUtils::gammaFromKineticEnergy(), G4INCL::Nucleus::getCoulombRadius(), G4INCL::ParticleTable::getName(), G4INCL::ParticleTable::getShortName(), G4INCL::ParticleTable::getTableSpeciesMass(), G4INCL::Config::getTargetA(), G4INCL::INCL::INCL(), G4INCL::CoulombNonRelativistic::maxImpactParameter(), G4INCL::CoulombNone::maxImpactParameter(), ParticleSpecies(), G4INCL::INCL::prepareReaction(), G4INCL::Config::setTargetA(), and G4INCL::Config::summary().
Definition at line 64 of file G4INCLParticleSpecies.hh.
Referenced by G4INCL::KinematicsUtils::gammaFromKineticEnergy(), G4INCL::Nucleus::getCoulombRadius(), G4INCL::ParticleTable::getName(), G4INCL::Config::getProjectileType(), G4INCL::ParticleTable::getShortName(), G4INCL::ParticleTable::getTableSpeciesMass(), G4INCL::CoulombNonRelativistic::maxImpactParameter(), G4INCL::CoulombNone::maxImpactParameter(), ParticleSpecies(), G4INCL::StandardPropagationModel::shoot(), and G4INCL::Config::summary().
Definition at line 65 of file G4INCLParticleSpecies.hh.
Referenced by G4INCL::Config::echo(), G4INCL::KinematicsUtils::gammaFromKineticEnergy(), G4INCL::Nucleus::getCoulombRadius(), G4INCL::ParticleTable::getName(), G4INCL::ParticleTable::getShortName(), G4INCL::ParticleTable::getTableSpeciesMass(), G4INCL::Config::getTargetZ(), G4INCL::INCL::INCL(), G4INCL::CoulombNonRelativistic::maxImpactParameter(), G4INCL::CoulombNone::maxImpactParameter(), ParticleSpecies(), G4INCL::Config::setTargetZ(), and G4INCL::Config::summary().