Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // G4ParticleDefinition inline methods impleme 27 // 28 // Authors: G.Cosmo, 2 December 1995 - Design, 29 // M.Asai, 29 January 1996 - First im 30 // ------------------------------------------- 31 32 inline G4int G4ParticleDefinition::GetInstance 33 { 34 return g4particleDefinitionInstanceID; 35 } 36 37 inline G4bool G4ParticleDefinition::GetPDGStab 38 { 39 if (IsGeneralIon()) { 40 return (GetIonLifeTime() < 0.); 41 } 42 43 return thePDGStable; 44 } 45 46 inline G4double G4ParticleDefinition::GetPDGLi 47 { 48 return thePDGLifeTime; 49 } 50 51 inline G4double G4ParticleDefinition::GetIonLi 52 { 53 //-- No longer needed to access to G4IonTabl 54 //-- Method GetIonLifeTime() itself is kept 55 56 return thePDGLifeTime; 57 } 58 59 inline G4ParticleTable* G4ParticleDefinition:: 60 { 61 return theParticleTable; 62 } 63 64 inline G4DecayTable* G4ParticleDefinition::Get 65 { 66 return theDecayTable; 67 } 68 69 inline void G4ParticleDefinition::SetDecayTabl 70 { 71 theDecayTable = aDecayTable; 72 } 73 74 inline void G4ParticleDefinition::SetVerboseLe 75 { 76 verboseLevel = value; 77 } 78 79 inline G4int G4ParticleDefinition::GetVerboseL 80 { 81 return verboseLevel; 82 } 83 84 inline G4ProcessManager* G4ParticleDefinition: 85 { 86 return theProcessManagerShadow; 87 } 88 89 inline void G4ParticleDefinition::SetMasterPro 90 { 91 theProcessManagerShadow = aNewPM; 92 } 93 94 inline G4int G4ParticleDefinition::GetQuarkCon 95 { 96 G4int content = 0; 97 if ((flavor > 0) && (flavor <= NumberOfQuark 98 content = theQuarkContent[flavor - 1]; 99 } 100 else { 101 #ifdef G4VERBOSE 102 if (verboseLevel > 0) { 103 std::ostringstream message; 104 message << "Invalid Quark Flavor: " << f 105 G4Exception("G4ParticleDefinition::GetQu 106 } 107 #endif 108 } 109 return content; 110 } 111 112 inline G4int G4ParticleDefinition::GetAntiQuar 113 { 114 G4int content = 0; 115 if ((flavor > 0) && (flavor <= NumberOfQuark 116 content = theAntiQuarkContent[flavor - 1]; 117 } 118 else { 119 #ifdef G4VERBOSE 120 if (verboseLevel > 0) { 121 std::ostringstream message; 122 message << "Invalid Quark Flavor: " << f 123 G4Exception("G4ParticleDefinition::GetAn 124 message); 125 } 126 #endif 127 } 128 return content; 129 } 130 131 inline void G4ParticleDefinition::SetParticleS 132 { 133 theParticleSubType = subtype; 134 } 135 136 inline void G4ParticleDefinition::SetAntiPDGEn 137 { 138 theAntiPDGEncoding = aEncoding; 139 } 140 141 inline G4bool G4ParticleDefinition::GetApplyCu 142 { 143 return fApplyCutsFlag; 144 } 145 146 inline void G4ParticleDefinition::SetAtomicNum 147 { 148 theAtomicNumber = i; 149 } 150 151 inline G4int G4ParticleDefinition::GetAtomicNu 152 { 153 return theAtomicNumber; 154 } 155 156 inline void G4ParticleDefinition::SetAtomicMas 157 { 158 theAtomicMass = i; 159 } 160 161 inline G4int G4ParticleDefinition::GetAtomicMa 162 { 163 return theAtomicMass; 164 } 165 166 inline void G4ParticleDefinition::SetPDGMagnet 167 { 168 thePDGMagneticMoment = magneticMoment; 169 } 170 171 inline G4bool G4ParticleDefinition::IsGeneralI 172 { 173 return isGeneralIon; 174 } 175 176 inline G4bool G4ParticleDefinition::IsMuonicAt 177 { 178 return isMuonicAtom; 179 } 180 181 inline G4int G4ParticleDefinition::GetParticle 182 { 183 return g4particleDefinitionInstanceID; 184 } 185 186 inline G4bool G4ParticleDefinition::IsHypernuc 187 { 188 return GetNumberOfLambdasInHypernucleus() > 189 } 190 191 inline G4int G4ParticleDefinition::GetNumberOf 192 { 193 G4int numberOfLambdas = 0; 194 // PDG code of hypernuclei: 10LZZZAAAI 195 if (thePDGEncoding > 0 && thePDGEncoding / 1 196 numberOfLambdas = (thePDGEncoding / 100000 197 } 198 return numberOfLambdas; 199 } 200 201 inline G4bool G4ParticleDefinition::IsAntiHype 202 { 203 return GetNumberOfAntiLambdasInAntiHypernucl 204 } 205 206 inline G4int G4ParticleDefinition::GetNumberOf 207 { 208 G4int numberOfAntiLambdas = 0; 209 // PDG code of anti-hypernuclei: -10LZZZAAAI 210 if (thePDGEncoding < 0 && thePDGEncoding / 1 211 numberOfAntiLambdas = (std::abs(thePDGEnco 212 } 213 return numberOfAntiLambdas; 214 } 215