5 #include "CLHEP/Units/GlobalSystemOfUnits.h" 6 #include "CLHEP/Units/SystemOfUnits.h" 78 throw cms::Exception(
"DDException") <<
"DDMaterial::addMaterial(..): name-clash\n trying to add material " << m <<
" to itself! ";
80 rep().addMaterial(m,fm);
81 return rep().noOfConstituents();
87 return rep().noOfConstituents();
93 return rep().constituent(i);
111 return rep().density();
115 std::ostream &doStream(std::ostream & os,
const DDMaterial & mat,
int level)
119 os <<
'[' << mat.
name() <<
']' <<
" z=" << mat.
z()
120 <<
" a=" << mat.
a()/
g*mole <<
"*g/mole" 121 <<
" d=" << mat.
density()/
g*cm3 <<
"*g/cm3";
125 os << std::endl << s <<
i+1 <<
" : fm=" << f.second
127 doStream(os, f.first, level);
131 os <<
"* material not declared * ";
139 return doStream(os, mat, 0);
double a() const
returns the atomic mass
const DDI::rep_traits< DDName, DDI::Material * >::reference rep() const
const DDName & name() const
DDMaterial is used to define and access material information.
DDMaterial()
Creates a uninitialized reference-object (see DDLogicalPart documentation for details on reference ob...
DDName is used to identify DDD entities uniquely.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
int addMaterial(const DDMaterial &m, double fm)
adds a material to the mixture proportional to its fraction-mass fm.
static value_type & instance()
double z() const
retruns the atomic number
Container::value_type value_type
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
double density() const
returns the density
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
friend std::ostream & operator<<(std::ostream &, const DDMaterial &)