5 #include "CLHEP/Units/GlobalSystemOfUnits.h" 6 #include "CLHEP/Units/SystemOfUnits.h" 77 throw cms::Exception(
"DDException") <<
"DDMaterial::addMaterial(..): name-clash\n trying to add material " << m <<
" to itself! ";
79 rep().addMaterial(m,fm);
80 return rep().noOfConstituents();
86 return rep().noOfConstituents();
92 return rep().constituent(i);
110 return rep().density();
114 std::ostream &doStream(std::ostream & os,
const DDMaterial & mat,
int level)
118 os <<
'[' << mat.
name() <<
']' <<
" z=" << mat.
z()
119 <<
" a=" << mat.
a()/
g*mole <<
"*g/mole" 120 <<
" d=" << mat.
density()/
g*cm3 <<
"*g/cm3";
124 os << std::endl << s <<
i+1 <<
" : fm=" << f.second
126 doStream(os, f.first, level);
130 os <<
"* material not declared * ";
138 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 &)