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