80 std::ifstream theMaterialFile(theMaterialFileName);
82 cms::Exception(
"LogicError") <<
" File not found " << theMaterialFileName;
85 float air, cables, copper, h_scintillator, lead, hgc_g10_fr4, silicon, stainlesssteel, wcu, oth, epoxy, kapton,
86 aluminium, polystyrene, hgc_eeconnector, hgc_heconnector;
87 air = cables = copper = h_scintillator = lead = hgc_g10_fr4 = silicon = stainlesssteel = wcu = epoxy = kapton =
88 aluminium = polystyrene = hgc_eeconnector = hgc_heconnector = 0.;
91 while (theMaterialFile) {
92 theMaterialFile >> materialName;
93 theMaterialFile >> air >> cables >> copper >> h_scintillator >> lead >> hgc_g10_fr4 >> silicon >> stainlesssteel >>
94 wcu >> epoxy >> kapton >> aluminium >> polystyrene >> hgc_eeconnector >> hgc_heconnector;
96 if (materialName[0] ==
'#')
99 std::replace(materialName.begin(), materialName.end(),
'*',
' ');
101 theMap[materialName].clear();
102 theMap[materialName].push_back(air);
103 theMap[materialName].push_back(cables);
104 theMap[materialName].push_back(copper);
105 theMap[materialName].push_back(h_scintillator);
106 theMap[materialName].push_back(lead);
107 theMap[materialName].push_back(hgc_g10_fr4);
108 theMap[materialName].push_back(silicon);
109 theMap[materialName].push_back(stainlesssteel);
110 theMap[materialName].push_back(wcu);
111 theMap[materialName].push_back(oth);
112 theMap[materialName].push_back(epoxy);
113 theMap[materialName].push_back(kapton);
114 theMap[materialName].push_back(aluminium);
115 theMap[materialName].push_back(polystyrene);
116 theMap[materialName].push_back(hgc_eeconnector);
117 theMap[materialName].push_back(hgc_heconnector);
118 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCategorizer: material " << materialName <<
" filled " << std::endl
119 <<
"\tair " << air << std::endl
120 <<
"\tcables " << cables << std::endl
121 <<
"\tcopper " << copper << std::endl
122 <<
"\th_scintillator " << h_scintillator << std::endl
123 <<
"\tlead " << lead << std::endl
124 <<
"\thgc_g10_fr4 " << hgc_g10_fr4 << std::endl
125 <<
"\tsilicon " << silicon << std::endl
126 <<
"\tstainlesssteel " << stainlesssteel << std::endl
127 <<
"\twcu " << wcu << std::endl
128 <<
"\tepoxy " << epoxy << std::endl
129 <<
"\tkapton " << kapton << std::endl
130 <<
"\taluminium " << aluminium << std::endl
131 <<
"\tpolystyrene " << polystyrene << std::endl
132 <<
"\thgc_eeconnector " << hgc_eeconnector << std::endl
133 <<
"\thgc_heconnector " << hgc_heconnector << std::endl
def replace(string, replacements)
Log< level::Info, false > LogInfo