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();
377 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" nElement= "
380 "Attempt to add more than the declared number of elements.");
407 if(fraction < 0.0 || fraction > 1.0) {
408 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" and "
409 << element->
GetName() <<
" mass fraction= " << fraction
410 <<
" is wrong " <<
G4endl;
412 "Attempt to add element with wrong mass fraction");
432 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" nElement= "
435 "Attempt to add more than the declared number of elements.");
451 G4cerr <<
"WARNING !! for " <<
fName <<
" sum of fractional masses "
452 << wtSum <<
" is not 1 - results may be wrong"
470 if(fraction < 0.0 || fraction > 1.0) {
471 G4cout <<
"G4Material::AddMaterial ERROR for " <<
fName <<
" and "
472 << material->
GetName() <<
" mass fraction= " << fraction
475 "Attempt to add material with wrong mass fraction");
491 for(
G4int i=0; i<nold; ++i) {
503 for (
size_t elm=0; elm<nelm; ++elm)
523 G4cout <<
"G4Material::AddMaterial ERROR for " <<
fName <<
" nElement= "
526 "Attempt to add more than the declared number of components.");
541 G4cout <<
"G4Material::AddMaterial WARNING !! for " <<
fName
542 <<
" sum of fractional masses "
543 << wtSum <<
" is not 1 - results may be wrong"
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."
634 G4cout <<
"G4Material ERROR in GetZ. The material: " <<
fName
637 "the Atomic number is not well defined." );
647 G4cout <<
"G4Material ERROR in GetA. The material: " <<
fName
650 "the Atomic mass is not well defined." );
724 std::ios::fmtflags mode = flux.flags();
725 flux.setf(std::ios::fixed,std::ios::floatfield);
729 <<
" Material: " << std::setw(8) << material->
fName
731 <<
" density: " << std::setw(6) << std::setprecision(3)
733 <<
" RadL: " << std::setw(7) << std::setprecision(3)
735 <<
" Nucl.Int.Length: " << std::setw(7) << std::setprecision(3)
737 <<
" Imean: " << std::setw(7) << std::setprecision(3)
742 <<
" temperature: " << std::setw(6) << std::setprecision(2)
744 <<
" pressure: " << std::setw(6) << std::setprecision(2)
752 <<
"\n ElmMassFraction: "
753 << std::setw(6)<< std::setprecision(2)
755 <<
" ElmAbundance " << std::setw(6)<< std::setprecision(2)
760 flux.precision(prec);
761 flux.setf(mode,std::ios::floatfield);
779 flux <<
"\n***** Table : Nb of materials = " << MaterialTable.size()
782 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
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
size_t fNumberOfComponents
static G4NistManager * Instance()
std::ostream & operator<<(std::ostream &flux, G4Material *material)
G4Material(const G4String &name, G4double z, G4double a, G4double density, G4State state=kStateUndefined, G4double temp=CLHEP::STP_Temperature, G4double pressure=CLHEP::STP_Pressure)
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
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static const double kelvin
G4String fChemicalFormula
G4double GetTotNbOfAtomsPerVolume() const
G4int operator!=(const G4Material &) const
void ComputeNuclearInterLength()
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
G4double GetMassOfMolecule() const
G4double TotNbOfElectPerVolume
const G4Material & operator=(const G4Material &)
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