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