25 std::string stateName;
26 switch (material.
State()) {
38 stateName =
"Undefined";
42 <<
"\"" << material.
Name() <<
"\""
43 <<
" density " << material.
Density() <<
" g/cm3"
47 <<
"\"" << stateName <<
"\""
48 <<
" temperature " << material.
Temperature() <<
" kelvin"
49 <<
" pressure " << material.
Pressure() <<
" atm" << std::endl;
52 out <<
" " << i <<
"th element: " << *material.
Element(i)
53 <<
" Elm mass fraction: " << material.
MassFraction(i) * 100. <<
" %";
54 if (i < material.
NofElements() - 1) out << std::endl;
The VGM interface to materials.
virtual double Pressure() const =0
Return the density in atmosphere.
virtual IElement * Element(int iel) const =0
Return the i-th element constituing this material.
virtual double NuclearInterLength() const =0
Return the nuclear interaction length in mm.
virtual double Density() const =0
Return the density in g/cm3.
virtual double Temperature() const =0
Return the temperature in kelvins.
virtual std::string Name() const =0
Return the name of this element.
virtual double RadiationLength() const =0
Return the radiation length in mm.
virtual MaterialState State() const =0
Return the material state.
virtual double MassFraction(int iel) const =0
Return the mass fraction of the i-th element constituing this material.
virtual int NofElements() const =0
Return the number of elements constituing this material.
std::ostream & operator<<(std::ostream &out, const VGM::IMaterial &material)
@ kLiquid
Liquid material.
@ kUndefined
Undefined material state.