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 =
"DST_PHG4TrackFastSim.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 =
false;
35 bool do_svtx_track =
false;
36 bool do_svtx_eval =
false;
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_fwd_jet_reco =
false;
67 bool do_fwd_jet_eval =
false;
72 bool do_FGEM_track =
true;
73 bool do_FGEM_eval =
true;
76 bool do_FEMC_cell =
false;
77 bool do_FEMC_twr =
false;
78 bool do_FEMC_cluster =
false;
80 bool do_FHCAL =
false;
81 bool do_FHCAL_cell =
false;
82 bool do_FHCAL_twr =
false;
83 bool do_FHCAL_cluster =
false;
85 bool do_dst_compress =
false;
88 bool do_DSTReader =
true;
93 gSystem->Load(
"libfun4all.so");
94 gSystem->Load(
"libg4detectors.so");
95 gSystem->Load(
"libphhepmc.so");
96 gSystem->Load(
"libg4testbench.so");
97 gSystem->Load(
"libg4hough.so");
98 gSystem->Load(
"libg4calo.so");
99 gSystem->Load(
"libg4eval.so");
102 gROOT->LoadMacro(
"G4Setup_fsPHENIX.C");
103 G4Init(do_svtx,do_preshower,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,do_FGEM,do_FEMC,do_FHCAL);
105 int absorberactive = 0;
107 const string magfield =
"fieldmap.root";
147 gSystem->Load(
"libPHPythia8.so");
159 gSystem->Load(
"libPHPythia6.so");
205 do_svtx, do_preshower, do_cemc, do_hcalin, do_magnet, do_hcalout, do_pipe,
206 do_FGEM, do_FEMC, do_FHCAL,
217 gROOT->LoadMacro(
"G4_Bbc.C");
280 gROOT->LoadMacro(
"G4_Global.C");
284 else if (do_global_fastsim)
286 gROOT->LoadMacro(
"G4_Global.C");
296 gROOT->LoadMacro(
"G4_Jets.C");
302 gROOT->LoadMacro(
"G4_FwdJets.C");
309 if (do_svtx_eval)
Svtx_Eval(
"g4svtx_eval.root");
311 if (do_cemc_eval)
CEMC_Eval(
"g4cemc_eval.root");
317 if (do_jet_eval)
Jet_Eval(
"g4jet_eval.root");
319 if (do_fwd_jet_eval)
Jet_FwdEval(
"g4fwdjet_eval.root");
351 gROOT->LoadMacro(
"G4_DSTReader_fsPHENIX.C");
377 if (
nEvents == 0 && !readhits && !readhepmc)
379 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
380 cout <<
"it will run forever, so I just return without running anything" << endl;
392 std::cout <<
"All done" << std::endl;
395 std::cout <<
"==== Useful display commands ==" << std::endl;
396 cout <<
"draw axis: " << endl;
397 cout <<
" G4Cmd(\"/vis/scene/add/axes 0 0 0 50 cm\")" << endl;
398 cout <<
"zoom" << endl;
399 cout <<
" G4Cmd(\"/vis/viewer/zoom 1\")" << endl;
400 cout <<
"viewpoint:" << endl;
401 cout <<
" G4Cmd(\"/vis/viewer/set/viewpointThetaPhi 0 0\")" << endl;
402 cout <<
"panTo:" << endl;
403 cout <<
" G4Cmd(\"/vis/viewer/panTo 0 0 cm\")" << endl;
404 cout <<
"print to eps:" << endl;
405 cout <<
" G4Cmd(\"/vis/ogl/printEPS\")" << endl;
406 cout <<
"set background color:" << endl;
407 cout <<
" G4Cmd(\"/vis/viewer/set/background white\")" << endl;
408 std::cout <<
"===============================" << std::endl;
419 std::cout <<
"All done" << std::endl;