10void MatterDef::calc_I_eff() { I_effh =
Z_mean() * 12.0 * CLHEP::eV; }
17 long fqatom,
const std::vector<std::string>& fatom_not,
18 const std::vector<double>& fweight_quan,
double fdensity,
23 temperatureh(ftemperature),
25 mfunname(
"MatterDef::MatterDef(...many atoms...)");
32 const std::string& fatom_not,
double fdensity,
37 temperatureh(ftemperature),
39 mfunname(
"MatterDef::MatterDef(...1 atom...)");
46 const std::string& fatom_not1,
double fweight_quan1,
47 const std::string& fatom_not2,
double fweight_quan2,
48 double fdensity,
double ftemperature)
49 :
AtomMixDef(fatom_not1, fweight_quan1, fatom_not2, fweight_quan2),
52 temperatureh(ftemperature),
54 mfunname(
"MatterDef::MatterDef(...2 atoms...)");
61 const std::string& fatom_not1,
double fweight_quan1,
62 const std::string& fatom_not2,
double fweight_quan2,
63 const std::string& fatom_not3,
double fweight_quan3,
64 double fdensity,
double ftemperature)
65 :
AtomMixDef(fatom_not1, fweight_quan1, fatom_not2, fweight_quan2,
66 fatom_not3, fweight_quan3),
69 temperatureh(ftemperature),
71 mfunname(
"MatterDef::MatterDef(...2 atoms...)");
78 mfunnamep(
"void MatterDef::verify(void)");
79 if (nameh ==
"none" && notationh ==
"none")
return;
81 if (matter->nameh != nameh && matter->notationh != notationh)
continue;
83 mcerr <<
"cannot initialize two matters with the same name or notation\n";
84 mcerr <<
"name=" << nameh <<
" notation=" << notationh <<
'\n';
90 mfunnamep(
"void MatterDef::verify(const std::string& const std::string&)");
92 if (matter->nameh != fname && matter->notationh != fnotation)
continue;
94 mcerr <<
"cannot initialize two matters with the same name or notation\n";
95 mcerr <<
"name=" << fname <<
" notation=" << fnotation <<
'\n';
101 if (l > 0) file << (*this);
105 Ifile <<
"MatterDef::printall:\n";
107 matter->print(file, 1);
112 static std::list<MatterDef*> logbook;
122 if (matter->notation() == fnotation)
return matter;
128 mfunname(
"ostream& operator << (ostream& file, const MatterDef& f)");
129 Ifile <<
"MatterDef: name=" << std::setw(10) << f.
name()
130 <<
" notation=" << std::setw(3) << f.
notation() <<
'\n';
132 Ifile <<
"density/(gram/cm3)=" << f.
density() / (CLHEP::gram / CLHEP::cm3)
133 <<
" temperature/kelvin=" << f.
temperature() / CLHEP::kelvin
134 <<
" I_eff/eV=" << f.
I_eff() / CLHEP::eV <<
'\n';
135 f.AtomMixDef::print(file, 1);
#define mfunnamep(string)
static const std::list< MatterDef * > & get_const_logbook()
const std::string & notation() const
const std::string & name() const
static std::list< MatterDef * > & get_logbook()
static MatterDef * get_MatterDef(const std::string &fnotation)
double temperature() const
void verify()
Check that there is no matter with the same name in the container.
void print(std::ostream &file, int l) const
static void printall(std::ostream &file)
std::ostream & operator<<(std::ostream &file, const BGMesh &bgm)