3 const char * inputFile = NULL,
4 const char * outputFile =
"SvtxClusters.root",
5 const char * embed_input_file = NULL,
6 const int which_tracking = 15,
7 const bool do_embedding =
false,
8 const int particle_pid = 211
22 const bool readhits =
false;
25 const bool readhepmc =
false;
28 const bool runpythia8 =
false;
29 const bool runpythia6 =
false;
33 const bool usegun =
false;
49 bool do_svtx_cell =
true;
50 bool do_svtx_cluster =
true;
51 bool do_svtx_track =
false;
52 bool do_svtx_eval =
false;
59 bool do_preshower =
false;
62 bool do_cemc_cell = do_cemc &&
true;
63 bool do_cemc_twr = do_cemc_cell &&
true;
64 bool do_cemc_cluster = do_cemc_twr &&
true;
65 bool do_cemc_eval = do_cemc_cluster &&
true;
67 bool do_hcalin =
false;
68 bool do_hcalin_cell = do_hcalin &&
true;
69 bool do_hcalin_twr = do_hcalin_cell &&
true;
70 bool do_hcalin_cluster = do_hcalin_twr &&
true;
71 bool do_hcalin_eval = do_hcalin_cluster &&
true;
73 bool do_magnet =
false;
75 bool do_hcalout =
false;
76 bool do_hcalout_cell = do_hcalout &&
true;
77 bool do_hcalout_twr = do_hcalout_cell &&
true;
78 bool do_hcalout_cluster = do_hcalout_twr &&
true;
79 bool do_hcalout_eval = do_hcalout_cluster &&
true;
81 bool do_global =
false;
82 bool do_global_fastsim =
false;
84 bool do_jet_reco =
false;
85 bool do_jet_eval =
false;
87 bool do_dst_compress =
false;
90 bool do_DSTReader =
false;
95 gSystem->Load(
"libfun4all.so");
96 gSystem->Load(
"libg4detectors.so");
97 gSystem->Load(
"libphhepmc.so");
98 gSystem->Load(
"libg4testbench.so");
99 gSystem->Load(
"libg4hough.so");
100 gSystem->Load(
"libg4calo.so");
101 gSystem->Load(
"libg4eval.so");
104 gROOT->LoadMacro(
"G4Setup_sPHENIX.C");
105 G4Init(do_svtx,do_preshower,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,which_tracking);
107 int absorberactive = 1;
109 const string magfield =
"/phenix/upgrades/decadal/fieldmaps/sPHENIX.2d.root";
141 cout <<
"Do not support read hits and embed background at the same time."<<endl;
155 gSystem->Load(
"libPHPythia8.so");
175 gSystem->Load(
"libPHPythia6.so");
193 if (readhepmc || do_embedding)
236 pgen->
set_phi_range(5.3/180.*TMath::Pi(),5.3/180.*TMath::Pi());
243 pgen->
set_phi_range(-0.2/180.*TMath::Pi(),0.2/180.*TMath::Pi());
255 do_svtx, do_preshower, do_cemc, do_hcalin, do_magnet, do_hcalout, do_pipe, magfield_rescale);
264 gROOT->LoadMacro(
"G4_Bbc.C");
303 if(which_tracking == 14 || which_tracking == 15) {
307 if (do_svtx_cluster || do_svtx_track)
Svtx_Reco();
316 gROOT->LoadMacro(
"G4_Global.C");
320 else if (do_global_fastsim)
322 gROOT->LoadMacro(
"G4_Global.C");
332 gROOT->LoadMacro(
"G4_Jets.C");
353 if (do_svtx_eval)
Svtx_Eval(
"g4svtx_eval.root");
355 if (do_cemc_eval)
CEMC_Eval(
"g4cemc_eval.root");
361 if (do_jet_eval)
Jet_Eval(
"g4jet_eval.root");
376 if (embed_input_file == NULL)
378 cout <<
"Missing embed_input_file! Exit";
383 in1->
AddFile(embed_input_file);
404 gROOT->LoadMacro(
"G4_DSTReader.C");
433 if (
nEvents == 0 && !readhits && !readhepmc)
435 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
436 cout <<
"it will run forever, so I just return without running anything" << endl;
450 std::cout <<
"All done" << std::endl;