Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NistManager Class Reference

#include <G4NistManager.hh>

Public Member Functions

 ~G4NistManager ()
 
G4ElementGetElement (size_t index)
 
G4ElementFindOrBuildElement (G4int Z, G4bool isotopes=true)
 
G4ElementFindOrBuildElement (const G4String &symb, G4bool isotopes=true)
 
size_t GetNumberOfElements () const
 
G4int GetZ (const G4String &symb) const
 
G4double GetAtomicMassAmu (const G4String &symb) const
 
G4double GetAtomicMassAmu (G4int Z) const
 
G4double GetIsotopeMass (G4int Z, G4int N) const
 
G4double GetAtomicMass (G4int Z, G4int N) const
 
G4double GetTotalElectronBindingEnergy (G4int Z) const
 
G4int GetNistFirstIsotopeN (G4int Z) const
 
G4int GetNumberOfNistIsotopes (G4int Z) const
 
G4double GetIsotopeAbundance (G4int Z, G4int N) const
 
void PrintElement (G4int Z)
 
void PrintElement (const G4String &)
 
void PrintG4Element (const G4String &)
 
const std::vector< G4String > & GetNistElementNames () const
 
G4double GetMeanIonisationEnergy (G4int Z) const
 
G4MaterialGetMaterial (size_t index)
 
G4MaterialFindOrBuildMaterial (const G4String &name, G4bool isotopes=true, G4bool warning=false)
 
G4MaterialBuildMaterialWithNewDensity (const G4String &name, const G4String &basename, G4double density=0.0, G4double temp=CLHEP::STP_Temperature, G4double pres=CLHEP::STP_Pressure)
 
G4MaterialConstructNewMaterial (const G4String &name, const std::vector< G4String > &elm, const std::vector< G4int > &nbAtoms, G4double dens, G4bool isotopes=true, G4State state=kStateSolid, G4double temp=CLHEP::STP_Temperature, G4double pressure=CLHEP::STP_Pressure)
 
G4MaterialConstructNewMaterial (const G4String &name, const std::vector< G4String > &elm, const std::vector< G4double > &weight, G4double dens, G4bool isotopes=true, G4State state=kStateSolid, G4double temp=CLHEP::STP_Temperature, G4double pressure=CLHEP::STP_Pressure)
 
G4MaterialConstructNewGasMaterial (const G4String &name, const G4String &nameNist, G4double temp, G4double pres, G4bool isotopes=true)
 
G4MaterialConstructNewIdealGasMaterial (const G4String &name, const std::vector< G4String > &elm, const std::vector< G4int > &nbAtoms, G4bool isotopes=true, G4double temp=CLHEP::STP_Temperature, G4double pressure=CLHEP::STP_Pressure)
 
size_t GetNumberOfMaterials ()
 
G4int GetVerbose ()
 
void SetVerbose (G4int)
 
void PrintG4Material (const G4String &)
 
void ListMaterials (const G4String &)
 
const std::vector< G4String > & GetNistMaterialNames () const
 
G4double GetZ13 (G4double Z)
 
G4double GetZ13 (G4int Z)
 
G4double GetA27 (G4int Z)
 
G4double GetLOGA (G4double A)
 
G4double GetLOGZ (G4int Z)
 
G4double GetLOGA (G4int Z)
 

Static Public Member Functions

static G4NistManagerInstance ()
 

Detailed Description

Definition at line 82 of file G4NistManager.hh.

Constructor & Destructor Documentation

◆ ~G4NistManager()

G4NistManager::~G4NistManager ( )

Definition at line 103 of file G4NistManager.cc.

104{
105 // G4cout << "NistManager: start material destruction" << G4endl;
106 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
107 size_t nmat = theMaterialTable->size();
108 size_t i;
109 for(i=0; i<nmat; i++) {
110 if((*theMaterialTable)[i]) { delete (*theMaterialTable)[i]; }
111 }
112 // G4cout << "NistManager: start element destruction" << G4endl;
113 const G4ElementTable* theElementTable = G4Element::GetElementTable();
114 size_t nelm = theElementTable->size();
115 for(i=0; i<nelm; i++) {
116 if((*theElementTable)[i]) { delete (*theElementTable)[i]; }
117 }
118 // G4cout << "NistManager: start isotope destruction" << G4endl;
119 const G4IsotopeTable* theIsotopeTable = G4Isotope::GetIsotopeTable();
120 size_t niso = theIsotopeTable->size();
121 for(i=0; i<niso; i++) {
122 if((*theIsotopeTable)[i]) { delete (*theIsotopeTable)[i]; }
123 }
124 // G4cout << "NistManager: end isotope destruction" << G4endl;
125 delete messenger;
126 delete matBuilder;
127 delete elmBuilder;
128 // G4cout << "NistManager: end destruction" << G4endl;
129}
std::vector< G4Element * > G4ElementTable
std::vector< G4Isotope * > G4IsotopeTable
Definition: G4Isotope.hh:68
std::vector< G4Material * > G4MaterialTable
static const G4ElementTable * GetElementTable()
Definition: G4Element.cc:399
static const G4IsotopeTable * GetIsotopeTable()
Definition: G4Isotope.cc:182
static const G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:562

Member Function Documentation

◆ BuildMaterialWithNewDensity()

G4Material * G4NistManager::BuildMaterialWithNewDensity ( const G4String name,
const G4String basename,
G4double  density = 0.0,
G4double  temp = CLHEP::STP_Temperature,
G4double  pres = CLHEP::STP_Pressure 
)

Definition at line 134 of file G4NistManager.cc.

139{
140 G4Material* bmat = FindOrBuildMaterial(name);
141 if(bmat) {
142 G4cout << "G4NistManager::BuildMaterialWithNewDensity ERROR: " << G4endl;
143 G4cout << " New material <" << name << "> cannot be built because material"
144 << " with the same name already exist" << G4endl;
145 G4Exception("G4NistManager::BuildMaterialWithNewDensity()", "mat101",
146 FatalException, "Wrong material name");
147 return 0;
148 }
149 bmat = FindOrBuildMaterial(basename);
150 if(!bmat) {
151 G4cout << "G4NistManager::BuildMaterialWithNewDensity ERROR: " << G4endl;
152 G4cout << " New material <" << name << "> cannot be built because " << G4endl;
153 G4cout << " base material <" << basename << "> does not exist" << G4endl;
154 G4Exception("G4NistManager::BuildMaterialWithNewDensity()", "mat102",
155 FatalException, "Wrong material name");
156 return 0;
157 }
158 G4double dens = density;
159 G4double temp = temperature;
160 G4double pres = pressure;
161 if(dens == 0.0) {
162 dens = bmat->GetDensity();
163 temp = bmat->GetTemperature();
164 pres = bmat->GetPressure();
165 }
166 G4Material* mat = new G4Material(name, dens, bmat, bmat->GetState(),
167 temp, pres);
168 return mat;
169}
@ FatalException
double G4double
Definition: G4Types.hh:64
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4double GetPressure() const
Definition: G4Material.hh:182
G4double GetDensity() const
Definition: G4Material.hh:179
G4State GetState() const
Definition: G4Material.hh:180
G4double GetTemperature() const
Definition: G4Material.hh:181
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

◆ ConstructNewGasMaterial()

G4Material * G4NistManager::ConstructNewGasMaterial ( const G4String name,
const G4String nameNist,
G4double  temp,
G4double  pres,
G4bool  isotopes = true 
)
inline

Definition at line 486 of file G4NistManager.hh.

491{
492 return matBuilder->ConstructNewGasMaterial(name,nameNist,
493 temp,pres,isotopes);
494}
G4Material * ConstructNewGasMaterial(const G4String &name, const G4String &nameDB, G4double temp, G4double pres, G4bool isotopes=true)

◆ ConstructNewIdealGasMaterial()

G4Material * G4NistManager::ConstructNewIdealGasMaterial ( const G4String name,
const std::vector< G4String > &  elm,
const std::vector< G4int > &  nbAtoms,
G4bool  isotopes = true,
G4double  temp = CLHEP::STP_Temperature,
G4double  pressure = CLHEP::STP_Pressure 
)
inline

Definition at line 498 of file G4NistManager.hh.

505{
506 return
507 matBuilder->ConstructNewIdealGasMaterial(name,elm,nbAtoms,isotopes,T,P);
508}
G4Material * ConstructNewIdealGasMaterial(const G4String &name, const std::vector< G4String > &elm, const std::vector< G4int > &nbAtoms, G4bool isotopes=true, G4double temp=CLHEP::STP_Temperature, G4double pressure=CLHEP::STP_Pressure)

◆ ConstructNewMaterial() [1/2]

G4Material * G4NistManager::ConstructNewMaterial ( const G4String name,
const std::vector< G4String > &  elm,
const std::vector< G4double > &  weight,
G4double  dens,
G4bool  isotopes = true,
G4State  state = kStateSolid,
G4double  temp = CLHEP::STP_Temperature,
G4double  pressure = CLHEP::STP_Pressure 
)
inline

Definition at line 471 of file G4NistManager.hh.

480{
481 return matBuilder->ConstructNewMaterial(name,elm,w,dens,isotopes,state,T,P);
482}
G4Material * ConstructNewMaterial(const G4String &name, const std::vector< G4String > &elm, const std::vector< G4int > &nbAtoms, G4double dens, G4bool isotopes=true, G4State state=kStateSolid, G4double temp=CLHEP::STP_Temperature, G4double pressure=CLHEP::STP_Pressure)

◆ ConstructNewMaterial() [2/2]

G4Material * G4NistManager::ConstructNewMaterial ( const G4String name,
const std::vector< G4String > &  elm,
const std::vector< G4int > &  nbAtoms,
G4double  dens,
G4bool  isotopes = true,
G4State  state = kStateSolid,
G4double  temp = CLHEP::STP_Temperature,
G4double  pressure = CLHEP::STP_Pressure 
)
inline

Definition at line 454 of file G4NistManager.hh.

464{
465 return
466 matBuilder->ConstructNewMaterial(name,elm,nbAtoms,dens,isotopes,state,T,P);
467}

◆ FindOrBuildElement() [1/2]

G4Element * G4NistManager::FindOrBuildElement ( const G4String symb,
G4bool  isotopes = true 
)
inline

Definition at line 321 of file G4NistManager.hh.

323{
324 return elmBuilder->FindOrBuildElement(symb, isotopes);
325}
G4Element * FindOrBuildElement(G4int Z, G4bool buildIsotopes=true)

◆ FindOrBuildElement() [2/2]

G4Element * G4NistManager::FindOrBuildElement ( G4int  Z,
G4bool  isotopes = true 
)
inline

Definition at line 313 of file G4NistManager.hh.

314{
315 return elmBuilder->FindOrBuildElement(Z, isotopes);
316}

Referenced by G4tgbMaterialMgr::FindOrBuildG4Element(), and G4GDMLReadMaterials::GetElement().

◆ FindOrBuildMaterial()

G4Material * G4NistManager::FindOrBuildMaterial ( const G4String name,
G4bool  isotopes = true,
G4bool  warning = false 
)
inline

◆ GetA27()

G4double G4NistManager::GetA27 ( G4int  Z)
inline

◆ GetAtomicMass()

G4double G4NistManager::GetAtomicMass ( G4int  Z,
G4int  N 
) const
inline

Definition at line 366 of file G4NistManager.hh.

367{
368 return elmBuilder->GetAtomicMass(Z, N);
369}
G4double GetAtomicMass(G4int Z, G4int N)

Referenced by G4Isotope::G4Isotope().

◆ GetAtomicMassAmu() [1/2]

◆ GetAtomicMassAmu() [2/2]

G4double G4NistManager::GetAtomicMassAmu ( G4int  Z) const
inline

Definition at line 350 of file G4NistManager.hh.

351{
352 return elmBuilder->GetAtomicMassAmu(Z);
353}

◆ GetElement()

G4Element * G4NistManager::GetElement ( size_t  index)
inline

Definition at line 302 of file G4NistManager.hh.

303{
304 G4Element* elm = 0;
305 const G4ElementTable* theElementTable = G4Element::GetElementTable();
306 if(index < theElementTable->size()) { elm = (*theElementTable)[index]; }
307 return elm;
308}

◆ GetIsotopeAbundance()

G4double G4NistManager::GetIsotopeAbundance ( G4int  Z,
G4int  N 
) const
inline

Definition at line 382 of file G4NistManager.hh.

383{
384 return elmBuilder->GetIsotopeAbundance(Z, N);
385}
G4double GetIsotopeAbundance(G4int Z, G4int N)

Referenced by G4ExcitationHandler::BreakItUp(), G4Evaporation::BreakItUp(), and G4VCrossSectionDataSet::ComputeCrossSection().

◆ GetIsotopeMass()

G4double G4NistManager::GetIsotopeMass ( G4int  Z,
G4int  N 
) const
inline

Definition at line 358 of file G4NistManager.hh.

359{
360 return elmBuilder->GetIsotopeMass(Z, N);
361}
G4double GetIsotopeMass(G4int Z, G4int N)

◆ GetLOGA() [1/2]

G4double G4NistManager::GetLOGA ( G4double  A)
inline

Definition at line 557 of file G4NistManager.hh.

558{
559 return g4pow->logA(A);
560}
G4double logA(G4double A)
Definition: G4Pow.hh:151

◆ GetLOGA() [2/2]

G4double G4NistManager::GetLOGA ( G4int  Z)
inline

Definition at line 564 of file G4NistManager.hh.

565{
566 G4double res = 0.0;
567 if(Z < 101) { res = LOGAZ[Z]; }
568 return res;
569}

◆ GetLOGZ()

G4double G4NistManager::GetLOGZ ( G4int  Z)
inline

Definition at line 550 of file G4NistManager.hh.

551{
552 return g4pow->logZ(Z);
553}
G4double logZ(G4int Z)
Definition: G4Pow.hh:146

Referenced by G4eBremsstrahlungRelModel::SetCurrentElement(), G4MuPairProductionModel::SetCurrentElement(), and G4PairProductionRelModel::SetCurrentElement().

◆ GetMaterial()

G4Material * G4NistManager::GetMaterial ( size_t  index)
inline

Definition at line 427 of file G4NistManager.hh.

428{
429 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
430 G4Material* mat = 0;
431 if(index < theMaterialTable->size()) mat = (*theMaterialTable)[index];
432 return mat;
433}

◆ GetMeanIonisationEnergy()

G4double G4NistManager::GetMeanIonisationEnergy ( G4int  Z) const
inline

Definition at line 413 of file G4NistManager.hh.

414{
415 return matBuilder->GetMeanIonisationEnergy(Z-1);
416}
G4double GetMeanIonisationEnergy(G4int index) const

Referenced by G4IonisParamElm::G4IonisParamElm().

◆ GetNistElementNames()

const std::vector< G4String > & G4NistManager::GetNistElementNames ( ) const
inline

Definition at line 406 of file G4NistManager.hh.

407{
408 return elmBuilder->GetElementNames();
409}
const std::vector< G4String > & GetElementNames() const

◆ GetNistFirstIsotopeN()

G4int G4NistManager::GetNistFirstIsotopeN ( G4int  Z) const
inline

Definition at line 390 of file G4NistManager.hh.

391{
392 return elmBuilder->GetNistFirstIsotopeN(Z);
393}
G4int GetNistFirstIsotopeN(G4int Z)

Referenced by G4VCrossSectionDataSet::ComputeCrossSection().

◆ GetNistMaterialNames()

const std::vector< G4String > & G4NistManager::GetNistMaterialNames ( ) const
inline

Definition at line 520 of file G4NistManager.hh.

521{
522 return matBuilder->GetMaterialNames();
523}
const std::vector< G4String > & GetMaterialNames() const

◆ GetNumberOfElements()

size_t G4NistManager::GetNumberOfElements ( ) const
inline

Definition at line 329 of file G4NistManager.hh.

330{
331 return nElements;
332}

◆ GetNumberOfMaterials()

size_t G4NistManager::GetNumberOfMaterials ( )
inline

Definition at line 295 of file G4NistManager.hh.

296{
297 return nMaterials;
298}

◆ GetNumberOfNistIsotopes()

G4int G4NistManager::GetNumberOfNistIsotopes ( G4int  Z) const
inline

Definition at line 398 of file G4NistManager.hh.

399{
400 return elmBuilder->GetNumberOfNistIsotopes(Z);
401}
G4int GetNumberOfNistIsotopes(G4int Z)

Referenced by G4VCrossSectionDataSet::ComputeCrossSection().

◆ GetTotalElectronBindingEnergy()

G4double G4NistManager::GetTotalElectronBindingEnergy ( G4int  Z) const
inline

Definition at line 374 of file G4NistManager.hh.

375{
376 return elmBuilder->GetTotalElectronBindingEnergy(Z);
377}
G4double GetTotalElectronBindingEnergy(G4int Z) const

◆ GetVerbose()

G4int G4NistManager::GetVerbose ( )
inline

Definition at line 437 of file G4NistManager.hh.

438{
439 return verbose;
440}

◆ GetZ()

G4int G4NistManager::GetZ ( const G4String symb) const
inline

Definition at line 336 of file G4NistManager.hh.

337{
338 return elmBuilder->GetZ(symb);
339}
G4int GetZ(const G4String &symb)

◆ GetZ13() [1/2]

◆ GetZ13() [2/2]

G4double G4NistManager::GetZ13 ( G4int  Z)
inline

Definition at line 534 of file G4NistManager.hh.

535{
536 return g4pow->Z13(Z);
537}
G4double Z13(G4int Z)
Definition: G4Pow.hh:110

◆ Instance()

G4NistManager * G4NistManager::Instance ( )
static

Definition at line 68 of file G4NistManager.cc.

69{
70 if (instance == 0) {
71 static G4NistManager manager;
72 instance = &manager;
73 }
74 return instance;
75}

Referenced by G4ExcitationHandler::BreakItUp(), G4BGGNucleonElasticXS::BuildPhysicsTable(), G4BGGNucleonInelasticXS::BuildPhysicsTable(), G4BGGPionElasticXS::BuildPhysicsTable(), G4BGGPionInelasticXS::BuildPhysicsTable(), G4UPiNuclearCrossSection::BuildPhysicsTable(), G4ecpssrBaseKxsModel::CalculateCrossSection(), G4ecpssrBaseLixsModel::CalculateL1CrossSection(), G4ecpssrBaseLixsModel::CalculateL2CrossSection(), G4ecpssrBaseLixsModel::CalculateL3CrossSection(), G4VCrossSectionDataSet::ComputeCrossSection(), G4tgbMaterialMgr::FindOrBuildG4Element(), G4tgbMaterialMgr::FindOrBuildG4Material(), G4BetheBlochModel::G4BetheBlochModel(), G4CrossSectionDataStore::G4CrossSectionDataStore(), G4CrossSectionElastic::G4CrossSectionElastic(), G4CrossSectionInelastic::G4CrossSectionInelastic(), G4CrossSectionPairGG::G4CrossSectionPairGG(), G4DNABrownianTransportation::G4DNABrownianTransportation(), G4eBremParametrizedModel::G4eBremParametrizedModel(), G4eBremsstrahlungRelModel::G4eBremsstrahlungRelModel(), G4eCoulombScatteringModel::G4eCoulombScatteringModel(), G4ElasticHadrNucleusHE::G4ElasticHadrNucleusHE(), G4EmCorrections::G4EmCorrections(), G4EmSaturation::G4EmSaturation(), G4eSingleCoulombScatteringModel::G4eSingleCoulombScatteringModel(), G4hCoulombScatteringModel::G4hCoulombScatteringModel(), G4IonCoulombCrossSection::G4IonCoulombCrossSection(), G4IonCoulombScatteringModel::G4IonCoulombScatteringModel(), G4ionEffectiveCharge::G4ionEffectiveCharge(), G4IonisParamElm::G4IonisParamElm(), G4Isotope::G4Isotope(), G4MuBremsstrahlungModel::G4MuBremsstrahlungModel(), G4MuElecElasticModel::G4MuElecElasticModel(), G4MuElecInelasticModel::G4MuElecInelasticModel(), G4MuPairProductionModel::G4MuPairProductionModel(), G4PairProductionRelModel::G4PairProductionRelModel(), G4ProtonInelasticCrossSection::G4ProtonInelasticCrossSection(), G4ScreeningMottCrossSection::G4ScreeningMottCrossSection(), G4UnstableFragmentBreakUp::G4UnstableFragmentBreakUp(), G4UPiNuclearCrossSection::G4UPiNuclearCrossSection(), G4WentzelOKandVIxSection::G4WentzelOKandVIxSection(), G4WentzelVIModel::G4WentzelVIModel(), G4WentzelVIRelModel::G4WentzelVIRelModel(), G4WentzelVIRelXSection::G4WentzelVIRelXSection(), G4GDMLReadMaterials::GetElement(), G4ComponentGGNuclNuclXsc::GetElementCrossSection(), G4EMDissociationCrossSection::GetElementCrossSection(), G4GGNuclNuclCrossSection::GetElementCrossSection(), G4IonsKoxCrossSection::GetElementCrossSection(), G4IonsShenCrossSection::GetElementCrossSection(), G4IonsSihverCrossSection::GetElementCrossSection(), G4NeutronInelasticCrossSection::GetElementCrossSection(), G4TripathiCrossSection::GetElementCrossSection(), G4NeutronElasticXS::GetElementCrossSection(), G4NeutronInelasticXS::GetElementCrossSection(), G4HadronElasticDataSet::GetElementCrossSection(), G4HadronFissionDataSet::GetElementCrossSection(), G4HadronInelasticDataSet::GetElementCrossSection(), G4TripathiLightCrossSection::GetElementCrossSection(), G4GDMLReadMaterials::GetMaterial(), G4TripathiLightCrossSection::IsElementApplicable(), and G4IonisParamMat::SetMeanExcitationEnergy().

◆ ListMaterials()

void G4NistManager::ListMaterials ( const G4String list)
inline

Definition at line 512 of file G4NistManager.hh.

513{
514 matBuilder->ListMaterials(list);
515}
void ListMaterials(const G4String &)

Referenced by G4NistMessenger::SetNewValue().

◆ PrintElement() [1/2]

void G4NistManager::PrintElement ( const G4String symbol)

Definition at line 173 of file G4NistManager.cc.

174{
175 if (symbol == "all") { elmBuilder->PrintElement(0); }
176 else { elmBuilder->PrintElement(elmBuilder->GetZ(symbol)); }
177}

◆ PrintElement() [2/2]

void G4NistManager::PrintElement ( G4int  Z)
inline

Definition at line 420 of file G4NistManager.hh.

421{
422 elmBuilder->PrintElement(Z);
423}

Referenced by G4NistMessenger::SetNewValue().

◆ PrintG4Element()

void G4NistManager::PrintG4Element ( const G4String name)

Definition at line 181 of file G4NistManager.cc.

182{
183 const G4ElementTable* theElementTable = G4Element::GetElementTable();
184 size_t nelm = theElementTable->size();
185 for(size_t i=0; i<nelm; i++) {
186 G4Element* elm = (*theElementTable)[i];
187 if ( name == elm->GetName() || "all" == name) {
188 G4cout << *elm << G4endl;
189 return;
190 }
191 }
192}
const G4String & GetName() const
Definition: G4Element.hh:127

Referenced by G4NistMessenger::SetNewValue().

◆ PrintG4Material()

void G4NistManager::PrintG4Material ( const G4String name)

Definition at line 196 of file G4NistManager.cc.

197{
198 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
199 size_t nmat = theMaterialTable->size();
200 for(size_t i=0; i<nmat; i++) {
201 G4Material* mat = (*theMaterialTable)[i];
202 if ( name == mat->GetName() || "all" == name) {
203 G4cout << *mat << G4endl;
204 return;
205 }
206 }
207}
const G4String & GetName() const
Definition: G4Material.hh:177

Referenced by G4NistMessenger::SetNewValue().

◆ SetVerbose()

void G4NistManager::SetVerbose ( G4int  val)

Definition at line 211 of file G4NistManager.cc.

212{
213 verbose = val;
214 elmBuilder->SetVerbose(val);
215 matBuilder->SetVerbose(val);
216}

Referenced by G4NistMessenger::SetNewValue().


The documentation for this class was generated from the following files: