95 if (density < universe_mean_density)
97 G4cout <<
" G4Material WARNING:"
98 <<
" define a material with density=0 is not allowed. \n"
99 <<
" The material " << name <<
" will be constructed with the"
100 <<
" default minimal density: " << universe_mean_density/(
g/
cm3)
102 density = universe_mean_density;
117 const std::vector<G4String> elmnames =
121 if(iz < (
G4int)elmnames.size()) {
125 enam =
"ELM_" +
name;
155 if (density < universe_mean_density)
157 G4cout <<
"--- Warning from G4Material::G4Material()"
158 <<
" define a material with density=0 is not allowed. \n"
159 <<
" The material " << name <<
" will be constructed with the"
160 <<
" default minimal density: " << universe_mean_density/(
g/
cm3)
162 density = universe_mean_density;
194 if (density < universe_mean_density)
196 G4cout <<
"--- Warning from G4Material::G4Material()"
197 <<
" define a material with density=0 is not allowed. \n"
198 <<
" The material " << name <<
" will be constructed with the"
199 <<
" default minimal density: " << universe_mean_density/(
g/
cm3)
201 density = universe_mean_density;
228 : fChemicalFormula(
""), fDensity(0.0), fState(
kStateUndefined), fTemp(0.0),
229 fPressure(0.0), maxNbComponents(0), fArrayLength(0), fNumberOfComponents(0),
230 fNumberOfElements(0), theElementVector(0), fImplicitElement(false),
231 fMassFractionVector(0), fAtomsVector(0), fMaterialPropertiesTable(0),
232 fIndexInTable(0), VecNbOfAtomsPerVolume(0), TotNbOfAtomsPerVolume(0),
233 TotNbOfElectPerVolume(0), fRadlen(0.0), fNuclInterLen(0.0),
234 fIonisation(0), fSandiaTable(0), fBaseMaterial(0), fMassOfMolecule(0.0)
292 G4cout <<
"G4Material WARNING: duplicate name of material "
314 Zi = (*theElementVector)[i]->GetZ();
315 Ai = (*theElementVector)[i]->GetA();
378 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" nElement= "
381 "Attempt to add more than the declared number of elements.");
408 if(fraction < 0.0 || fraction > 1.0) {
409 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" and "
410 << element->
GetName() <<
" mass fraction= " << fraction
411 <<
" is wrong " <<
G4endl;
413 "Attempt to add element with wrong mass fraction");
433 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" nElement= "
436 "Attempt to add more than the declared number of elements.");
452 G4cerr <<
"WARNING !! for " <<
fName <<
" sum of fractional masses "
453 << wtSum <<
" is not 1 - results may be wrong"
471 if(fraction < 0.0 || fraction > 1.0) {
472 G4cout <<
"G4Material::AddMaterial ERROR for " <<
fName <<
" and "
473 << material->
GetName() <<
" mass fraction= " << fraction
476 "Attempt to add material with wrong mass fraction");
492 for(
G4int i=0; i<nold; ++i) {
504 for (
G4int elm=0; elm<nelm; ++elm)
524 G4cout <<
"G4Material::AddMaterial ERROR for " <<
fName <<
" nElement= "
527 "Attempt to add more than the declared number of components.");
542 G4cout <<
"G4Material::AddMaterial WARNING !! for " <<
fName
543 <<
" sum of fractional masses "
544 << wtSum <<
" is not 1 - results may be wrong"
575 G4double A = (*theElementVector)[i]->GetN();
582 NILinv *= amu/lambda0;
614 G4cout <<
"G4Material::GetMaterial() WARNING: The material: "
616 <<
" does not exist in the table. Return NULL pointer."
635 G4cout <<
"G4Material ERROR in GetZ. The material: " <<
fName
638 "the Atomic number is not well defined." );
648 G4cout <<
"G4Material ERROR in GetA. The material: " <<
fName
651 "the Atomic mass is not well defined." );
725 std::ios::fmtflags mode = flux.flags();
726 flux.setf(std::ios::fixed,std::ios::floatfield);
730 <<
" Material: " << std::setw(8) << material->
fName
732 <<
" density: " << std::setw(6) << std::setprecision(3)
734 <<
" RadL: " << std::setw(7) << std::setprecision(3)
736 <<
" Nucl.Int.Length: " << std::setw(7) << std::setprecision(3)
738 <<
"\n" << std::setw(30)
739 <<
" Imean: " << std::setw(7) << std::setprecision(3)
745 <<
" temperature: " << std::setw(6) << std::setprecision(2)
747 <<
" pressure: " << std::setw(6) << std::setprecision(2)
755 <<
"\n ElmMassFraction: "
756 << std::setw(6)<< std::setprecision(2)
758 <<
" ElmAbundance " << std::setw(6)<< std::setprecision(2)
763 flux.precision(prec);
764 flux.setf(mode,std::ios::floatfield);
782 flux <<
"\n***** Table : Nb of materials = " << MaterialTable.size()
785 for (
size_t i=0; i<MaterialTable.size(); ++i) {
static G4MaterialTable theMaterialTable
G4IonisParamMat * GetIonisation() const
void InitializePointers()
G4int operator==(const G4Material &) const
G4double GetTotNbOfElectPerVolume() const
std::vector< G4Element * > G4ElementVector
void CopyPointersOfBaseMaterial()
const G4Material * fBaseMaterial
void AddMaterial(G4Material *material, G4double fraction)
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
const G4String & GetChemicalFormula() const
void SetMeanExcitationEnergy(G4double value)
const G4String & GetName() const
G4ElementVector * theElementVector
const std::vector< G4String > & GetNistElementNames() const
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
G4double GetDensity() const
G4int fNumberOfComponents
static const double perThousand
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4IonisParamMat * fIonisation
void ComputeDerivedQuantities()
G4double * fMassFractionVector
const G4ElementVector * GetElementVector() const
static G4NistManager * Instance()
G4SandiaTable * GetSandiaTable() const
G4SandiaTable * fSandiaTable
const G4double * GetVecNbOfAtomsPerVolume() const
G4GLOB_DLL std::ostream G4cout
G4double TotNbOfAtomsPerVolume
G4MaterialPropertiesTable * fMaterialPropertiesTable
static const double perCent
static size_t GetNumberOfMaterials()
static const G4double A[nN]
G4double GetRadlen() const
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)
static const double kelvin
G4String fChemicalFormula
G4double GetTotNbOfAtomsPerVolume() const
std::ostream & operator<<(std::ostream &flux, const G4Material *material)
static const G4double factor
G4int operator!=(const G4Material &) const
void ComputeNuclearInterLength()
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
G4double GetMassOfMolecule() const
G4double TotNbOfElectPerVolume
static const double atmosphere
const G4int * GetAtomsVector() const
G4double GetMeanExcitationEnergy() const
void AddElement(G4Element *element, G4int nAtoms)
size_t GetNumberOfElements() const
void ComputeRadiationLength()
const G4String & GetName() const
std::map< G4Material *, G4double > fMatComponents
const G4double * GetFractionVector() const
G4double * VecNbOfAtomsPerVolume
G4double GetNuclearInterLength() const
G4GLOB_DLL std::ostream G4cerr