80 #ifdef G4MULTITHREADED
107 G4cout <<
"G4NistMaterialBuilder::FindOrBuildMaterial "
111 if(mat !=
nullptr) {
return mat; }
113 if(name ==
"G4_NYLON-6/6" || name ==
"G4_NYLON-6/10") {
114 if(
"G4_NYLON-6/6" == matname) { name =
"G4_NYLON-6-6"; }
115 else { name =
"G4_NYLON-6-10";}
130 if (name ==
names[i]) {
131 #ifdef G4MULTITHREADED
141 mat = (*theMaterialTable)[
matIndex[i]];
143 #ifdef G4MULTITHREADED
151 G4cout <<
"G4NistMaterialBuilder::FindOrBuildMaterial WARNING:"
152 <<
" material <" << name
153 <<
"> is not found out" <<
G4endl;
175 G4cout <<
"G4NistMaterialBuilder: BuildMaterial #" << i
190 for(
size_t j=0; j<
nn; ++j) {
199 }
else if( !
STP[i] ) { t = 0.0; }
206 for (
G4int j=0; j<nc; ++j) {
210 G4cout <<
"G4NistMaterialBuilder::BuildMaterial:"
211 <<
" ERROR: elements Z= " << Z <<
" is not found "
212 <<
" for material " <<
names[i]
214 G4Exception(
"G4NistMaterialBuilder::BuildMaterial()",
"mat103",
248 const std::vector<G4String>& elm,
249 const std::vector<G4int>& nbAtoms,
259 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
260 <<
" WARNING: the material <" << name
261 <<
"> is already exist" <<
G4endl;
262 G4cout <<
" New material will NOT be built!"
268 G4int els = elm.size();
270 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
271 <<
" WARNING: empty list of elements for " << name
273 G4cout <<
" New material will NOT be built!"
285 if(!stp) {
AddGas(name,temp,pres); }
287 for (
G4int i=0; i<els; ++i) {
298 const std::vector<G4String>& elm,
299 const std::vector<G4double>&
w,
309 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
310 <<
" WARNING: the material <" << name
311 <<
"> is already exist" <<
G4endl;
312 G4cout <<
" New material will NOT be built!"
318 G4int els = elm.size();
320 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
321 <<
" WARNING: empty list of elements for " << name
323 G4cout <<
" New material will NOT be built!"
334 if(!stp) {
AddGas(name,temp,pres); }
336 for (
G4int i=0; i<els; ++i) {
355 G4cout <<
"G4NistMaterialBuilder::ConstructNewGasMaterial:"
356 <<
" WARNING: the material <" << name
357 <<
"> is already exist" <<
G4endl;
358 G4cout <<
" New material will NOT be built!"
365 G4cout <<
"G4NistMaterialBuilder::ConstructNewGasMaterial:"
366 <<
" WARNING: the Name <" << nameDB
367 <<
"> is NOT in the DB: no new gas will be constructed"
372 G4cout <<
"G4NistMaterialBuilder::ConstructNewGasMaterial:"
373 <<
" WARNING: <" << nameDB
374 <<
"> is NOT a gas - no new gas will be constructed"
384 G4cout <<
"G4NistMaterialBuilder::ConstructNewGasMaterial: done" <<
G4endl;
394 const std::vector<G4String>& elm,
395 const std::vector<G4int>& nbAtoms,
405 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
406 <<
" WARNING: the material <" << name
407 <<
"> is already exist" <<
G4endl;
408 G4cout <<
" New material will NOT be built!"
414 G4int els = elm.size();
416 G4cout <<
"G4NistMaterialBuilder::ConstructNewMaterial:"
417 <<
" WARNING: empty list of elements for " << name
419 G4cout <<
" New material will NOT be built!"
433 for (
G4int i=0; i<els; ++i) {
440 if (els == 1) {
AddMaterial(name,dens,Z,0.,els,state,stp); }
443 for (
G4int i=0; i<els; ++i) {
448 if(!stp) {
AddGas(name,temp,pres); }
467 G4cout <<
"G4NistMaterialBuilder::AddMaterial WARNING: previous "
469 <<
" is not yet complete!"
471 G4cout <<
" New material " << nameMat <<
" will not be added"
478 names.push_back(nameMat);
489 if (1 == ncomp && Z > 0) {
502 G4cout <<
"New material " << nameMat <<
" is prepeared; "
528 else if (mnam ==
"all") {
536 G4cout <<
"### G4NistMaterialBuilder::ListMaterials: Warning "
537 << mnam <<
" list is not known" <<
G4endl;
545 G4cout <<
"=======================================================" <<
G4endl;
546 G4cout <<
"### Simple Materials from the NIST Data Base ###" <<
G4endl;
547 G4cout <<
"=======================================================" <<
G4endl;
549 G4cout <<
"=======================================================" <<
G4endl;
557 G4cout <<
"=============================================================" <<
G4endl;
558 G4cout <<
"### Compound Materials from the NIST Data Base ##" <<
G4endl;
559 G4cout <<
"=============================================================" <<
G4endl;
560 G4cout <<
" Ncomp Name density(g/cm^3) I(eV) ChFormula" <<
G4endl;
561 G4cout <<
"=============================================================" <<
G4endl;
570 G4cout <<
"=============================================================" <<
G4endl;
572 G4cout <<
"=============================================================" <<
G4endl;
573 G4cout <<
" Ncomp Name density(g/cm^3) I(eV) ChFormula" <<
G4endl;
574 G4cout <<
"=============================================================" <<
G4endl;
582 G4cout <<
"=============================================================" <<
G4endl;
584 G4cout <<
"=============================================================" <<
G4endl;
585 G4cout <<
" Ncomp Name density(g/cm^3) I(eV) ChFormula" <<
G4endl;
586 G4cout <<
"=============================================================" <<
G4endl;
594 G4cout <<
"=============================================================" <<
G4endl;
596 G4cout <<
"=============================================================" <<
G4endl;
597 G4cout <<
" Ncomp Name density(g/cm^3) I(eV) ChFormula" <<
G4endl;
598 G4cout <<
"=============================================================" <<
G4endl;
600 G4cout <<
"=============================================================" <<
G4endl;
607 G4cout << std::setw(2) << i+1 <<
" "
608 << std::setw(6) <<
names[i]
619 G4cout << std::setw(2) << nc <<
" "
620 << std::setw(26) <<
names[i] <<
" "
641 if(nameMat ==
names[i]) {
648 G4cout <<
"WARNING: G4NistMaterialBuilder::AddGas problem: there is no "
649 << nameMat <<
" in the list of materials;"
709 G4cout <<
"### G4NistMaterialBuilder::Initialise()" <<
G4endl;
860 AddMaterial(
"G4_ADIPOSE_TISSUE_ICRP", 0.95, 0, 63.2, 7);
881 AddMaterial(
"G4_ALUMINUM_OXIDE", 3.97, 0, 145.2, 2);
917 AddMaterial(
"G4_BARIUM_FLUORIDE", 4.89 ,0, 375.9, 2);
921 AddMaterial(
"G4_BARIUM_SULFATE", 4.5, 0, 285.7, 3);
930 AddMaterial(
"G4_BERYLLIUM_OXIDE", 3.01, 0, 93.2, 2);
951 AddMaterial(
"G4_BONE_COMPACT_ICRU", 1.85, 0, 91.9, 8);
962 AddMaterial(
"G4_BONE_CORTICAL_ICRP", 1.92, 0, 110, 9);
996 AddMaterial(
"G4_N-BUTYL_ALCOHOL", 0.8098, 0, 59.9, 3);
1008 AddMaterial(
"G4_CADMIUM_TELLURIDE", 6.2, 0, 539.3, 2);
1012 AddMaterial(
"G4_CADMIUM_TUNGSTATE", 7.9, 0, 468.3, 3);
1017 AddMaterial(
"G4_CALCIUM_CARBONATE", 2.8, 0, 136.4, 3);
1022 AddMaterial(
"G4_CALCIUM_FLUORIDE", 3.18, 0, 166., 2);
1026 AddMaterial(
"G4_CALCIUM_OXIDE", 3.3, 0, 176.1, 2);
1030 AddMaterial(
"G4_CALCIUM_SULFATE", 2.96, 0, 152.3, 3);
1035 AddMaterial(
"G4_CALCIUM_TUNGSTATE", 6.062, 0, 395., 3);
1045 AddMaterial(
"G4_CARBON_TETRACHLORIDE", 1.594, 0, 166.3, 2);
1049 AddMaterial(
"G4_CELLULOSE_CELLOPHANE", 1.42, 0, 77.6, 3);
1054 AddMaterial(
"G4_CELLULOSE_BUTYRATE", 1.2, 0, 74.6, 3);
1059 AddMaterial(
"G4_CELLULOSE_NITRATE", 1.49, 0, 87., 4);
1065 AddMaterial(
"G4_CERIC_SULFATE", 1.03, 0, 76.7, 5);
1072 AddMaterial(
"G4_CESIUM_FLUORIDE", 4.115, 0, 440.7, 2);
1076 AddMaterial(
"G4_CESIUM_IODIDE", 4.51, 0, 553.1, 2);
1080 AddMaterial(
"G4_CHLOROBENZENE", 1.1058, 0, 89.1, 3);
1106 AddMaterial(
"G4_1,2-DICHLOROBENZENE", 1.3048, 0, 106.5, 3);
1111 AddMaterial(
"G4_DICHLORODIETHYL_ETHER", 1.2199, 0, 103.3, 4);
1117 AddMaterial(
"G4_1,2-DICHLOROETHANE", 1.2351, 0, 111.9, 3);
1122 AddMaterial(
"G4_DIETHYL_ETHER", 0.71378, 0, 60., 3);
1127 AddMaterial(
"G4_N,N-DIMETHYL_FORMAMIDE", 0.9487, 0, 66.6, 4);
1133 AddMaterial(
"G4_DIMETHYL_SULFOXIDE", 1.1014, 0, 98.6, 4);
1143 AddMaterial(
"G4_ETHYL_ALCOHOL", 0.7893, 0, 62.9, 3);
1148 AddMaterial(
"G4_ETHYL_CELLULOSE", 1.13, 0, 69.3, 3);
1157 AddMaterial(
"G4_EYE_LENS_ICRP", 1.07, 0, 73.3, 8);
1175 AddMaterial(
"G4_FERROUS_OXIDE", 5.7, 0, 248.6, 2);
1179 AddMaterial(
"G4_FERROUS_SULFATE", 1.024, 0, 76.4, 7);
1213 AddMaterial(
"G4_GADOLINIUM_OXYSULFIDE", 7.44, 0, 493.3, 3);
1218 AddMaterial(
"G4_GALLIUM_ARSENIDE", 5.31, 0, 384.9, 2);
1222 AddMaterial(
"G4_GEL_PHOTO_EMULSION", 1.2914, 0, 74.8, 5);
1295 AddMaterial(
"G4_LANTHANUM_OXYBROMIDE", 6.28, 0, 439.7, 3);
1300 AddMaterial(
"G4_LANTHANUM_OXYSULFIDE", 5.86, 0, 421.2, 3);
1309 AddMaterial(
"G4_LITHIUM_AMIDE", 1.178, 0, 55.5, 3);
1314 AddMaterial(
"G4_LITHIUM_CARBONATE", 2.11, 0, 87.9, 3);
1319 AddMaterial(
"G4_LITHIUM_FLUORIDE", 2.635, 0, 94., 2);
1323 AddMaterial(
"G4_LITHIUM_HYDRIDE", 0.82, 0, 36.5, 2);
1327 AddMaterial(
"G4_LITHIUM_IODIDE", 3.494, 0, 485.1, 2);
1331 AddMaterial(
"G4_LITHIUM_OXIDE", 2.013, 0, 73.6, 2);
1335 AddMaterial(
"G4_LITHIUM_TETRABORATE", 2.44, 0, 94.6, 3);
1362 AddMaterial(
"G4_MAGNESIUM_CARBONATE", 2.958, 0, 118., 3);
1367 AddMaterial(
"G4_MAGNESIUM_FLUORIDE", 3.0, 0, 134.3, 2);
1371 AddMaterial(
"G4_MAGNESIUM_OXIDE", 3.58, 0, 143.8, 2);
1375 AddMaterial(
"G4_MAGNESIUM_TETRABORATE", 2.53, 0, 108.3, 3);
1380 AddMaterial(
"G4_MERCURIC_IODIDE", 6.36, 0, 684.5, 2);
1408 AddMaterial(
"G4_MUSCLE_SKELETAL_ICRP", 1.05, 0, 75.3, 9);
1420 AddMaterial(
"G4_MUSCLE_STRIATED_ICRU", 1.04, 0, 74.7, 8);
1430 AddMaterial(
"G4_MUSCLE_WITH_SUCROSE", 1.11, 0, 74.3, 4);
1436 AddMaterial(
"G4_MUSCLE_WITHOUT_SUCROSE", 1.07, 0, 74.2, 4);
1446 AddMaterial(
"G4_NITROBENZENE", 1.19867, 0, 75.8, 4);
1474 AddMaterial(
"G4_NYLON-11_RILSAN", 1.425, 0, 61.6, 4);
1492 AddMaterial(
"G4_PHOTO_EMULSION", 3.815, 0, 331., 8);
1502 AddMaterial(
"G4_PLASTIC_SC_VINYLTOLUENE", 1.032, 0, 64.7, 2);
1511 AddMaterial(
"G4_PLUTONIUM_DIOXIDE", 11.46, 0, 746.5, 2);
1515 AddMaterial(
"G4_POLYACRYLONITRILE", 1.17, 0, 69.6, 3);
1525 AddMaterial(
"G4_POLYCHLOROSTYRENE", 1.3, 0, 81.7, 3);
1551 AddMaterial(
"G4_POLYOXYMETHYLENE", 1.425 ,0, 77.4, 3);
1569 AddMaterial(
"G4_POLYTRIFLUOROCHLOROETHYLENE", 2.1, 0, 120.7, 3);
1575 AddMaterial(
"G4_POLYVINYL_ACETATE", 1.19, 0, 73.7, 3);
1580 AddMaterial(
"G4_POLYVINYL_ALCOHOL", 1.3, 0, 69.7, 3);
1585 AddMaterial(
"G4_POLYVINYL_BUTYRAL", 1.12, 0, 67.2, 3);
1596 AddMaterial(
"G4_POLYVINYL_CHLORIDE", 1.3, 0, 108.2, 3);
1601 AddMaterial(
"G4_POLYVINYLIDENE_CHLORIDE", 1.7, 0, 134.3, 3);
1606 AddMaterial(
"G4_POLYVINYLIDENE_FLUORIDE", 1.76, 0, 88.8, 3);
1611 AddMaterial(
"G4_POLYVINYL_PYRROLIDONE", 1.25, 0, 67.7, 4);
1617 AddMaterial(
"G4_POTASSIUM_IODIDE", 3.13, 0, 431.9, 2);
1621 AddMaterial(
"G4_POTASSIUM_OXIDE", 2.32, 0, 189.9, 2);
1633 AddMaterial(
"G4_N-PROPYL_ALCOHOL", 0.8035, 0, 61.1, 3);
1647 AddMaterial(
"G4_RUBBER_NATURAL", 0.92, 0, 59.8, 2);
1651 AddMaterial(
"G4_RUBBER_NEOPRENE", 1.23, 0, 93., 3);
1656 AddMaterial(
"G4_SILICON_DIOXIDE", 2.32, 0, 139.2, 2);
1661 AddMaterial(
"G4_SILVER_BROMIDE", 6.473, 0, 486.6, 2);
1665 AddMaterial(
"G4_SILVER_CHLORIDE", 5.56, 0, 398.4, 2);
1669 AddMaterial(
"G4_SILVER_HALIDES", 6.47, 0, 487.1, 3);
1674 AddMaterial(
"G4_SILVER_IODIDE", 6.01, 0, 543.5, 2);
1689 AddMaterial(
"G4_SODIUM_CARBONATE", 2.532, 0, 125., 3);
1694 AddMaterial(
"G4_SODIUM_IODIDE", 3.667, 0, 452., 2);
1698 AddMaterial(
"G4_SODIUM_MONOXIDE", 2.27, 0, 148.8, 2);
1702 AddMaterial(
"G4_SODIUM_NITRATE", 2.261, 0, 114.6, 3);
1736 AddMaterial(
"G4_TETRACHLOROETHYLENE", 1.625, 0, 159.2, 2);
1740 AddMaterial(
"G4_THALLIUM_CHLORIDE", 7.004, 0, 690.3, 2);
1745 AddMaterial(
"G4_TISSUE_SOFT_ICRP", 1.03, 0, 72.3, 9);
1757 AddMaterial(
"G4_TISSUE_SOFT_ICRU-4", 1.0, 0, 74.9, 4);
1775 AddMaterial(
"G4_TITANIUM_DIOXIDE", 4.26, 0, 179.5, 2);
1783 AddMaterial(
"G4_TRICHLOROETHYLENE", 1.46, 0, 148.1, 3);
1788 AddMaterial(
"G4_TRIETHYL_PHOSPHATE", 1.07, 0, 81.2, 4);
1794 AddMaterial(
"G4_TUNGSTEN_HEXAFLUORIDE", 2.4, 0, 354.4, 2);
1798 AddMaterial(
"G4_URANIUM_DICARBIDE", 11.28, 0, 752., 2);
1802 AddMaterial(
"G4_URANIUM_MONOCARBIDE", 13.63, 0, 862., 2);
1806 AddMaterial(
"G4_URANIUM_OXIDE", 10.96, 0, 720.6, 2);
1885 AddMaterial(
"G4_STAINLESS-STEEL", 8.00, 0, 0.0, 3);
G4Material * BuildNistMaterial(const G4String &matname, G4bool warning)
static constexpr double kelvin
G4Material * FindOrBuildSimpleMaterial(G4int Z, G4bool warning)
void ListNistSimpleMaterials() const
std::vector< G4bool > atomCount
static constexpr double hep_pascal
G4double FindMeanExcitationEnergy(const G4Material *) const
static const G4double NTP_Temperature
static constexpr double cm3
static G4MaterialTable * GetMaterialTable()
void ListNistCompoundMaterials() const
static constexpr double g
void AddGas(const G4String &nameMat, G4double t=NTP_Temperature, G4double p=CLHEP::STP_Pressure)
std::vector< G4int > indexes
G4Material * FindMaterial(const G4String &name) const
void ListHepMaterials() const
void SetMeanExcitationEnergy(G4double value)
void NistSimpleMaterials()
void DumpMix(G4int) const
static constexpr double universe_mean_density
void NistCompoundMaterials()
std::vector< G4double > ionPotentials
std::vector< G4bool > STP
G4NistElementBuilder * elmBuilder
static constexpr double STP_Pressure
std::vector< G4double > gasPressure
std::vector< G4int > components
void ListBioChemicalMaterials() const
static constexpr double g
std::vector< G4int > elements
static constexpr double amu_c2
std::vector< G4String > names
#define G4MUTEX_INITIALIZER
static constexpr double Avogadro
void ListMaterials(const G4String &) const
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=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
void NistCompoundMaterials2()
G4Material * ConstructNewGasMaterial(const G4String &name, const G4String &nameDB, G4double temp, G4double pres, G4bool isotopes=true)
G4double GetAtomicMassAmu(const G4String &symb) const
std::vector< G4double > gasTemperature
void BioChemicalMaterials()
G4Element * FindOrBuildElement(G4int Z, G4bool buildIsotopes=true)
G4Material * FindSimpleMaterial(G4int Z) const
static constexpr double eV
void AddElementByAtomCount(G4int Z, G4int)
static constexpr double eV
G4double GetMeanExcitationEnergy() const
std::vector< G4double > densities
std::vector< G4int > idxGas
#define G4MUTEXUNLOCK(mutex)
std::vector< G4String > chFormulas
std::vector< G4State > states
std::vector< G4Material * > G4MaterialTable
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void SetChemicalFormula(const G4String &chF)
G4double GetPressure() const
void DumpElm(G4int) const
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=true)
static constexpr double k_Boltzmann
void HepAndNuclearMaterials()
void AddElement(G4Element *element, G4int nAtoms)
G4IonisParamMat * GetIonisation() const
#define G4MUTEXLOCK(mutex)
G4Material * ConstructNewIdealGasMaterial(const G4String &name, const std::vector< G4String > &elm, const std::vector< G4int > &nbAtoms, G4bool isotopes=true, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
G4GLOB_DLL std::ostream G4cout
void SetVerbose(G4int val)
void AddMaterial(const G4String &nameMat, G4double dens, G4int Z=0, G4double pot=0.0, G4int ncomp=1, G4State=kStateSolid, G4bool stp=true)
G4Material * BuildMaterial(G4int idx)
G4int GetZ(const G4String &symb) const
void AddElementByWeightFraction(G4int Z, G4double)
G4NistMaterialBuilder(G4NistElementBuilder *, G4int verb=0)
void ListSpaceMaterials() const
static constexpr double cm3
std::vector< G4int > matIndex
G4double GetTemperature() const
std::vector< G4double > fractions
G4double GetDensity() const