97 if (density < universe_mean_density)
99 G4cout <<
" G4Material WARNING:"
100 <<
" define a material with density=0 is not allowed. \n"
101 <<
" The material " << name <<
" will be constructed with the"
102 <<
" default minimal density: " << universe_mean_density/(
g/
cm3)
104 density = universe_mean_density;
118 const std::vector<G4String> elmnames =
122 if(iz < (
G4int)elmnames.size()) {
126 enam =
"ELM_" +
name;
156 if (density < universe_mean_density)
158 G4cout <<
"--- Warning from G4Material::G4Material()"
159 <<
" define a material with density=0 is not allowed. \n"
160 <<
" The material " << name <<
" will be constructed with the"
161 <<
" default minimal density: " << universe_mean_density/(
g/
cm3)
163 density = universe_mean_density;
195 if (density < universe_mean_density)
197 G4cout <<
"--- Warning from G4Material::G4Material()"
198 <<
" define a material with density=0 is not allowed. \n"
199 <<
" The material " << name <<
" will be constructed with the"
200 <<
" default minimal density: " << universe_mean_density/(
g/
cm3)
202 density = universe_mean_density;
288 G4cout <<
"G4Material WARNING: duplicate name of material "
310 Zi = (*theElementVector)[i]->GetZ();
311 Ai = (*theElementVector)[i]->GetA();
376 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" nElement= "
379 "Attempt to add more than the declared number of elements.");
406 if(fraction < 0.0 || fraction > 1.0) {
407 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" and "
408 << element->
GetName() <<
" mass fraction= " << fraction
409 <<
" is wrong " <<
G4endl;
411 "Attempt to add element with wrong mass fraction");
431 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" nElement= "
434 "Attempt to add more than the declared number of elements.");
450 G4cerr <<
"WARNING !! for " <<
fName <<
" sum of fractional masses "
451 << wtSum <<
" is not 1 - results may be wrong"
469 if(fraction < 0.0 || fraction > 1.0) {
470 G4cout <<
"G4Material::AddMaterial ERROR for " <<
fName <<
" and "
471 << material->
GetName() <<
" mass fraction= " << fraction
474 "Attempt to add material with wrong mass fraction");
490 for(
G4int i=0; i<nold; ++i) {
502 for (
G4int elm=0; elm<nelm; ++elm)
522 G4cout <<
"G4Material::AddMaterial ERROR for " <<
fName <<
" nElement= "
525 "Attempt to add more than the declared number of components.");
540 G4cout <<
"G4Material::AddMaterial WARNING !! for " <<
fName
541 <<
" sum of fractional masses "
542 << wtSum <<
" is not 1 - results may be wrong"
570 static const G4double twothird = 2.0/3.0;
574 G4double A = (*theElementVector)[i]->GetN();
581 NILinv *= amu/lambda0;
613 G4cout <<
"G4Material::GetMaterial() WARNING: The material: "
615 <<
" does not exist in the table. Return NULL pointer."
626 G4cout <<
"G4Material ERROR in GetZ. The material: " <<
fName
629 "the Atomic number is not well defined." );
639 G4cout <<
"G4Material ERROR in GetA. The material: " <<
fName
642 "the Atomic mass is not well defined." );
652 std::ios::fmtflags mode = flux.flags();
653 flux.setf(std::ios::fixed,std::ios::floatfield);
657 <<
" Material: " << std::setw(8) << material->
fName
659 <<
" density: " << std::setw(6) << std::setprecision(3)
661 <<
" RadL: " << std::setw(7) << std::setprecision(3)
663 <<
" Nucl.Int.Length: " << std::setw(7) << std::setprecision(3)
665 <<
"\n" << std::setw(30)
666 <<
" Imean: " << std::setw(7) << std::setprecision(3)
672 <<
" temperature: " << std::setw(6) << std::setprecision(2)
674 <<
" pressure: " << std::setw(6) << std::setprecision(2)
682 <<
"\n ElmMassFraction: "
683 << std::setw(6)<< std::setprecision(2)
685 <<
" ElmAbundance " << std::setw(6)<< std::setprecision(2)
690 flux.precision(prec);
691 flux.setf(mode,std::ios::floatfield);
712 flux <<
"\n***** Table : Nb of materials = " << MaterialTable.size()
715 for (
size_t i=0; i<MaterialTable.size(); ++i) {
static G4MaterialTable theMaterialTable
G4IonisParamMat * GetIonisation() const
void InitializePointers()
G4double GetTotNbOfElectPerVolume() const
std::vector< G4Element * > G4ElementVector
static constexpr double cm2
void CopyPointersOfBaseMaterial()
const G4Material * fBaseMaterial
void AddMaterial(G4Material *material, G4double fraction)
std::vector< ExP01TrackerHit * > a
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
const G4String & GetChemicalFormula() const
void SetMeanExcitationEnergy(G4double value)
static constexpr double perCent
const G4String & GetName() const
G4ElementVector * theElementVector
const std::vector< G4String > & GetNistElementNames() const
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
G4double GetDensity() const
G4int fNumberOfComponents
const char * name(G4int ptype)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4IonisParamMat * fIonisation
void ComputeDerivedQuantities()
static constexpr double g
G4double * fMassFractionVector
const G4ElementVector * GetElementVector() const
static G4NistManager * Instance()
G4SandiaTable * GetSandiaTable() const
G4SandiaTable * fSandiaTable
virtual G4bool IsExtended() const
const G4double * GetVecNbOfAtomsPerVolume() const
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
G4double TotNbOfAtomsPerVolume
G4MaterialPropertiesTable * fMaterialPropertiesTable
void Print(const std::vector< T > &data)
static size_t GetNumberOfMaterials()
static constexpr double kelvin
G4double GetRadlen() const
static constexpr double cm3
G4Material(const G4String &name, G4double z, G4double a, G4double density, G4State state=kStateUndefined, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4String fChemicalFormula
G4double GetTotNbOfAtomsPerVolume() const
std::ostream & operator<<(std::ostream &flux, const G4Material *material)
void ComputeNuclearInterLength()
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
G4double GetMassOfMolecule() const
G4double TotNbOfElectPerVolume
const G4int * GetAtomsVector() const
G4double GetMeanExcitationEnergy() const
void AddElement(G4Element *element, G4int nAtoms)
size_t GetNumberOfElements() const
static constexpr double perThousand
void ComputeRadiationLength()
const G4String & GetName() const
std::map< G4Material *, G4double > fMatComponents
const G4double * GetFractionVector() const
static constexpr double atmosphere
G4double * VecNbOfAtomsPerVolume
G4double GetNuclearInterLength() const
G4GLOB_DLL std::ostream G4cerr