1 #ifndef EXTRACT_ECCE_GDML_C
2 #define EXTRACT_ECCE_GDML_C
4 #include <GlobalVariables.C>
6 #include <G4Setup_EICDetector.C>
19 #include <RooUnblindPrecision.h>
42 for (
auto &
c: subsys)
c = tolower(
c);
46 if ( subsys==
"all" ) outname =
"ecce.gdml";
78 if ( subsys==
"pipe" || subsys==
"all" ) {
79 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
87 if ( subsys==
"magfarfwd" || subsys==
"all" ) {
88 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
93 if ( subsys==
"magfarbwd" || subsys==
"all" ) {
94 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
95 Enable::HFARBWD_MAGNETS =
true;
96 Enable::HFARBWD_VIRTUAL_DETECTORS =
true;
99 if ( subsys==
"gems" || subsys==
"all" ) {
100 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
107 if ( subsys==
"tracking" || subsys==
"all" ) {
108 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
109 Enable::RWELL =
true;
118 if ( subsys==
"tofs" || subsys==
"all" ) {
119 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
133 G4TRACKING::PROJECTION_BECAL =
true;
136 G4TRACKING::PROJECTION_HCALOUT =
true;
139 G4TRACKING::PROJECTION_LFHCAL =
true;
141 if ( subsys==
"becal" || subsys==
"all" ) {
142 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
150 if ( subsys==
"hcalin" || subsys==
"all" ) {
151 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
160 if ( subsys==
"magnet" || subsys==
"all" ) {
161 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
165 if ( subsys==
"hcalout" || subsys==
"all" ) {
166 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
175 if ( subsys==
"dirc" || subsys==
"all" ) {
176 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
193 if ( subsys==
"femc" || subsys==
"all" ) {
194 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
203 if ( subsys==
"drcalo" ) {
204 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
213 if ( subsys==
"lfhcal" || subsys==
"all" ) {
214 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
223 if ( subsys==
"eemc" || subsys==
"all" ) {
224 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
233 if ( subsys==
"ehcal" || subsys==
"all" ) {
234 if (outname==
"") outname =
"ecce_" + subsys +
".gdml";
276 cout <<
"Please specify a valid sub-system. Got:" << subsys << endl;
349 outname = outbase + outname;
350 gSystem->Unlink(outname.c_str());
360 std::cout <<
"All done" << std::endl;
365 #endif // EXTRACT_ECCE_GDML_C