Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 25 26 // ------------------------------------------- 26 // ------------------------------------------------------------------- 27 // 27 // 28 // GEANT4 Class header file 28 // GEANT4 Class header file 29 // 29 // 30 // File name: G4NistManager 30 // File name: G4NistManager 31 // 31 // 32 // Author: Vladimir Ivanchenko 32 // Author: Vladimir Ivanchenko 33 // 33 // 34 // Creation date: 23.12.2004 34 // Creation date: 23.12.2004 35 // 35 // 36 // Modifications: 36 // Modifications: 37 // 27.02.06 V.Ivanchneko add GetAtomicMassAmu 37 // 27.02.06 V.Ivanchneko add GetAtomicMassAmu and ConstructNewGasMaterial 38 // 11.05.06 V.Ivanchneko add warning flag to F 38 // 11.05.06 V.Ivanchneko add warning flag to FindMaterial method 39 // 17.10.06 V.Ivanchneko add methods: GetAtomi 39 // 17.10.06 V.Ivanchneko add methods: GetAtomicMass, GetNistElementNames, 40 // GetNistMaterialNames 40 // GetNistMaterialNames 41 // 02.05.07 V.Ivanchneko add GetNistFirstIsoto 41 // 02.05.07 V.Ivanchneko add GetNistFirstIsotopeN and GetNumberOfNistIsotopes 42 // 28.07.07 V.Ivanchneko make simple methods i 42 // 28.07.07 V.Ivanchneko make simple methods inline 43 // 28.10.07 V.Ivanchneko add state, T, P to ma 43 // 28.10.07 V.Ivanchneko add state, T, P to maetrial build 44 // 29.04.10 V.Ivanchneko add GetMeanIonisation 44 // 29.04.10 V.Ivanchneko add GetMeanIonisationEnergy method 45 // 01.11.10 V.Ivanchneko add G4Pow for fast co 45 // 01.11.10 V.Ivanchneko add G4Pow for fast computations 46 // 09.02.12 P.Gumplinger add ConstructNewIdeal 46 // 09.02.12 P.Gumplinger add ConstructNewIdealGasMaterial 47 // 47 // 48 // Class Description: 48 // Class Description: 49 // 49 // 50 // A utility static class 50 // A utility static class 51 // 51 // 52 // Element data from the NIST DB on Atomic Wei 52 // Element data from the NIST DB on Atomic Weights and Isotope Compositions 53 // http://physics.nist.gov/PhysRefData/Composi 53 // http://physics.nist.gov/PhysRefData/Compositions/index.html 54 // 54 // 55 // ------------------------------------------- 55 // ------------------------------------------------------------------- 56 56 57 #ifndef G4NistManager_h 57 #ifndef G4NistManager_h 58 #define G4NistManager_h 1 58 #define G4NistManager_h 1 59 59 60 #include "G4ICRU90StoppingData.hh" 60 #include "G4ICRU90StoppingData.hh" 61 #include "G4Material.hh" 61 #include "G4Material.hh" 62 #include "G4Element.hh" << 63 #include "G4Isotope.hh" << 64 #include "G4NistElementBuilder.hh" 62 #include "G4NistElementBuilder.hh" 65 #include "G4NistMaterialBuilder.hh" 63 #include "G4NistMaterialBuilder.hh" 66 #include "G4Pow.hh" 64 #include "G4Pow.hh" 67 #include "globals.hh" 65 #include "globals.hh" 68 66 69 #include <CLHEP/Units/PhysicalConstants.h> 67 #include <CLHEP/Units/PhysicalConstants.h> 70 68 71 #include <vector> 69 #include <vector> 72 70 73 class G4NistMessenger; 71 class G4NistMessenger; 74 72 75 class G4NistManager 73 class G4NistManager 76 { 74 { 77 public: 75 public: 78 static G4NistManager* Instance(); 76 static G4NistManager* Instance(); 79 ~G4NistManager(); 77 ~G4NistManager(); 80 78 81 // Get G4Element by index 79 // Get G4Element by index 82 // 80 // 83 inline G4Element* GetElement(std::size_t ind << 81 inline G4Element* GetElement(size_t index) const; 84 82 85 // Find or build G4Element by atomic number 83 // Find or build G4Element by atomic number 86 // 84 // 87 inline G4Element* FindElement(G4int Z) const 85 inline G4Element* FindElement(G4int Z) const; 88 inline G4Element* FindOrBuildElement(G4int Z 86 inline G4Element* FindOrBuildElement(G4int Z, G4bool isotopes = true); 89 87 90 // Find or build G4Element by symbol 88 // Find or build G4Element by symbol 91 // 89 // 92 inline G4Element* FindOrBuildElement(const G 90 inline G4Element* FindOrBuildElement(const G4String& symb, G4bool isotopes = true); 93 91 94 // Get number of elements 92 // Get number of elements 95 // 93 // 96 inline std::size_t GetNumberOfElements() con << 94 inline size_t GetNumberOfElements() const; 97 95 98 // Get atomic number by element symbol 96 // Get atomic number by element symbol 99 // 97 // 100 inline G4int GetZ(const G4String& symb) cons 98 inline G4int GetZ(const G4String& symb) const; 101 99 102 // Get atomic weight by element symbol - mea 100 // Get atomic weight by element symbol - mean mass in units of amu of 103 // an atom with electron shell for the natur 101 // an atom with electron shell for the natural isotope composition 104 // 102 // 105 inline G4double GetAtomicMassAmu(const G4Str 103 inline G4double GetAtomicMassAmu(const G4String& symb) const; 106 104 107 // Get atomic weight in atomic units - mean 105 // Get atomic weight in atomic units - mean mass in units of amu of an atom 108 // with electron shell for the natural isoto 106 // with electron shell for the natural isotope composition 109 // 107 // 110 inline G4double GetAtomicMassAmu(G4int Z) co 108 inline G4double GetAtomicMassAmu(G4int Z) const; 111 109 112 // Get mass of isotope without electron shel 110 // Get mass of isotope without electron shell in Geant4 energy units 113 // 111 // 114 inline G4double GetIsotopeMass(G4int Z, G4in 112 inline G4double GetIsotopeMass(G4int Z, G4int N) const; 115 113 116 // Get mass in Geant4 energy units of an ato 114 // Get mass in Geant4 energy units of an atom of a particular isotope 117 // with the electron shell 115 // with the electron shell 118 // 116 // 119 inline G4double GetAtomicMass(G4int Z, G4int 117 inline G4double GetAtomicMass(G4int Z, G4int N) const; 120 118 121 // Get total ionisation energy of an atom 119 // Get total ionisation energy of an atom 122 // 120 // 123 inline G4double GetTotalElectronBindingEnerg 121 inline G4double GetTotalElectronBindingEnergy(G4int Z) const; 124 122 125 // Get N for the first natural isotope 123 // Get N for the first natural isotope 126 // 124 // 127 inline G4int GetNistFirstIsotopeN(G4int Z) c 125 inline G4int GetNistFirstIsotopeN(G4int Z) const; 128 126 129 // Get number of natural isotopes 127 // Get number of natural isotopes 130 // 128 // 131 inline G4int GetNumberOfNistIsotopes(G4int Z 129 inline G4int GetNumberOfNistIsotopes(G4int Z) const; 132 130 133 // Get natural isotope abundance 131 // Get natural isotope abundance 134 // 132 // 135 inline G4double GetIsotopeAbundance(G4int Z, 133 inline G4double GetIsotopeAbundance(G4int Z, G4int N) const; 136 134 137 // Print element by Z 135 // Print element by Z 138 // 136 // 139 inline void PrintElement(G4int Z) const; 137 inline void PrintElement(G4int Z) const; 140 138 141 // Print element from internal DB by symbol, 139 // Print element from internal DB by symbol, if "all" - print all elements 142 // 140 // 143 void PrintElement(const G4String&) const; 141 void PrintElement(const G4String&) const; 144 142 145 // Print G4Element by name, if "all" - print 143 // Print G4Element by name, if "all" - print all G4Elements 146 // 144 // 147 void PrintG4Element(const G4String&) const; 145 void PrintG4Element(const G4String&) const; 148 146 149 // Access to the vector of Geant4 predefined 147 // Access to the vector of Geant4 predefined element names 150 // 148 // 151 inline const std::vector<G4String>& GetNistE 149 inline const std::vector<G4String>& GetNistElementNames() const; 152 150 153 // Access mean ionisation energy for atoms ( 151 // Access mean ionisation energy for atoms (Z <= 98) by its index 154 // 152 // 155 inline G4double GetMeanIonisationEnergy(G4in 153 inline G4double GetMeanIonisationEnergy(G4int Z) const; 156 154 157 // Access nominal density by atomic number f 155 // Access nominal density by atomic number for simple materials and 158 // by the index for other NIST materials 156 // by the index for other NIST materials 159 // 157 // 160 inline G4double GetNominalDensity(G4int Z) c 158 inline G4double GetNominalDensity(G4int Z) const; 161 159 162 // Get G4Material by index 160 // Get G4Material by index 163 // 161 // 164 inline G4Material* GetMaterial(std::size_t i << 162 inline G4Material* GetMaterial(size_t index) const; 165 163 166 // Find or build a G4Material by name, from 164 // Find or build a G4Material by name, from the Geant4 dataBase 167 // 165 // 168 inline G4Material* FindMaterial(const G4Stri 166 inline G4Material* FindMaterial(const G4String& name) const; 169 inline G4Material* FindOrBuildMaterial( 167 inline G4Material* FindOrBuildMaterial( 170 const G4String& name, G4bool isotopes = tr 168 const G4String& name, G4bool isotopes = true, G4bool warning = false); 171 169 172 // Find or build a simple material via atomi 170 // Find or build a simple material via atomic number 173 // 171 // 174 inline G4Material* FindSimpleMaterial(G4int 172 inline G4Material* FindSimpleMaterial(G4int Z) const; 175 inline G4Material* FindOrBuildSimpleMaterial 173 inline G4Material* FindOrBuildSimpleMaterial(G4int Z, G4bool warning = false); 176 174 177 // Build G4Material with user defined name a 175 // Build G4Material with user defined name and density on base 178 // of a material from Geant4 dataBase 176 // of a material from Geant4 dataBase 179 // 177 // 180 G4Material* BuildMaterialWithNewDensity(cons 178 G4Material* BuildMaterialWithNewDensity(const G4String& name, const G4String& basename, 181 G4double density = 0.0, G4double temp = NT 179 G4double density = 0.0, G4double temp = NTP_Temperature, G4double pres = CLHEP::STP_Pressure); 182 180 183 // Construct a G4Material from scratch by at 181 // Construct a G4Material from scratch by atome count 184 // temperature and pressure should be consis 182 // temperature and pressure should be consistent with the density 185 // 183 // 186 inline G4Material* ConstructNewMaterial(cons 184 inline G4Material* ConstructNewMaterial(const G4String& name, const std::vector<G4String>& elm, 187 const std::vector<G4int>& nbAtoms, G4doubl 185 const std::vector<G4int>& nbAtoms, G4double dens, G4bool isotopes = true, 188 G4State state = kStateSolid, G4double temp 186 G4State state = kStateSolid, G4double temp = NTP_Temperature, 189 G4double pressure = CLHEP::STP_Pressure); 187 G4double pressure = CLHEP::STP_Pressure); 190 188 191 // Construct a G4Material from scratch by fr 189 // Construct a G4Material from scratch by fraction mass 192 // temperature and pressure should be consis 190 // temperature and pressure should be consistent with the density 193 // 191 // 194 inline G4Material* ConstructNewMaterial(cons 192 inline G4Material* ConstructNewMaterial(const G4String& name, const std::vector<G4String>& elm, 195 const std::vector<G4double>& weight, G4dou 193 const std::vector<G4double>& weight, G4double dens, G4bool isotopes = true, 196 G4State state = kStateSolid, G4double temp 194 G4State state = kStateSolid, G4double temp = NTP_Temperature, 197 G4double pressure = CLHEP::STP_Pressure); 195 G4double pressure = CLHEP::STP_Pressure); 198 196 199 // Construct a gas G4Material from scratch b 197 // Construct a gas G4Material from scratch by atome count 200 // 198 // 201 inline G4Material* ConstructNewGasMaterial(c 199 inline G4Material* ConstructNewGasMaterial(const G4String& name, const G4String& nameNist, 202 G4double temp, G4double pres, G4bool isoto 200 G4double temp, G4double pres, G4bool isotopes = true); 203 201 204 // Construct an ideal gas G4Material from sc 202 // Construct an ideal gas G4Material from scratch by atom count 205 // 203 // 206 inline G4Material* ConstructNewIdealGasMater 204 inline G4Material* ConstructNewIdealGasMaterial(const G4String& name, 207 const std::vector<G4String>& elm, const st 205 const std::vector<G4String>& elm, const std::vector<G4int>& nbAtoms, G4bool isotopes = true, 208 G4double temp = NTP_Temperature, G4double 206 G4double temp = NTP_Temperature, G4double pressure = CLHEP::STP_Pressure); 209 207 210 // enable/disable density effect calculator 208 // enable/disable density effect calculator by material name 211 // 209 // 212 void SetDensityEffectCalculatorFlag(const G4 210 void SetDensityEffectCalculatorFlag(const G4String&, G4bool); 213 211 214 // enable/disable density effect calculator 212 // enable/disable density effect calculator by material pointer 215 // 213 // 216 void SetDensityEffectCalculatorFlag(G4Materi 214 void SetDensityEffectCalculatorFlag(G4Material*, G4bool); 217 215 218 // Get number of G4Materials 216 // Get number of G4Materials 219 // 217 // 220 inline std::size_t GetNumberOfMaterials() co << 218 inline size_t GetNumberOfMaterials() const; 221 219 222 inline G4int GetVerbose() const; 220 inline G4int GetVerbose() const; 223 221 224 void SetVerbose(G4int); 222 void SetVerbose(G4int); 225 223 226 // Print G4Material by name 224 // Print G4Material by name 227 // 225 // 228 void PrintG4Material(const G4String&) const; 226 void PrintG4Material(const G4String&) const; 229 227 230 // Print predefined Geant4 materials: 228 // Print predefined Geant4 materials: 231 // "simple" - only pure materials in basic s 229 // "simple" - only pure materials in basic state (Z = 1, ..., 98) 232 // "compound" - NIST compounds 230 // "compound" - NIST compounds 233 // "hep" - HEP materials and compounds 231 // "hep" - HEP materials and compounds 234 // "bio" - bio-medical materials and compoun 232 // "bio" - bio-medical materials and compounds 235 // "all" - all 233 // "all" - all 236 // 234 // 237 inline void ListMaterials(const G4String&) c 235 inline void ListMaterials(const G4String&) const; 238 236 239 // Access to the list of names of Geant4 pre 237 // Access to the list of names of Geant4 predefined materials 240 // 238 // 241 inline const std::vector<G4String>& GetNistM 239 inline const std::vector<G4String>& GetNistMaterialNames() const; 242 240 243 // Fast computation of Z^1/3 241 // Fast computation of Z^1/3 244 // 242 // 245 inline G4double GetZ13(G4double Z) const; 243 inline G4double GetZ13(G4double Z) const; 246 inline G4double GetZ13(G4int Z) const; 244 inline G4double GetZ13(G4int Z) const; 247 245 248 // Fast computation of A^0.27 for natuaral a 246 // Fast computation of A^0.27 for natuaral abundances 249 // 247 // 250 inline G4double GetA27(G4int Z) const; 248 inline G4double GetA27(G4int Z) const; 251 249 252 // Fast computation of log(A) 250 // Fast computation of log(A) 253 // 251 // 254 inline G4double GetLOGZ(G4int Z) const; 252 inline G4double GetLOGZ(G4int Z) const; 255 inline G4double GetLOGAMU(G4int Z) const; 253 inline G4double GetLOGAMU(G4int Z) const; 256 254 257 G4ICRU90StoppingData* GetICRU90StoppingData( 255 G4ICRU90StoppingData* GetICRU90StoppingData(); 258 256 259 private: 257 private: 260 G4NistManager(); 258 G4NistManager(); 261 259 >> 260 static G4NistManager* instance; >> 261 262 std::vector<G4Element*> elements; 262 std::vector<G4Element*> elements; 263 std::vector<G4Material*> materials; 263 std::vector<G4Material*> materials; 264 264 265 G4ICRU90StoppingData* fICRU90; 265 G4ICRU90StoppingData* fICRU90; 266 G4NistElementBuilder* elmBuilder; 266 G4NistElementBuilder* elmBuilder; 267 G4NistMaterialBuilder* matBuilder; 267 G4NistMaterialBuilder* matBuilder; 268 G4NistMessenger* messenger; 268 G4NistMessenger* messenger; 269 G4Pow* g4pow; 269 G4Pow* g4pow; 270 const G4MaterialTable* theMaterialTable; << 271 const G4ElementTable* theElementTable; << 272 const G4IsotopeTable* theIsotopeTable; << 273 270 274 G4double POWERA27[101]; 271 G4double POWERA27[101]; 275 G4double LOGAZ[101]; 272 G4double LOGAZ[101]; 276 273 277 std::size_t nElements; << 274 size_t nElements; 278 std::size_t nMaterials; << 275 size_t nMaterials; 279 G4int verbose; 276 G4int verbose; 280 }; 277 }; 281 278 282 //....oooOO0OOooo........oooOO0OOooo........oo 279 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 283 280 284 inline std::size_t G4NistManager::GetNumberOfM << 281 inline size_t G4NistManager::GetNumberOfMaterials() const { return nMaterials; } 285 282 286 //....oooOO0OOooo........oooOO0OOooo........oo 283 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 287 284 288 inline G4Element* G4NistManager::GetElement(st << 285 inline G4Element* G4NistManager::GetElement(size_t index) const 289 { 286 { >> 287 const G4ElementTable* theElementTable = G4Element::GetElementTable(); 290 return (index < theElementTable->size()) ? ( 288 return (index < theElementTable->size()) ? (*theElementTable)[index] : nullptr; 291 } 289 } 292 290 293 //....oooOO0OOooo........oooOO0OOooo........oo 291 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 294 292 295 inline G4Element* G4NistManager::FindElement(G 293 inline G4Element* G4NistManager::FindElement(G4int Z) const { return elmBuilder->FindElement(Z); } 296 294 297 //....oooOO0OOooo........oooOO0OOooo........oo 295 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 298 296 299 inline G4Element* G4NistManager::FindOrBuildEl 297 inline G4Element* G4NistManager::FindOrBuildElement(G4int Z, G4bool isotopes) 300 { 298 { 301 return elmBuilder->FindOrBuildElement(Z, iso 299 return elmBuilder->FindOrBuildElement(Z, isotopes); 302 } 300 } 303 301 304 //....oooOO0OOooo........oooOO0OOooo........oo 302 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 305 303 306 inline G4Element* G4NistManager::FindOrBuildEl 304 inline G4Element* G4NistManager::FindOrBuildElement(const G4String& symb, G4bool isotopes) 307 { 305 { 308 return elmBuilder->FindOrBuildElement(symb, 306 return elmBuilder->FindOrBuildElement(symb, isotopes); 309 } 307 } 310 308 311 //....oooOO0OOooo........oooOO0OOooo........oo 309 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 312 310 313 inline std::size_t G4NistManager::GetNumberOfE << 311 inline size_t G4NistManager::GetNumberOfElements() const { return nElements; } 314 312 315 //....oooOO0OOooo........oooOO0OOooo........oo 313 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 316 314 317 inline G4int G4NistManager::GetZ(const G4Strin 315 inline G4int G4NistManager::GetZ(const G4String& symb) const { return elmBuilder->GetZ(symb); } 318 316 319 //....oooOO0OOooo........oooOO0OOooo........oo 317 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 320 318 321 inline G4double G4NistManager::GetAtomicMassAm 319 inline G4double G4NistManager::GetAtomicMassAmu(const G4String& symb) const 322 { 320 { 323 return elmBuilder->GetAtomicMassAmu(symb); 321 return elmBuilder->GetAtomicMassAmu(symb); 324 } 322 } 325 323 326 //....oooOO0OOooo........oooOO0OOooo........oo 324 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 327 325 328 inline G4double G4NistManager::GetAtomicMassAm 326 inline G4double G4NistManager::GetAtomicMassAmu(G4int Z) const 329 { 327 { 330 return elmBuilder->GetAtomicMassAmu(Z); 328 return elmBuilder->GetAtomicMassAmu(Z); 331 } 329 } 332 330 333 //....oooOO0OOooo........oooOO0OOooo........oo 331 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 334 332 335 inline G4double G4NistManager::GetIsotopeMass( 333 inline G4double G4NistManager::GetIsotopeMass(G4int Z, G4int N) const 336 { 334 { 337 return elmBuilder->GetIsotopeMass(Z, N); 335 return elmBuilder->GetIsotopeMass(Z, N); 338 } 336 } 339 337 340 //....oooOO0OOooo........oooOO0OOooo........oo 338 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 341 339 342 inline G4double G4NistManager::GetAtomicMass(G 340 inline G4double G4NistManager::GetAtomicMass(G4int Z, G4int N) const 343 { 341 { 344 return elmBuilder->GetAtomicMass(Z, N); 342 return elmBuilder->GetAtomicMass(Z, N); 345 } 343 } 346 344 347 //....oooOO0OOooo........oooOO0OOooo........oo 345 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 348 346 349 inline G4double G4NistManager::GetTotalElectro 347 inline G4double G4NistManager::GetTotalElectronBindingEnergy(G4int Z) const 350 { 348 { 351 return elmBuilder->GetTotalElectronBindingEn 349 return elmBuilder->GetTotalElectronBindingEnergy(Z); 352 } 350 } 353 351 354 //....oooOO0OOooo........oooOO0OOooo........oo 352 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 355 353 356 inline G4double G4NistManager::GetIsotopeAbund 354 inline G4double G4NistManager::GetIsotopeAbundance(G4int Z, G4int N) const 357 { 355 { 358 return elmBuilder->GetIsotopeAbundance(Z, N) 356 return elmBuilder->GetIsotopeAbundance(Z, N); 359 } 357 } 360 358 361 //....oooOO0OOooo........oooOO0OOooo........oo 359 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 362 360 363 inline G4int G4NistManager::GetNistFirstIsotop 361 inline G4int G4NistManager::GetNistFirstIsotopeN(G4int Z) const 364 { 362 { 365 return elmBuilder->GetNistFirstIsotopeN(Z); 363 return elmBuilder->GetNistFirstIsotopeN(Z); 366 } 364 } 367 365 368 //....oooOO0OOooo........oooOO0OOooo........oo 366 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 369 367 370 inline G4int G4NistManager::GetNumberOfNistIso 368 inline G4int G4NistManager::GetNumberOfNistIsotopes(G4int Z) const 371 { 369 { 372 return elmBuilder->GetNumberOfNistIsotopes(Z 370 return elmBuilder->GetNumberOfNistIsotopes(Z); 373 } 371 } 374 372 375 //....oooOO0OOooo........oooOO0OOooo........oo 373 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 376 374 377 inline const std::vector<G4String>& G4NistMana 375 inline const std::vector<G4String>& G4NistManager::GetNistElementNames() const 378 { 376 { 379 return elmBuilder->GetElementNames(); 377 return elmBuilder->GetElementNames(); 380 } 378 } 381 379 382 //....oooOO0OOooo........oooOO0OOooo........oo 380 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 383 381 384 inline G4double G4NistManager::GetMeanIonisati 382 inline G4double G4NistManager::GetMeanIonisationEnergy(G4int Z) const 385 { 383 { 386 return matBuilder->GetMeanIonisationEnergy(Z 384 return matBuilder->GetMeanIonisationEnergy(Z); 387 } 385 } 388 386 389 //....oooOO0OOooo........oooOO0OOooo........oo 387 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 390 388 391 inline G4double G4NistManager::GetNominalDensi 389 inline G4double G4NistManager::GetNominalDensity(G4int Z) const 392 { 390 { 393 return matBuilder->GetNominalDensity(Z); 391 return matBuilder->GetNominalDensity(Z); 394 } 392 } 395 393 396 //....oooOO0OOooo........oooOO0OOooo........oo 394 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 397 395 398 inline void G4NistManager::PrintElement(G4int 396 inline void G4NistManager::PrintElement(G4int Z) const { elmBuilder->PrintElement(Z); } 399 397 400 //....oooOO0OOooo........oooOO0OOooo........oo 398 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 401 399 402 inline G4Material* G4NistManager::GetMaterial( << 400 inline G4Material* G4NistManager::GetMaterial(size_t index) const 403 { 401 { >> 402 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable(); 404 return (index < theMaterialTable->size()) ? 403 return (index < theMaterialTable->size()) ? (*theMaterialTable)[index] : nullptr; 405 } 404 } 406 405 407 //....oooOO0OOooo........oooOO0OOooo........oo 406 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 408 407 409 inline G4int G4NistManager::GetVerbose() const 408 inline G4int G4NistManager::GetVerbose() const { return verbose; } 410 409 411 //....oooOO0OOooo........oooOO0OOooo........oo 410 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 412 411 413 inline G4Material* G4NistManager::FindMaterial 412 inline G4Material* G4NistManager::FindMaterial(const G4String& name) const 414 { 413 { 415 return matBuilder->FindMaterial(name); 414 return matBuilder->FindMaterial(name); 416 } 415 } 417 416 418 //....oooOO0OOooo........oooOO0OOooo........oo 417 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 419 418 420 inline G4Material* G4NistManager::FindOrBuildM 419 inline G4Material* G4NistManager::FindOrBuildMaterial(const G4String& name, G4bool, G4bool warning) 421 { 420 { 422 return matBuilder->FindOrBuildMaterial(name, 421 return matBuilder->FindOrBuildMaterial(name, warning); 423 } 422 } 424 423 425 //....oooOO0OOooo........oooOO0OOooo........oo 424 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 426 425 427 inline G4Material* G4NistManager::FindSimpleMa 426 inline G4Material* G4NistManager::FindSimpleMaterial(G4int Z) const 428 { 427 { 429 return matBuilder->FindSimpleMaterial(Z); 428 return matBuilder->FindSimpleMaterial(Z); 430 } 429 } 431 430 432 //....oooOO0OOooo........oooOO0OOooo........oo 431 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 433 432 434 inline G4Material* G4NistManager::FindOrBuildS 433 inline G4Material* G4NistManager::FindOrBuildSimpleMaterial(G4int Z, G4bool warning) 435 { 434 { 436 return matBuilder->FindOrBuildSimpleMaterial 435 return matBuilder->FindOrBuildSimpleMaterial(Z, warning); 437 } 436 } 438 437 439 //....oooOO0OOooo........oooOO0OOooo........oo 438 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 440 439 441 inline G4Material* G4NistManager::ConstructNew 440 inline G4Material* G4NistManager::ConstructNewMaterial(const G4String& name, 442 const std::vector<G4String>& elm, const std: 441 const std::vector<G4String>& elm, const std::vector<G4int>& nbAtoms, G4double dens, G4bool, 443 G4State state, G4double T, G4double P) 442 G4State state, G4double T, G4double P) 444 443 445 { 444 { 446 return matBuilder->ConstructNewMaterial(name 445 return matBuilder->ConstructNewMaterial(name, elm, nbAtoms, dens, state, T, P); 447 } 446 } 448 447 449 //....oooOO0OOooo........oooOO0OOooo........oo 448 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 450 449 451 inline G4Material* G4NistManager::ConstructNew 450 inline G4Material* G4NistManager::ConstructNewMaterial(const G4String& name, 452 const std::vector<G4String>& elm, const std: 451 const std::vector<G4String>& elm, const std::vector<G4double>& w, G4double dens, G4bool, 453 G4State state, G4double T, G4double P) 452 G4State state, G4double T, G4double P) 454 { 453 { 455 return matBuilder->ConstructNewMaterial(name 454 return matBuilder->ConstructNewMaterial(name, elm, w, dens, state, T, P); 456 } 455 } 457 456 458 //....oooOO0OOooo........oooOO0OOooo........oo 457 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 459 458 460 inline G4Material* G4NistManager::ConstructNew 459 inline G4Material* G4NistManager::ConstructNewGasMaterial( 461 const G4String& name, const G4String& nameNi 460 const G4String& name, const G4String& nameNist, G4double temp, G4double pres, G4bool) 462 { 461 { 463 return matBuilder->ConstructNewGasMaterial(n 462 return matBuilder->ConstructNewGasMaterial(name, nameNist, temp, pres); 464 } 463 } 465 464 466 //....oooOO0OOooo........oooOO0OOooo........oo 465 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 467 466 468 inline G4Material* G4NistManager::ConstructNew 467 inline G4Material* G4NistManager::ConstructNewIdealGasMaterial(const G4String& name, 469 const std::vector<G4String>& elm, const std: 468 const std::vector<G4String>& elm, const std::vector<G4int>& nbAtoms, G4bool, G4double T, 470 G4double P) 469 G4double P) 471 { 470 { 472 return matBuilder->ConstructNewIdealGasMater 471 return matBuilder->ConstructNewIdealGasMaterial(name, elm, nbAtoms, T, P); 473 } 472 } 474 473 475 //....oooOO0OOooo........oooOO0OOooo........oo 474 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 476 475 477 inline void G4NistManager::ListMaterials(const 476 inline void G4NistManager::ListMaterials(const G4String& list) const 478 { 477 { 479 matBuilder->ListMaterials(list); 478 matBuilder->ListMaterials(list); 480 } 479 } 481 480 482 //....oooOO0OOooo........oooOO0OOooo........oo 481 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 483 482 484 inline const std::vector<G4String>& G4NistMana 483 inline const std::vector<G4String>& G4NistManager::GetNistMaterialNames() const 485 { 484 { 486 return matBuilder->GetMaterialNames(); 485 return matBuilder->GetMaterialNames(); 487 } 486 } 488 487 489 //....oooOO0OOooo........oooOO0OOooo........oo 488 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 490 489 491 inline G4double G4NistManager::GetZ13(G4double 490 inline G4double G4NistManager::GetZ13(G4double A) const { return g4pow->A13(A); } 492 491 493 //....oooOO0OOooo........oooOO0OOooo........oo 492 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 494 493 495 inline G4double G4NistManager::GetZ13(G4int Z) 494 inline G4double G4NistManager::GetZ13(G4int Z) const { return g4pow->Z13(Z); } 496 495 497 //....oooOO0OOooo........oooOO0OOooo........oo 496 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 498 497 499 inline G4double G4NistManager::GetA27(G4int Z) 498 inline G4double G4NistManager::GetA27(G4int Z) const 500 { 499 { 501 return (0 <= Z && Z < 101) ? POWERA27[Z] : g 500 return (0 <= Z && Z < 101) ? POWERA27[Z] : g4pow->powZ(Z, 0.27); 502 } 501 } 503 502 504 //....oooOO0OOooo........oooOO0OOooo........oo 503 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 505 504 506 inline G4double G4NistManager::GetLOGZ(G4int Z 505 inline G4double G4NistManager::GetLOGZ(G4int Z) const { return g4pow->logZ(Z); } 507 506 508 //....oooOO0OOooo........oooOO0OOooo........oo 507 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 509 508 510 inline G4double G4NistManager::GetLOGAMU(G4int 509 inline G4double G4NistManager::GetLOGAMU(G4int Z) const 511 { 510 { 512 return (0 <= Z && Z < 101) ? LOGAZ[Z] : 0.0; 511 return (0 <= Z && Z < 101) ? LOGAZ[Z] : 0.0; 513 } 512 } 514 513 515 //....oooOO0OOooo........oooOO0OOooo........oo 514 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 516 515 517 #endif 516 #endif 518 517