2 #include "CLHEP/Units/GlobalSystemOfUnits.h"
75 throw cms::Exception(
"DDException") <<
"DDMaterial::addMaterial(..): name-clash\n trying to add material " << m <<
" to itself! ";
77 rep().addMaterial(m,fm);
79 return rep().noOfConstituents();
85 return rep().noOfConstituents();
93 return rep().constituent(i);
111 return rep().density();
126 std::ostream &doStream(std::ostream & os,
const DDMaterial & mat,
int level)
130 os <<
'[' << mat.
name() <<
']' <<
" z=" << mat.
z()
131 <<
" a=" << mat.
a()/
g*mole <<
"*g/mole"
132 <<
" d=" << mat.
density()/
g*cm3 <<
"*g/cm3";
136 os << std::endl <<
s <<
i+1 <<
" : fm=" << f.second
138 doStream(os, f.first, level);
142 os <<
"* material not declared * ";
150 return doStream(os, mat, 0);
double a() const
returns the atomic mass
const DDI::rep_traits< DDName, DDI::Material * >::reference rep() 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.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
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
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
Container::value_type value_type
std::string toString() const
double density() const
returns the density
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
#define DCOUT(M_v_Y, M_v_S)