9 bool do_hcalout =
true,
14 int n_TPC_layers = 40) {
20 gROOT->LoadMacro(
"G4_Pipe.C");
25 gROOT->LoadMacro(
"G4_Svtx_maps_ladders+intt_ladders+tpc_KalmanPatRec.C");
31 gROOT->LoadMacro(
"G4_CEmc_Spacal.C");
37 gROOT->LoadMacro(
"G4_HcalIn_ref.C");
43 gROOT->LoadMacro(
"G4_Magnet.C");
48 gROOT->LoadMacro(
"G4_HcalOut_ref.C");
54 gROOT->LoadMacro(
"G4_FGEM_fsPHENIX.C");
60 gROOT->LoadMacro(
"G4_FEMC.C");
66 gROOT->LoadMacro(
"G4_FHCAL.C");
73 const string &
field =
"1.5",
75 const bool do_svtx =
true,
76 const bool do_cemc =
true,
77 const bool do_hcalin =
true,
78 const bool do_magnet =
true,
79 const bool do_hcalout =
true,
80 const bool do_pipe =
true,
81 const bool do_FGEM =
true,
82 const bool do_FEMC =
false,
83 const bool do_FHCAL =
false,
90 gSystem->Load(
"libg4detectors.so");
91 gSystem->Load(
"libg4testbench.so");
114 double fieldstrength;
115 istringstream stringline(
field);
116 stringline >> fieldstrength;
117 if (stringline.fail()) {
119 if (
field.find(
"sPHENIX.root") != string::npos) {
133 if (do_pipe) radius =
Pipe(g4Reco, radius, absorberactive);
137 if (do_svtx) radius =
Svtx(g4Reco, radius, absorberactive);
142 if (do_cemc) radius =
CEmc(g4Reco, radius, 8, absorberactive);
148 if (do_hcalin) radius =
HCalInner(g4Reco, radius, 4, absorberactive);
153 if (do_magnet) radius =
Magnet(g4Reco, radius, 0, absorberactive);
158 if (do_hcalout) radius =
HCalOuter(g4Reco, radius, 4, absorberactive);
257 gSystem->Load(
"libfun4all.so");
258 gSystem->Load(
"libg4eval.so");
313 out->
StripNode(
"G4HIT_CEMC_ELECTRONICS");
321 out->
StripNode(
"G4HIT_ABSORBER_HCALOUT");
348 double al_pipe_length = 88.3;
350 const double zpos0 = al_pipe_length + be_pipe_length * 0.5;
351 const double zpos1 = 305 - 20;
352 const double zpos2 = 335.9 - 10.2 / 2.;
353 const double calorimeter_hole_diamater = 9.92331 *2;
358 const double number_of_wteeth = 100;
359 const double teeth_thickness = 0.3504 * 2;
360 const double eta_inner = -log(tan(atan((beampipe_radius + 0.1) / zpos0) / 2));
361 const double eta_outter = 4.2;
362 const double eta_teeth_outter = 4.05;
363 double pos = zpos0 + (zpos1 - zpos0) / 2;
368 magpiston->SetZlength((zpos1 - zpos0) / 2);
369 magpiston->SetPlaceZ((zpos1 + zpos0) / 2);
370 magpiston->SetR1(beampipe_radius,
372 magpiston->SetR2(beampipe_radius,
374 magpiston->SetMaterial(
"G4_Fe");
387 pos = zpos0 + 1.0 + teeth_thickness / 2;
388 for (
int i = 0;
i < number_of_wteeth;
i++)
397 magpiston->SetZlength(teeth_thickness / 2);
398 magpiston->SetPlaceZ(pos);
402 * (pos - teeth_thickness / 2),
404 * (pos - teeth_thickness / 2)
409 * (pos + teeth_thickness / 2),
411 * (pos + teeth_thickness / 2) + .1
413 magpiston->SetMaterial(
"G4_W");
414 magpiston->SuperDetector(name.c_str());
415 magpiston->SetActive(
false);
418 pos += ((zpos1 - zpos0 - 10) / number_of_wteeth);
427 magpiston2->
set_double_param(
"thickness",calorimeter_hole_diamater / 2. - beampipe_radius);