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