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$ >> 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 abandance 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 // Get G4Material by index 158 // by the index for other NIST materials << 159 // 167 // 160 inline G4double GetNominalDensity(G4int Z) c << 168 inline G4Material* GetMaterial(size_t index); 161 << 169 162 // Get G4Material by index << 163 // << 164 inline G4Material* GetMaterial(std::size_t i << 165 << 166 // Find or build a G4Material by name, from 170 // Find or build a G4Material by name, from the Geant4 dataBase 167 // 171 // 168 inline G4Material* FindMaterial(const G4Stri << 172 inline G4Material* FindOrBuildMaterial(const G4String& name, 169 inline G4Material* FindOrBuildMaterial( << 173 G4bool isotopes=true, 170 const G4String& name, G4bool isotopes = tr << 174 G4bool warning=false); 171 << 175 172 // Find or build a simple material via atomi << 173 // << 174 inline G4Material* FindSimpleMaterial(G4int << 175 inline G4Material* FindOrBuildSimpleMaterial << 176 << 177 // Build G4Material with user defined name a 176 // Build G4Material with user defined name and density on base 178 // of a material from Geant4 dataBase 177 // of a material from Geant4 dataBase 179 // 178 // 180 G4Material* BuildMaterialWithNewDensity(cons << 179 G4Material* BuildMaterialWithNewDensity(const G4String& name, 181 G4double density = 0.0, G4double temp = NT << 180 const G4String& basename, >> 181 G4double density = 0.0, >> 182 G4double temp = CLHEP::STP_Temperature, >> 183 G4double pres = CLHEP::STP_Pressure); 182 184 183 // Construct a G4Material from scratch by at 185 // Construct a G4Material from scratch by atome count 184 // temperature and pressure should be consis << 186 // 185 // << 187 inline G4Material* ConstructNewMaterial( 186 inline G4Material* ConstructNewMaterial(cons << 188 const G4String& name, 187 const std::vector<G4int>& nbAtoms, G4doubl << 189 const std::vector<G4String>& elm, 188 G4State state = kStateSolid, G4double temp << 190 const std::vector<G4int>& nbAtoms, 189 G4double pressure = CLHEP::STP_Pressure); << 191 G4double dens, >> 192 G4bool isotopes=true, >> 193 G4State state = kStateSolid, >> 194 G4double temp = CLHEP::STP_Temperature, >> 195 G4double pressure = CLHEP::STP_Pressure); 190 196 191 // Construct a G4Material from scratch by fr 197 // Construct a G4Material from scratch by fraction mass 192 // temperature and pressure should be consis << 198 // 193 // << 199 inline G4Material* ConstructNewMaterial( 194 inline G4Material* ConstructNewMaterial(cons << 200 const G4String& name, 195 const std::vector<G4double>& weight, G4dou << 201 const std::vector<G4String>& elm, 196 G4State state = kStateSolid, G4double temp << 202 const std::vector<G4double>& weight, 197 G4double pressure = CLHEP::STP_Pressure); << 203 G4double dens, >> 204 G4bool isotopes=true, >> 205 G4State state = kStateSolid, >> 206 G4double temp = CLHEP::STP_Temperature, >> 207 G4double pressure = CLHEP::STP_Pressure); 198 208 199 // Construct a gas G4Material from scratch b 209 // Construct a gas G4Material from scratch by atome count 200 // << 210 // 201 inline G4Material* ConstructNewGasMaterial(c << 211 inline G4Material* ConstructNewGasMaterial(const G4String& name, 202 G4double temp, G4double pres, G4bool isoto << 212 const G4String& nameNist, >> 213 G4double temp, >> 214 G4double pres, >> 215 G4bool isotopes=true); 203 216 204 // Construct an ideal gas G4Material from sc 217 // Construct an ideal gas G4Material from scratch by atom count 205 // 218 // 206 inline G4Material* ConstructNewIdealGasMater << 219 inline G4Material* ConstructNewIdealGasMaterial( 207 const std::vector<G4String>& elm, const st << 220 const G4String& name, 208 G4double temp = NTP_Temperature, G4double << 221 const std::vector<G4String>& elm, 209 << 222 const std::vector<G4int>& nbAtoms, 210 // enable/disable density effect calculator << 223 G4bool isotopes = true, 211 // << 224 G4double temp = CLHEP::STP_Temperature, 212 void SetDensityEffectCalculatorFlag(const G4 << 225 G4double pressure = CLHEP::STP_Pressure); 213 << 226 214 // enable/disable density effect calculator << 215 // << 216 void SetDensityEffectCalculatorFlag(G4Materi << 217 << 218 // Get number of G4Materials 227 // Get number of G4Materials 219 // 228 // 220 inline std::size_t GetNumberOfMaterials() co << 229 inline size_t GetNumberOfMaterials(); 221 << 230 222 inline G4int GetVerbose() const; << 231 inline G4int GetVerbose(); 223 232 224 void SetVerbose(G4int); 233 void SetVerbose(G4int); 225 234 226 // Print G4Material by name 235 // Print G4Material by name 227 // 236 // 228 void PrintG4Material(const G4String&) const; << 237 void PrintG4Material(const G4String&); 229 238 230 // Print predefined Geant4 materials: 239 // Print predefined Geant4 materials: 231 // "simple" - only pure materials in basic s 240 // "simple" - only pure materials in basic state (Z = 1, ..., 98) 232 // "compound" - NIST compounds 241 // "compound" - NIST compounds 233 // "hep" - HEP materials and compounds 242 // "hep" - HEP materials and compounds 234 // "bio" - bio-medical materials and compoun << 235 // "all" - all 243 // "all" - all 236 // 244 // 237 inline void ListMaterials(const G4String&) c << 245 inline void ListMaterials(const G4String&); 238 246 239 // Access to the list of names of Geant4 pre 247 // Access to the list of names of Geant4 predefined materials 240 // 248 // 241 inline const std::vector<G4String>& GetNistM 249 inline const std::vector<G4String>& GetNistMaterialNames() const; 242 250 243 // Fast computation of Z^1/3 251 // Fast computation of Z^1/3 244 // 252 // 245 inline G4double GetZ13(G4double Z) const; << 253 inline G4double GetZ13(G4double Z); 246 inline G4double GetZ13(G4int Z) const; << 254 inline G4double GetZ13(G4int Z); 247 255 248 // Fast computation of A^0.27 for natuaral a << 256 // Fast computation of A^0.27 for natuaral abandances 249 // 257 // 250 inline G4double GetA27(G4int Z) const; << 258 inline G4double GetA27(G4int Z); 251 259 252 // Fast computation of log(A) 260 // Fast computation of log(A) 253 // 261 // 254 inline G4double GetLOGZ(G4int Z) const; << 262 inline G4double GetLOGA(G4double A); 255 inline G4double GetLOGAMU(G4int Z) const; << 263 inline G4double GetLOGZ(G4int Z); 256 264 257 G4ICRU90StoppingData* GetICRU90StoppingData( << 265 // Fast computation of log(A) for natuaral abandances >> 266 // >> 267 inline G4double GetLOGA(G4int Z); 258 268 259 private: << 269 private: 260 G4NistManager(); << 261 270 262 std::vector<G4Element*> elements; << 271 G4NistManager(); 263 std::vector<G4Material*> materials; << 272 static G4NistManager* instance; 264 273 265 G4ICRU90StoppingData* fICRU90; << 266 G4NistElementBuilder* elmBuilder; << 267 G4NistMaterialBuilder* matBuilder; << 268 G4NistMessenger* messenger; << 269 G4Pow* g4pow; 274 G4Pow* g4pow; 270 const G4MaterialTable* theMaterialTable; << 271 const G4ElementTable* theElementTable; << 272 const G4IsotopeTable* theIsotopeTable; << 273 << 274 G4double POWERA27[101]; 275 G4double POWERA27[101]; 275 G4double LOGAZ[101]; 276 G4double LOGAZ[101]; >> 277 >> 278 std::vector<G4Element*> elements; >> 279 std::vector<G4Material*> materials; >> 280 >> 281 size_t nElements; >> 282 size_t nMaterials; >> 283 >> 284 G4int verbose; >> 285 >> 286 G4NistElementBuilder* elmBuilder; >> 287 G4NistMaterialBuilder* matBuilder; >> 288 G4NistMessenger* messenger; 276 289 277 std::size_t nElements; << 278 std::size_t nMaterials; << 279 G4int verbose; << 280 }; 290 }; 281 291 282 //....oooOO0OOooo........oooOO0OOooo........oo 292 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 283 << 284 inline std::size_t G4NistManager::GetNumberOfM << 285 << 286 //....oooOO0OOooo........oooOO0OOooo........oo 293 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 287 294 288 inline G4Element* G4NistManager::GetElement(st << 295 inline size_t G4NistManager::GetNumberOfMaterials() 289 { 296 { 290 return (index < theElementTable->size()) ? ( << 297 return nMaterials; 291 } 298 } 292 299 293 //....oooOO0OOooo........oooOO0OOooo........oo 300 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 294 301 295 inline G4Element* G4NistManager::FindElement(G << 302 inline G4Element* G4NistManager::GetElement(size_t index) >> 303 { >> 304 G4Element* elm = 0; >> 305 const G4ElementTable* theElementTable = G4Element::GetElementTable(); >> 306 if(index < theElementTable->size()) { elm = (*theElementTable)[index]; } >> 307 return elm; >> 308 } 296 309 297 //....oooOO0OOooo........oooOO0OOooo........oo 310 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 298 311 299 inline G4Element* G4NistManager::FindOrBuildEl << 312 inline >> 313 G4Element* G4NistManager::FindOrBuildElement(G4int Z, G4bool isotopes) 300 { 314 { 301 return elmBuilder->FindOrBuildElement(Z, iso 315 return elmBuilder->FindOrBuildElement(Z, isotopes); 302 } 316 } 303 317 304 //....oooOO0OOooo........oooOO0OOooo........oo 318 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 305 319 306 inline G4Element* G4NistManager::FindOrBuildEl << 320 inline >> 321 G4Element* G4NistManager::FindOrBuildElement(const G4String& symb, >> 322 G4bool isotopes) 307 { 323 { 308 return elmBuilder->FindOrBuildElement(symb, 324 return elmBuilder->FindOrBuildElement(symb, isotopes); 309 } 325 } 310 326 311 //....oooOO0OOooo........oooOO0OOooo........oo 327 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 312 328 313 inline std::size_t G4NistManager::GetNumberOfE << 329 inline size_t G4NistManager::GetNumberOfElements() const >> 330 { >> 331 return nElements; >> 332 } 314 333 315 //....oooOO0OOooo........oooOO0OOooo........oo 334 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 316 335 317 inline G4int G4NistManager::GetZ(const G4Strin << 336 inline G4int G4NistManager::GetZ(const G4String& symb) const >> 337 { >> 338 return elmBuilder->GetZ(symb); >> 339 } 318 340 319 //....oooOO0OOooo........oooOO0OOooo........oo 341 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 320 342 321 inline G4double G4NistManager::GetAtomicMassAm 343 inline G4double G4NistManager::GetAtomicMassAmu(const G4String& symb) const 322 { 344 { 323 return elmBuilder->GetAtomicMassAmu(symb); 345 return elmBuilder->GetAtomicMassAmu(symb); 324 } 346 } 325 347 326 //....oooOO0OOooo........oooOO0OOooo........oo 348 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 327 349 328 inline G4double G4NistManager::GetAtomicMassAm 350 inline G4double G4NistManager::GetAtomicMassAmu(G4int Z) const 329 { 351 { 330 return elmBuilder->GetAtomicMassAmu(Z); 352 return elmBuilder->GetAtomicMassAmu(Z); 331 } 353 } 332 354 333 //....oooOO0OOooo........oooOO0OOooo........oo 355 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 334 356 335 inline G4double G4NistManager::GetIsotopeMass( << 357 inline >> 358 G4double G4NistManager::GetIsotopeMass(G4int Z, G4int N) const 336 { 359 { 337 return elmBuilder->GetIsotopeMass(Z, N); 360 return elmBuilder->GetIsotopeMass(Z, N); 338 } 361 } 339 362 340 //....oooOO0OOooo........oooOO0OOooo........oo 363 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 341 364 342 inline G4double G4NistManager::GetAtomicMass(G << 365 inline >> 366 G4double G4NistManager::GetAtomicMass(G4int Z, G4int N) const 343 { 367 { 344 return elmBuilder->GetAtomicMass(Z, N); 368 return elmBuilder->GetAtomicMass(Z, N); 345 } 369 } 346 370 347 //....oooOO0OOooo........oooOO0OOooo........oo 371 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 348 372 349 inline G4double G4NistManager::GetTotalElectro << 373 inline >> 374 G4double G4NistManager::GetTotalElectronBindingEnergy(G4int Z) const 350 { 375 { 351 return elmBuilder->GetTotalElectronBindingEn 376 return elmBuilder->GetTotalElectronBindingEnergy(Z); 352 } 377 } 353 378 354 //....oooOO0OOooo........oooOO0OOooo........oo 379 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 355 380 356 inline G4double G4NistManager::GetIsotopeAbund << 381 inline >> 382 G4double G4NistManager::GetIsotopeAbundance(G4int Z, G4int N) const 357 { 383 { 358 return elmBuilder->GetIsotopeAbundance(Z, N) 384 return elmBuilder->GetIsotopeAbundance(Z, N); 359 } 385 } 360 386 361 //....oooOO0OOooo........oooOO0OOooo........oo 387 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 362 388 363 inline G4int G4NistManager::GetNistFirstIsotop << 389 inline >> 390 G4int G4NistManager::GetNistFirstIsotopeN(G4int Z) const 364 { 391 { 365 return elmBuilder->GetNistFirstIsotopeN(Z); 392 return elmBuilder->GetNistFirstIsotopeN(Z); 366 } 393 } 367 394 368 //....oooOO0OOooo........oooOO0OOooo........oo 395 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 369 396 370 inline G4int G4NistManager::GetNumberOfNistIso << 397 inline >> 398 G4int G4NistManager::GetNumberOfNistIsotopes(G4int Z) const 371 { 399 { 372 return elmBuilder->GetNumberOfNistIsotopes(Z 400 return elmBuilder->GetNumberOfNistIsotopes(Z); 373 } 401 } 374 402 375 //....oooOO0OOooo........oooOO0OOooo........oo 403 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 376 404 377 inline const std::vector<G4String>& G4NistMana << 405 inline >> 406 const std::vector<G4String>& G4NistManager::GetNistElementNames() const 378 { 407 { 379 return elmBuilder->GetElementNames(); 408 return elmBuilder->GetElementNames(); 380 } 409 } 381 410 382 //....oooOO0OOooo........oooOO0OOooo........oo 411 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 383 412 384 inline G4double G4NistManager::GetMeanIonisati 413 inline G4double G4NistManager::GetMeanIonisationEnergy(G4int Z) const 385 { 414 { 386 return matBuilder->GetMeanIonisationEnergy(Z << 415 return matBuilder->GetMeanIonisationEnergy(Z-1); 387 } 416 } 388 417 389 //....oooOO0OOooo........oooOO0OOooo........oo 418 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 390 419 391 inline G4double G4NistManager::GetNominalDensi << 420 inline void G4NistManager::PrintElement(G4int Z) 392 { 421 { 393 return matBuilder->GetNominalDensity(Z); << 422 elmBuilder->PrintElement(Z); 394 } 423 } 395 424 396 //....oooOO0OOooo........oooOO0OOooo........oo 425 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 397 426 398 inline void G4NistManager::PrintElement(G4int << 427 inline G4Material* G4NistManager::GetMaterial(size_t index) 399 << 400 //....oooOO0OOooo........oooOO0OOooo........oo << 401 << 402 inline G4Material* G4NistManager::GetMaterial( << 403 { 428 { 404 return (index < theMaterialTable->size()) ? << 429 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable(); >> 430 G4Material* mat = 0; >> 431 if(index < theMaterialTable->size()) mat = (*theMaterialTable)[index]; >> 432 return mat; 405 } 433 } 406 434 407 //....oooOO0OOooo........oooOO0OOooo........oo 435 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 408 436 409 inline G4int G4NistManager::GetVerbose() const << 437 inline G4int G4NistManager::GetVerbose() 410 << 411 //....oooOO0OOooo........oooOO0OOooo........oo << 412 << 413 inline G4Material* G4NistManager::FindMaterial << 414 { 438 { 415 return matBuilder->FindMaterial(name); << 439 return verbose; 416 } 440 } 417 441 418 //....oooOO0OOooo........oooOO0OOooo........oo 442 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 419 443 420 inline G4Material* G4NistManager::FindOrBuildM << 444 inline >> 445 G4Material* G4NistManager::FindOrBuildMaterial(const G4String& name, >> 446 G4bool isotopes, >> 447 G4bool warning) 421 { 448 { 422 return matBuilder->FindOrBuildMaterial(name, << 449 return matBuilder->FindOrBuildMaterial(name, isotopes, warning); 423 } 450 } 424 451 425 //....oooOO0OOooo........oooOO0OOooo........oo 452 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 426 453 427 inline G4Material* G4NistManager::FindSimpleMa << 454 inline G4Material* G4NistManager::ConstructNewMaterial( >> 455 const G4String& name, >> 456 const std::vector<G4String>& elm, >> 457 const std::vector<G4int>& nbAtoms, >> 458 G4double dens, >> 459 G4bool isotopes, >> 460 G4State state, >> 461 G4double T, >> 462 G4double P) >> 463 428 { 464 { 429 return matBuilder->FindSimpleMaterial(Z); << 465 return >> 466 matBuilder->ConstructNewMaterial(name,elm,nbAtoms,dens,isotopes,state,T,P); 430 } 467 } 431 468 432 //....oooOO0OOooo........oooOO0OOooo........oo 469 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 433 470 434 inline G4Material* G4NistManager::FindOrBuildS << 471 inline G4Material* G4NistManager::ConstructNewMaterial( >> 472 const G4String& name, >> 473 const std::vector<G4String>& elm, >> 474 const std::vector<G4double>& w, >> 475 G4double dens, >> 476 G4bool isotopes, >> 477 G4State state, >> 478 G4double T, >> 479 G4double P) 435 { 480 { 436 return matBuilder->FindOrBuildSimpleMaterial << 481 return matBuilder->ConstructNewMaterial(name,elm,w,dens,isotopes,state,T,P); 437 } 482 } 438 483 439 //....oooOO0OOooo........oooOO0OOooo........oo 484 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 440 485 441 inline G4Material* G4NistManager::ConstructNew << 486 inline G4Material* G4NistManager::ConstructNewGasMaterial( 442 const std::vector<G4String>& elm, const std: << 487 const G4String& name, 443 G4State state, G4double T, G4double P) << 488 const G4String& nameNist, 444 << 489 G4double temp, G4double pres, >> 490 G4bool isotopes) 445 { 491 { 446 return matBuilder->ConstructNewMaterial(name << 492 return matBuilder->ConstructNewGasMaterial(name,nameNist, >> 493 temp,pres,isotopes); 447 } 494 } 448 495 449 //....oooOO0OOooo........oooOO0OOooo........oo 496 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 450 497 451 inline G4Material* G4NistManager::ConstructNew << 498 inline G4Material* G4NistManager::ConstructNewIdealGasMaterial( 452 const std::vector<G4String>& elm, const std: << 499 const G4String& name, 453 G4State state, G4double T, G4double P) << 500 const std::vector<G4String>& elm, >> 501 const std::vector<G4int>& nbAtoms, >> 502 G4bool isotopes, >> 503 G4double T, >> 504 G4double P) 454 { 505 { 455 return matBuilder->ConstructNewMaterial(name << 506 return >> 507 matBuilder->ConstructNewIdealGasMaterial(name,elm,nbAtoms,isotopes,T,P); 456 } 508 } 457 509 458 //....oooOO0OOooo........oooOO0OOooo........oo 510 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 459 511 460 inline G4Material* G4NistManager::ConstructNew << 512 inline void G4NistManager::ListMaterials(const G4String& list) 461 const G4String& name, const G4String& nameNi << 462 { 513 { 463 return matBuilder->ConstructNewGasMaterial(n << 514 matBuilder->ListMaterials(list); 464 } 515 } 465 516 466 //....oooOO0OOooo........oooOO0OOooo........oo 517 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 467 518 468 inline G4Material* G4NistManager::ConstructNew << 519 inline 469 const std::vector<G4String>& elm, const std: << 520 const std::vector<G4String>& G4NistManager::GetNistMaterialNames() const 470 G4double P) << 471 { 521 { 472 return matBuilder->ConstructNewIdealGasMater << 522 return matBuilder->GetMaterialNames(); 473 } 523 } 474 524 475 //....oooOO0OOooo........oooOO0OOooo........oo 525 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 476 526 477 inline void G4NistManager::ListMaterials(const << 527 inline G4double G4NistManager::GetZ13(G4double A) 478 { 528 { 479 matBuilder->ListMaterials(list); << 529 return g4pow->A13(A); 480 } 530 } 481 531 482 //....oooOO0OOooo........oooOO0OOooo........oo 532 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 483 533 484 inline const std::vector<G4String>& G4NistMana << 534 inline G4double G4NistManager::GetZ13(G4int Z) 485 { 535 { 486 return matBuilder->GetMaterialNames(); << 536 return g4pow->Z13(Z); 487 } 537 } 488 538 489 //....oooOO0OOooo........oooOO0OOooo........oo 539 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 490 540 491 inline G4double G4NistManager::GetZ13(G4double << 541 inline G4double G4NistManager::GetA27(G4int Z) 492 << 542 { 493 //....oooOO0OOooo........oooOO0OOooo........oo << 543 G4double res = 0.0; 494 << 544 if(Z < 101) { res = POWERA27[Z]; } 495 inline G4double G4NistManager::GetZ13(G4int Z) << 545 return res; >> 546 } 496 547 497 //....oooOO0OOooo........oooOO0OOooo........oo 548 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 498 549 499 inline G4double G4NistManager::GetA27(G4int Z) << 550 inline G4double G4NistManager::GetLOGZ(G4int Z) 500 { 551 { 501 return (0 <= Z && Z < 101) ? POWERA27[Z] : g << 552 return g4pow->logZ(Z); 502 } 553 } 503 554 504 //....oooOO0OOooo........oooOO0OOooo........oo 555 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 505 556 506 inline G4double G4NistManager::GetLOGZ(G4int Z << 557 inline G4double G4NistManager::GetLOGA(G4double A) >> 558 { >> 559 return g4pow->logA(A); >> 560 } 507 561 508 //....oooOO0OOooo........oooOO0OOooo........oo 562 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 509 563 510 inline G4double G4NistManager::GetLOGAMU(G4int << 564 inline G4double G4NistManager::GetLOGA(G4int Z) 511 { 565 { 512 return (0 <= Z && Z < 101) ? LOGAZ[Z] : 0.0; << 566 G4double res = 0.0; >> 567 if(Z < 101) { res = LOGAZ[Z]; } >> 568 return res; 513 } 569 } 514 570 515 //....oooOO0OOooo........oooOO0OOooo........oo 571 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 516 572 517 #endif 573 #endif >> 574 518 575