23 #include "CLHEP/Units/GlobalSystemOfUnits.h"
84 std::cout <<
"analyze does nothing" << std::endl;
93 std::string materialFileName(
"MATERIALS.dat");
94 std::string elementaryMaterialFileName(
"ELEMENTARYMATERIALS.dat");
95 std::string compositeMaterialFileName(
"COMPOSITEMATERIALS.dat");
96 std::string materialFractionFileName(
"MATERIALFRACTIONS.dat");
98 std::ofstream materialOS(materialFileName.c_str());
99 std::ofstream elementaryMaterialOS(elementaryMaterialFileName.c_str());
100 std::ofstream compositeMaterialOS(compositeMaterialFileName.c_str());
101 std::ofstream materialFractionOS(materialFractionFileName.c_str());
104 std::cout <<
"MaterialForOnline Analyzer..." << std::endl;
114 for (; mit != med; ++mit) {
115 if (! mit->isDefined().second)
continue;
117 materialOS<<material.
name()<<
","<<material.
density()/
g*cm3
121 elementaryMaterialOS<<material.
name()<<
","<<material.
z()
122 <<
","<<material.
a()/
g*mole
126 compositeMaterialOS<<material.
name()
130 materialFractionOS<<material.
name()<<
","<<f.first.
name()
138 elementaryMaterialOS.close();
139 compositeMaterialOS.close();
140 materialFractionOS.close();
double a() const
returns the atomic mass
DDMaterial is used to define and access material information.
#define DEFINE_FWK_MODULE(type)
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
Container::value_type value_type
virtual void analyze(const edm::Event &, const edm::EventSetup &)
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
double z() const
retruns the atomic number
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
MaterialForOnline(const edm::ParameterSet &)
double density() const
returns the density
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
static DDI::Store< DDName, DDI::Material * >::iterator begin()
static DDI::Store< DDName, DDI::Material * >::iterator end()
const std::string & name() const
Returns the name.