8 #include "G4Element.hh" 9 #include "G4NistManager.hh" 10 #include "G4OpBoundaryProcess.hh" 16 string hd_msg = opts.
optMap[
"LOG_MSG"].args +
" TEXT Materials Factory: >> ";
19 map<string, material> mymats;
31 if(it->second.get_factory() !=
"TEXT")
35 cout << hd_msg <<
" Initializing " << it->second.get_factory() <<
" for detector " << it->first << endl;
38 string dname = it->first ;
40 string filename = dname +
"__materials_" + variation +
".txt";
42 ifstream IN(filename.c_str());
46 if(getenv(
"GEMC_DATA_DIR") != NULL)
49 string maybeHere = (string) getenv(
"GEMC_DATA_DIR") +
"/" + filename;
51 IN.open(maybeHere.c_str());
55 cout << hd_msg <<
"Warning: The system >" << dname
56 <<
"< does not have a material file associated with it. " 57 <<
"Probably it's using default Geant4 parameters." << endl;
66 cout << hd_msg <<
"Warning: The system >" << dname
67 <<
"< does not have a material file associated with it. " 68 <<
"Probably it's using default Geant4 parameters." << endl;
98 if( gt.
data.size() == 18)
109 mymats[thisMat.
name] = thisMat;
map< string, G4Material * > initMaterials(runConditions, goptions)
vector< string > get_strings(string input)
returns a vector of strings from a stringstream, space is delimiter
int check_if_factory_is_needed(map< string, detectorCondition > dcon, string factory)
map< string, G4Material * > materialsFromMap(map< string, material >)
string get_variation(string var)
parse variation name from string
map< string, detectorCondition > detectorConditionsMap
double get_number(string v, int warn_no_unit)
Returns number with dimension from string, i.e. 100*cm.
void printMaterials(map< string, G4Material * > matMap)
map< string, aopt > optMap
Options map.
double scintillationyield
void componentsFromString(string)
string TrimSpaces(string in)
Removes leading and trailing spaces.
void opticalsFromString(string, string)