#include <G4NistMaterialBuilder.hh>
|
| G4NistMaterialBuilder (G4NistElementBuilder *, G4int verb=0) |
|
| ~G4NistMaterialBuilder ()=default |
|
G4Material * | FindMaterial (const G4String &name) const |
|
G4Material * | FindOrBuildMaterial (const G4String &name, G4bool warning=true) |
|
G4Material * | FindSimpleMaterial (G4int Z) const |
|
G4Material * | FindOrBuildSimpleMaterial (G4int Z, G4bool warning) |
|
G4Material * | ConstructNewMaterial (const G4String &name, const std::vector< G4String > &elm, const std::vector< G4int > &nbAtoms, G4double dens, G4State state=kStateSolid, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure) |
|
G4Material * | ConstructNewMaterial (const G4String &name, const std::vector< G4String > &elm, const std::vector< G4double > &weight, G4double dens, G4State state=kStateSolid, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure) |
|
G4Material * | ConstructNewGasMaterial (const G4String &name, const G4String &nameDB, G4double temp, G4double pres) |
|
G4Material * | ConstructNewIdealGasMaterial (const G4String &name, const std::vector< G4String > &elm, const std::vector< G4int > &nbAtoms, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure) |
|
void | SetVerbose (G4int val) |
|
void | ListMaterials (const G4String &) const |
|
void | ListNistSimpleMaterials () const |
|
void | ListNistCompoundMaterials () const |
|
void | ListHepMaterials () const |
|
void | ListSpaceMaterials () const |
|
void | ListBioChemicalMaterials () const |
|
const std::vector< G4String > & | GetMaterialNames () const |
|
G4double | GetMeanIonisationEnergy (G4int index) const |
|
G4double | GetNominalDensity (G4int index) const |
|
G4bool | operator== (const G4NistMaterialBuilder &) const =delete |
|
G4bool | operator!= (const G4NistMaterialBuilder &) const =delete |
|
| G4NistMaterialBuilder (const G4NistMaterialBuilder &)=delete |
|
const G4NistMaterialBuilder & | operator= (const G4NistMaterialBuilder &)=delete |
|
Definition at line 68 of file G4NistMaterialBuilder.hh.
◆ G4NistMaterialBuilder() [1/2]
Definition at line 89 of file G4NistMaterialBuilder.cc.
90: elmBuilder(eb),
91 verbose(vb),
92 nMaterials(0),
93 nComponents(0),
94 nCurrent(0)
95{
96 Initialise();
97}
◆ ~G4NistMaterialBuilder()
G4NistMaterialBuilder::~G4NistMaterialBuilder |
( |
| ) |
|
|
default |
◆ G4NistMaterialBuilder() [2/2]
◆ ConstructNewGasMaterial()
Definition at line 348 of file G4NistMaterialBuilder.cc.
353{
354
356 if(mat != nullptr)
357 {
358 G4cout <<
"G4NistMaterialBuilder::ConstructNewGasMaterial:"
359 <<
" WARNING: the material <" <<
name
360 <<
"> already exists." <<
G4endl;
361 G4cout <<
" New material will NOT be built!"
363 return mat;
364 }
365
367 if(bmat == nullptr)
368 {
369 G4cout <<
"G4NistMaterialBuilder::ConstructNewGasMaterial:"
370 << " WARNING: the Name <" << nameDB
371 << "> is NOT in the database: no new gas will be constructed."
373 return nullptr;
374 }
376 G4cout <<
"G4NistMaterialBuilder::ConstructNewGasMaterial:"
377 << " WARNING: <" << nameDB
378 << "> is NOT a gas - no new gas will be constructed."
380 return nullptr;
381 }
382
386
387 if (verbose>1) {
388 G4cout <<
"G4NistMaterialBuilder::ConstructNewGasMaterial: done" <<
G4endl;
390 }
391 return mat;
392}
G4GLOB_DLL std::ostream G4cout
G4double GetPressure() const
G4double GetDensity() const
G4double GetTemperature() const
G4Material * FindOrBuildMaterial(const G4String &name, G4bool warning=true)
const char * name(G4int ptype)
Referenced by G4NistManager::ConstructNewGasMaterial().
◆ ConstructNewIdealGasMaterial()
G4Material * G4NistMaterialBuilder::ConstructNewIdealGasMaterial |
( |
const G4String & |
name, |
|
|
const std::vector< G4String > & |
elm, |
|
|
const std::vector< G4int > & |
nbAtoms, |
|
|
G4double |
temp = NTP_Temperature , |
|
|
G4double |
pressure = CLHEP::STP_Pressure |
|
) |
| |
Definition at line 396 of file G4NistMaterialBuilder.cc.
402{
404
405
407 if(mat != nullptr)
408 {
409 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
410 <<
" WARNING: the material <" <<
name
411 <<
"> already exists." <<
G4endl;
412 G4cout <<
" New material will NOT be built!"
414 return mat;
415 }
416
417
419 if(els == 0) {
420 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
421 <<
" WARNING: empty list of elements for " <<
name
423 G4cout <<
" New material will NOT be built!"
425 return nullptr;
426 }
427
428
429
431 if(temp != NTP_Temperature || pres != CLHEP::STP_Pressure)
432 { stp = false; }
433
435
437 for (
G4int i=0; i<els; ++i) {
438 Z = elmBuilder->
GetZ(elm[i]);
440 }
441
442 G4double dens = massPerMole/(CLHEP::Avogadro*CLHEP::k_Boltzmann*temp/pres);
443
444 if (els == 1) { AddMaterial(name,dens,
Z,0.,els,state,stp); }
445 else {
446 AddMaterial(name,dens,0,0.,els,state,stp);
447 for (
G4int i=0; i<els; ++i) {
448 AddElementByAtomCount(elmBuilder->
GetZ(elm[i]), nbAtoms[i]);
449 }
450 }
451
452 if(!stp) { AddGas(name,temp,pres); }
453
454 return BuildMaterial(nMaterials-1);
455}
G4double GetAtomicMassAmu(const G4String &symb) const
G4int GetZ(const G4String &symb) const
Referenced by G4NistManager::ConstructNewIdealGasMaterial().
◆ ConstructNewMaterial() [1/2]
Definition at line 298 of file G4NistMaterialBuilder.cc.
306{
307
309 if(mat != nullptr)
310 {
311 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
312 <<
" WARNING: the material <" <<
name
313 <<
"> already exists." <<
G4endl;
314 G4cout <<
" New material will NOT be built!"
316 return mat;
317 }
318
319
321 if(els == 0) {
322 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
323 <<
" WARNING: empty list of elements for " <<
name
325 G4cout <<
" New material will NOT be built!"
327 return nullptr;
328 }
329
330
331
334 (temp != NTP_Temperature || pres != CLHEP::STP_Pressure))
335 { stp = false; }
336 AddMaterial(name,dens*CLHEP::cm3/CLHEP::g,0,0.,els,state,stp);
337 if(!stp) { AddGas(name,temp,pres); }
338
339 for (
G4int i=0; i<els; ++i) {
340 AddElementByWeightFraction(elmBuilder->
GetZ(elm[i]), w[i]);
341 }
342
343 return BuildMaterial(nMaterials-1);
344}
◆ ConstructNewMaterial() [2/2]
Definition at line 247 of file G4NistMaterialBuilder.cc.
255{
256
258 if(mat != nullptr)
259 {
260 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
261 <<
" WARNING: the material <" <<
name
262 <<
"> already exists." <<
G4endl;
263 G4cout <<
" New material will NOT be built!"
265 return mat;
266 }
267
268
270 if(els == 0) {
271 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
272 <<
" WARNING: empty list of elements for " <<
name
274 G4cout <<
" New material will NOT be built!"
276 return nullptr;
277 }
278
279
280
283 (temp != NTP_Temperature || pres != CLHEP::STP_Pressure))
284 { stp = false; }
285
286 AddMaterial(name,dens*CLHEP::cm3/CLHEP::g,0,0.,els,state,stp);
287 if(!stp) { AddGas(name,temp,pres); }
288
289 for (
G4int i=0; i<els; ++i) {
290 AddElementByAtomCount(elmBuilder->
GetZ(elm[i]), nbAtoms[i]);
291 }
292
293 return BuildMaterial(nMaterials-1);
294}
Referenced by G4NistManager::ConstructNewMaterial().
◆ FindMaterial()
◆ FindOrBuildMaterial()
◆ FindOrBuildSimpleMaterial()
◆ FindSimpleMaterial()
◆ GetMaterialNames()
const std::vector< G4String > & G4NistMaterialBuilder::GetMaterialNames |
( |
| ) |
const |
|
inline |
◆ GetMeanIonisationEnergy()
G4double G4NistMaterialBuilder::GetMeanIonisationEnergy |
( |
G4int |
index | ) |
const |
|
inline |
◆ GetNominalDensity()
G4double G4NistMaterialBuilder::GetNominalDensity |
( |
G4int |
index | ) |
const |
|
inline |
◆ ListBioChemicalMaterials()
void G4NistMaterialBuilder::ListBioChemicalMaterials |
( |
| ) |
const |
Definition at line 596 of file G4NistMaterialBuilder.cc.
597{
598 G4cout <<
"=============================================================" <<
G4endl;
600 G4cout <<
"=============================================================" <<
G4endl;
601 G4cout <<
" Ncomp Name density(g/cm^3) I(eV) ChFormula" <<
G4endl;
602 G4cout <<
"=============================================================" <<
G4endl;
603 for (
G4int i=nSpace; i<nMaterials; ++i) {DumpMix(i);}
604 G4cout <<
"=============================================================" <<
G4endl;
605}
Referenced by ListMaterials().
◆ ListHepMaterials()
void G4NistMaterialBuilder::ListHepMaterials |
( |
| ) |
const |
Definition at line 572 of file G4NistMaterialBuilder.cc.
573{
574 G4cout <<
"=============================================================" <<
G4endl;
576 G4cout <<
"=============================================================" <<
G4endl;
577 G4cout <<
" Ncomp Name density(g/cm^3) I(eV) ChFormula" <<
G4endl;
578 G4cout <<
"=============================================================" <<
G4endl;
579 for (
G4int i=nNIST; i<nHEP; ++i) {DumpMix(i);}
580}
Referenced by ListMaterials().
◆ ListMaterials()
void G4NistMaterialBuilder::ListMaterials |
( |
const G4String & |
mnam | ) |
const |
Definition at line 524 of file G4NistMaterialBuilder.cc.
525{
531
532 else if (mnam == "all") {
538
539 } else {
540 G4cout <<
"### G4NistMaterialBuilder::ListMaterials: Warning "
541 << mnam <<
" list is not known." <<
G4endl;
542 }
543}
void ListNistCompoundMaterials() const
void ListNistSimpleMaterials() const
void ListHepMaterials() const
void ListSpaceMaterials() const
void ListBioChemicalMaterials() const
Referenced by G4NistManager::ListMaterials().
◆ ListNistCompoundMaterials()
void G4NistMaterialBuilder::ListNistCompoundMaterials |
( |
| ) |
const |
Definition at line 559 of file G4NistMaterialBuilder.cc.
560{
561 G4cout <<
"=============================================================" <<
G4endl;
562 G4cout <<
"### Compound Materials from the NIST Data Base ##" <<
G4endl;
563 G4cout <<
"=============================================================" <<
G4endl;
564 G4cout <<
" Ncomp Name density(g/cm^3) I(eV) ChFormula" <<
G4endl;
565 G4cout <<
"=============================================================" <<
G4endl;
566 for (
G4int i=nElementary; i<nNIST; ++i) {DumpMix(i);}
567 DumpMix(0);
568}
Referenced by ListMaterials().
◆ ListNistSimpleMaterials()
void G4NistMaterialBuilder::ListNistSimpleMaterials |
( |
| ) |
const |
Definition at line 547 of file G4NistMaterialBuilder.cc.
548{
549 G4cout <<
"=======================================================" <<
G4endl;
550 G4cout <<
"### Simple Materials from the NIST Data Base ###" <<
G4endl;
551 G4cout <<
"=======================================================" <<
G4endl;
553 G4cout <<
"=======================================================" <<
G4endl;
554 for (
G4int i=1; i<nElementary; ++i) {DumpElm(i);}
555}
Referenced by ListMaterials().
◆ ListSpaceMaterials()
void G4NistMaterialBuilder::ListSpaceMaterials |
( |
| ) |
const |
Definition at line 584 of file G4NistMaterialBuilder.cc.
585{
586 G4cout <<
"=============================================================" <<
G4endl;
588 G4cout <<
"=============================================================" <<
G4endl;
589 G4cout <<
" Ncomp Name density(g/cm^3) I(eV) ChFormula" <<
G4endl;
590 G4cout <<
"=============================================================" <<
G4endl;
591 for (
G4int i=nHEP; i<nSpace; ++i) {DumpMix(i);}
592}
Referenced by ListMaterials().
◆ operator!=()
◆ operator=()
◆ operator==()
◆ SetVerbose()
void G4NistMaterialBuilder::SetVerbose |
( |
G4int |
val | ) |
|
The documentation for this class was generated from the following files: