4 const char * inputFile =
"/gpfs02/phenix/prod/sPHENIX/preCDR/pro.1-beta.5/single_particle/spacal1d/fieldmap/G4Hits_sPHENIX_e-_eta0_16GeV.root",
5 const char * outputFile =
"AnaSvtxTracksForGenFit.root"
16 const bool readhits =
false;
19 const bool readhepmc =
false;
22 const bool runpythia8 =
false;
23 const bool runpythia6 =
false;
34 bool do_svtx_cell =
true;
35 bool do_svtx_track =
true;
36 bool do_svtx_eval =
true;
38 bool do_preshower =
false;
41 bool do_cemc_cell =
false;
42 bool do_cemc_twr =
false;
43 bool do_cemc_cluster =
false;
44 bool do_cemc_eval =
false;
46 bool do_hcalin =
false;
47 bool do_hcalin_cell =
false;
48 bool do_hcalin_twr =
false;
49 bool do_hcalin_cluster =
false;
50 bool do_hcalin_eval =
false;
52 bool do_magnet =
false;
54 bool do_hcalout =
false;
55 bool do_hcalout_cell =
false;
56 bool do_hcalout_twr =
false;
57 bool do_hcalout_cluster =
false;
58 bool do_hcalout_eval =
false;
60 bool do_global =
false;
61 bool do_global_fastsim =
false;
63 bool do_jet_reco =
false;
64 bool do_jet_eval =
false;
66 bool do_dst_compress =
false;
69 bool do_DSTReader =
false;
74 gSystem->Load(
"libfun4all.so");
75 gSystem->Load(
"libg4detectors.so");
76 gSystem->Load(
"libphhepmc.so");
77 gSystem->Load(
"libg4testbench.so");
78 gSystem->Load(
"libg4hough.so");
79 gSystem->Load(
"libg4calo.so");
80 gSystem->Load(
"libg4eval.so");
81 gSystem->Load(
"libAnaSvtxTracksForGenFit.so");
84 gROOT->LoadMacro(
"G4Setup_sPHENIX.C");
85 G4Init(do_svtx, do_preshower, do_cemc, do_hcalin, do_magnet, do_hcalout, do_pipe);
87 int absorberactive = 1;
89 const string magfield =
"/phenix/upgrades/decadal/fieldmaps/sPHENIX.2d.root";
128 gSystem->Load(
"libPHPythia8.so");
140 gSystem->Load(
"libPHPythia6.so");
182 do_svtx, do_preshower, do_cemc, do_hcalin, do_magnet, do_hcalout, do_pipe, magfield_rescale);
191 gROOT->LoadMacro(
"G4_Bbc.C");
238 gROOT->LoadMacro(
"G4_Global.C");
242 else if (do_global_fastsim)
244 gROOT->LoadMacro(
"G4_Global.C");
254 gROOT->LoadMacro(
"G4_Jets.C");
261 if (do_svtx_eval)
Svtx_Eval(
"g4svtx_eval.root");
263 if (do_cemc_eval)
CEMC_Eval(
"g4cemc_eval.root");
269 if (do_jet_eval)
Jet_Eval(
"g4jet_eval.root");
299 gROOT->LoadMacro(
"G4_DSTReader.C");
336 if (
nEvents == 0 && !readhits && !readhepmc)
338 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
339 cout <<
"it will run forever, so I just return without running anything" << endl;
350 std::cout <<
"All done" << std::endl;