94 if (density < universe_mean_density)
96 G4cout <<
" G4Material WARNING:"
97 <<
" define a material with density=0 is not allowed. \n"
98 <<
" The material " << name <<
" will be constructed with the"
99 <<
" default minimal density: " << universe_mean_density/(
g/
cm3)
101 density = universe_mean_density;
141 if (density < universe_mean_density)
143 G4cout <<
"--- Warning from G4Material::G4Material()"
144 <<
" define a material with density=0 is not allowed. \n"
145 <<
" The material " << name <<
" will be constructed with the"
146 <<
" default minimal density: " << universe_mean_density/(
g/
cm3)
148 density = universe_mean_density;
180 if (density < universe_mean_density)
182 G4cout <<
"--- Warning from G4Material::G4Material()"
183 <<
" define a material with density=0 is not allowed. \n"
184 <<
" The material " << name <<
" will be constructed with the"
185 <<
" default minimal density: " << universe_mean_density/(
g/
cm3)
187 density = universe_mean_density;
214 : fNumberOfComponents(0), fNumberOfElements(0), theElementVector(0),
215 fImplicitElement(false), fMassFractionVector(0), fAtomsVector(0),
216 fMaterialPropertiesTable(0), fIndexInTable(0),
217 VecNbOfAtomsPerVolume(0)
276 G4cout <<
"G4Material WARNING: doublicate name of the new material "
298 Zi = (*theElementVector)[i]->GetZ();
299 Ai = (*theElementVector)[i]->GetA();
359 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" nElement= "
362 "Attempt to add more than the declared number of elements.");
389 if(fraction < 0.0 || fraction > 1.0) {
390 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" and "
391 << element->
GetName() <<
" mass fraction= " << fraction
392 <<
" is wrong " <<
G4endl;
394 "Attempt to add element with wrong mass fraction");
414 G4cout <<
"G4Material::AddElement ERROR for " <<
fName <<
" nElement= "
417 "Attempt to add more than the declared number of elements.");
433 G4cerr <<
"WARNING !! for " <<
fName <<
" sum of fractional masses "
434 << wtSum <<
" is not 1 - results may be wrong"
452 if(fraction < 0.0 || fraction > 1.0) {
453 G4cout <<
"G4Material::AddMaterial ERROR for " <<
fName <<
" and "
454 << material->
GetName() <<
" mass fraction= " << fraction
457 "Attempt to add material with wrong mass fraction");
473 for(
G4int i=0; i<nold; ++i) {
485 for (
size_t elm=0; elm<nelm; ++elm)
505 G4cout <<
"G4Material::AddMaterial ERROR for " <<
fName <<
" nElement= "
508 "Attempt to add more than the declared number of components.");
523 G4cout <<
"G4Material::AddMaterial WARNING !! for " <<
fName
524 <<
" sum of fractional masses "
525 << wtSum <<
" is not 1 - results may be wrong"
558 NILinv *= amu/lambda0;
589 G4cout <<
"G4Material::GetMaterial() WARNING: The material: "
590 << materialName <<
" does not exist in the table. Return NULL pointer."
609 G4cout <<
"G4Material ERROR in GetZ. The material: " <<
fName
612 "the Atomic number is not well defined." );
622 G4cout <<
"G4Material ERROR in GetA. The material: " <<
fName
625 "the Atomic mass is not well defined." );
699 std::ios::fmtflags mode = flux.flags();
700 flux.setf(std::ios::fixed,std::ios::floatfield);
704 <<
" Material: " << std::setw(8) << material->
fName
706 <<
" density: " << std::setw(6) << std::setprecision(3)
708 <<
" RadL: " << std::setw(7) << std::setprecision(3)
710 <<
" Nucl.Int.Length: " << std::setw(7) << std::setprecision(3)
712 <<
" Imean: " << std::setw(7) << std::setprecision(3)
717 <<
" temperature: " << std::setw(6) << std::setprecision(2)
719 <<
" pressure: " << std::setw(6) << std::setprecision(2)
727 <<
"\n ElmMassFraction: "
728 << std::setw(6)<< std::setprecision(2)
730 <<
" ElmAbundance " << std::setw(6)<< std::setprecision(2)
734 flux.precision(prec);
735 flux.setf(mode,std::ios::floatfield);
753 flux <<
"\n***** Table : Nb of materials = " << MaterialTable.size()
756 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
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
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()
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