86 #ifdef G4MULTITHREADED
103 G4cout <<
" G4Material WARNING:"
104 <<
" define a material with density=0 is not allowed. \n"
105 <<
" The material " << name <<
" will be constructed with the"
122 const std::vector<G4String> elmnames =
126 if(iz < (
G4int)elmnames.size()) {
130 enam =
"ELM_" +
name;
162 G4cout <<
"--- Warning from G4Material::G4Material()"
163 <<
" define a material with density=0 is not allowed. \n"
164 <<
" The material " << name <<
" will be constructed with the"
201 G4cout <<
"--- Warning from G4Material::G4Material()"
202 <<
" define a material with density=0 is not allowed. \n"
203 <<
" The material " << name <<
" will be constructed with the"
292 G4cout <<
"G4Material WARNING: duplicate name of material "
314 Zi = (*theElementVector)[i]->GetZ();
315 Ai = (*theElementVector)[i]->GetA();
382 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" nElement= "
385 "Attempt to add more than the declared number of elements.");
412 if(fraction < 0.0 || fraction > 1.0) {
413 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" and "
414 << element->
GetName() <<
" mass fraction= " << fraction
415 <<
" is wrong " <<
G4endl;
417 "Attempt to add element with wrong mass fraction");
437 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" nElement= "
440 "Attempt to add more than the declared number of elements.");
456 G4cerr <<
"WARNING !! for " <<
fName <<
" sum of fractional masses "
457 << wtSum <<
" is not 1 - results may be wrong"
475 if(fraction < 0.0 || fraction > 1.0) {
476 G4cout <<
"G4Material::AddMaterial ERROR for " <<
fName <<
" and "
477 << material->
GetName() <<
" mass fraction= " << fraction
480 "Attempt to add material with wrong mass fraction");
496 for(
G4int i=0; i<nold; ++i) {
508 for (
G4int elm=0; elm<nelm; ++elm)
528 G4cout <<
"G4Material::AddMaterial ERROR for " <<
fName <<
" nElement= "
531 "Attempt to add more than the declared number of components.");
546 G4cout <<
"G4Material::AddMaterial WARNING !! for " <<
fName
547 <<
" sum of fractional masses "
548 << wtSum <<
" is not 1 - results may be wrong"
576 static const G4double twothird = 2.0/3.0;
580 G4double A = (*theElementVector)[i]->GetN();
587 NILinv *=
amu/lambda0;
619 G4cout <<
"G4Material::GetMaterial() WARNING: The material: "
621 <<
" does not exist in the table. Return NULL pointer."
632 G4cout <<
"G4Material ERROR in GetZ. The material: " <<
fName
635 "the Atomic number is not well defined." );
645 G4cout <<
"G4Material ERROR in GetA. The material: " <<
fName
648 "the Atomic mass is not well defined." );
658 std::ios::fmtflags mode = flux.flags();
659 flux.setf(std::ios::fixed,std::ios::floatfield);
663 <<
" Material: " << std::setw(8) << material->
fName
665 <<
" density: " << std::setw(6) << std::setprecision(3)
667 <<
" RadL: " << std::setw(7) << std::setprecision(3)
669 <<
" Nucl.Int.Length: " << std::setw(7) << std::setprecision(3)
671 <<
"\n" << std::setw(30)
672 <<
" Imean: " << std::setw(7) << std::setprecision(3)
675 <<
" temperature: " << std::setw(6) << std::setprecision(2)
677 <<
" pressure: " << std::setw(6) << std::setprecision(2)
683 <<
"\n ElmMassFraction: "
684 << std::setw(6)<< std::setprecision(2)
686 <<
" ElmAbundance " << std::setw(6)<< std::setprecision(2)
691 flux.precision(prec);
692 flux.setf(mode,std::ios::floatfield);
713 flux <<
"\n***** Table : Nb of materials = " << MaterialTable.size()
716 for (
size_t i=0; i<MaterialTable.size(); ++i) {
733 #ifdef G4MULTITHREADED
738 #ifdef G4MULTITHREADED
static constexpr double kelvin
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
static G4MaterialTable theMaterialTable
static constexpr double atmosphere
G4double TotNbOfElectPerVolume
const G4double * GetFractionVector() const
std::vector< ExP01TrackerHit * > a
static size_t GetNumberOfMaterials()
void InitializePointers()
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
static G4MaterialTable * GetMaterialTable()
G4double * fMassFractionVector
const G4String & GetName() const
static constexpr double g
std::map< G4Material *, G4double > fMatComponents
G4double GetRadlen() const
static constexpr double perCent
const G4ElementVector * GetElementVector() const
void SetMeanExcitationEnergy(G4double value)
virtual G4bool IsExtended() const
const G4double * GetVecNbOfAtomsPerVolume() const
G4SandiaTable * fSandiaTable
const G4int * GetAtomsVector() const
static constexpr double universe_mean_density
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
G4double G4Log(G4double x)
const G4String & GetName() const
G4double GetTotNbOfElectPerVolume() const
static constexpr double g
const std::vector< G4String > & GetNistElementNames() const
#define G4MUTEX_INITIALIZER
static constexpr double Avogadro
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
const G4Material * fBaseMaterial
void ComputeNuclearInterLength()
const G4String & GetChemicalFormula() const
G4String fChemicalFormula
G4IonisParamMat * fIonisation
double A(double temperature)
G4double GetMeanExcitationEnergy() const
void Print(G4Element &ele)
G4GLOB_DLL std::ostream G4cerr
#define G4MUTEXUNLOCK(mutex)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
std::vector< G4Material * > G4MaterialTable
static constexpr double cm2
G4double TotNbOfAtomsPerVolume
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4Element * > G4ElementVector
static constexpr double kGasThreshold
void AddElement(G4Element *element, G4int nAtoms)
void ComputeRadiationLength()
G4IonisParamMat * GetIonisation() const
#define G4MUTEXLOCK(mutex)
G4GLOB_DLL std::ostream G4cout
G4int fNumberOfComponents
G4SandiaTable * GetSandiaTable() const
G4double * VecNbOfAtomsPerVolume
G4ElementVector * theElementVector
G4Material(const G4String &name, G4double z, G4double a, G4double density, G4State state=kStateUndefined, G4double temp=NTP_Temperature, G4double pressure=CLHEP::STP_Pressure)
static constexpr double amu
G4double GetTotNbOfAtomsPerVolume() const
void ComputeDerivedQuantities()
G4MaterialPropertiesTable * fMaterialPropertiesTable
void AddMaterial(G4Material *material, G4double fraction)
static constexpr double cm3
G4double GetNuclearInterLength() const
static constexpr double perThousand
void CopyPointersOfBaseMaterial()
G4double GetMassOfMolecule() const
size_t GetNumberOfElements() const
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
static G4NistManager * Instance()
G4double GetDensity() const