3 #include "G4LogicalVolumeStore.hh"
4 #include "G4Material.hh"
5 #include "G4UnitsTable.hh"
6 #include "G4EmCalculator.hh"
7 #include "G4UnitsTable.hh"
17 G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
18 G4LogicalVolumeStore::iterator ite;
20 for (ite = lvs->begin(); ite != lvs->end(); ite++) {
24 if (
mode.compare(
"Tracker") == 0) {
29 }
else if (
mode.compare(
"Mtd") == 0) {
34 }
else if (
mode.compare(
"HGCal") == 0) {
44 std::ifstream theMaterialFile(theMaterialFileName);
47 cms::Exception(
"LogicError") <<
" File not found " << theMaterialFileName;
49 float sup, sen, cab,
col, ele, oth, air;
50 sup = sen = cab =
col = ele = 0.;
54 while (theMaterialFile) {
55 theMaterialFile >> materialName;
56 theMaterialFile >> sup >> sen >> cab >>
col >> ele;
58 if (materialName[0] ==
'#')
63 theMap[materialName].clear();
64 theMap[materialName].push_back(sup);
65 theMap[materialName].push_back(sen);
66 theMap[materialName].push_back(cab);
67 theMap[materialName].push_back(
col);
68 theMap[materialName].push_back(ele);
69 theMap[materialName].push_back(oth);
70 theMap[materialName].push_back(air);
71 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCategorizer: Material " << materialName <<
" filled: "
72 <<
"\n\tSUP " << sup <<
"\n\tSEN " << sen <<
"\n\tCAB " << cab <<
"\n\tCOL " <<
col
73 <<
"\n\tELE " << ele <<
"\n\tOTH " << oth <<
"\n\tAIR " << air
74 <<
"\n\tAdd up to: " << sup + sen + cab +
col + ele + oth + air;
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,
87 air = cables = copper = h_scintillator = lead = hgc_g10_fr4 = silicon = stainlesssteel = wcu = epoxy = kapton =
91 while (theMaterialFile) {
92 theMaterialFile >> materialName;
93 theMaterialFile >> air >> cables >> copper >> h_scintillator >> lead >> hgc_g10_fr4 >> silicon >> stainlesssteel >>
94 wcu >> epoxy >> kapton >> aluminium;
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 edm::LogInfo(
"MaterialBudget") <<
"MaterialBudgetCategorizer: material " << materialName <<
" filled " << std::endl
116 <<
"\tair " << air << std::endl
117 <<
"\tcables " << cables << std::endl
118 <<
"\tcopper " << copper << std::endl
119 <<
"\th_scintillator " << h_scintillator << std::endl
120 <<
"\tlead " << lead << std::endl
121 <<
"\thgc_g10_fr4 " << hgc_g10_fr4 << std::endl
122 <<
"\tsilicon " << silicon << std::endl
123 <<
"\tstainlesssteel " << stainlesssteel << std::endl
124 <<
"\twcu " << wcu << std::endl
125 <<
"\tepoxy " << epoxy << std::endl
126 <<
"\tkapton " << kapton << std::endl
127 <<
"\taluminium " << aluminium << std::endl