1 #ifndef MACRO_G4INPUT_C
2 #define MACRO_G4INPUT_C
7 #include <phpythia6/PHPythia6.h>
9 #include <phpythia8/PHPythia8.h>
21 #include <fermimotionafterburner/FermimotionAfterburner.h>
22 #include <hijingflipafterburner/HIJINGFlipAfterburner.h>
23 #include <reactionplaneafterburner/ReactionPlaneAfterburner.h>
38 R__LOAD_LIBRARY(libfun4all.so)
39 R__LOAD_LIBRARY(libg4testbench.so)
40 R__LOAD_LIBRARY(libPHPythia6.so)
41 R__LOAD_LIBRARY(libPHPythia8.so)
42 R__LOAD_LIBRARY(libFermimotionAfterburner.so)
43 R__LOAD_LIBRARY(libHIJINGFlipAfterburner.so)
44 R__LOAD_LIBRARY(libReactionPlaneAfterburner.so)
97 if (HepMCGen ==
nullptr)
99 std::cout <<
"ApplysPHENIXBeamParameter(): Fatal Error - null input pointer HepMCGen" << std::endl;
139 std::cout <<
"ApplysPHENIXBeamParameter: invalid beam_config = "<<beam_config<<std::endl;
164 if (HepMCGen ==
nullptr)
166 std::cout <<
"ApplyEICBeamParameter(): Fatal Error - null input pointer HepMCGen" << std::endl;
171 const double EIC_hadron_crossing_angle = 25
e-3;
174 EIC_hadron_crossing_angle,
187 const double z_hadron_cavity = 52e2;
188 const double z_e_cavity = 38e2;
190 -EIC_hadron_crossing_angle / 2. / z_hadron_cavity, 0,
191 -EIC_hadron_crossing_angle / 2. / z_e_cavity, 0);
194 const double sigma_p_h = sqrt(80 * 11.3
e-7);
195 const double sigma_p_v = sqrt(7.2 * 1.0
e-7);
196 const double sigma_p_l = 6;
197 const double sigma_e_h = sqrt(45 * 20.0
e-7);
198 const double sigma_e_v = sqrt(5.6 * 1.3
e-7);
199 const double sigma_e_l = 2;
202 const double collision_sigma_z = sqrt(sigma_p_l * sigma_p_l + sigma_e_l * sigma_e_l) / 2;
203 const double collision_sigma_t = collision_sigma_z / 29.9792;
206 sigma_p_h * sigma_e_h / sqrt(sigma_p_h * sigma_p_h + sigma_e_h * sigma_e_h),
207 sigma_p_v * sigma_e_v / sqrt(sigma_p_v * sigma_p_v + sigma_e_v * sigma_e_v),
230 namespace INPUTREADEIC
235 namespace INPUTREADHITS
260 string pileupfile =
"/sphenix/sim/sim01/sphnxpro/MDC1/sHijing_HepMC/data/sHijing_0_20fm-0000000001-00000.dat";
265 namespace INPUTGENERATOR
272 std::vector<PHG4ParticleGun *>
Gun;
279 namespace INPUTMANAGER
298 cout <<
"Reading Hits and Embedding into background at the same time is not supported" << endl;
303 cout <<
"Reading Hits and running G4 simultanously is not supported" << endl;
308 cout <<
"Pythia6 and Pythia8 cannot be run together - might be possible but needs R&D" << endl;
314 cout <<
"Flow Afterburner and Pileup cannot be run simultanously" << endl;
547 gSystem->Load(
"libg4dst.so");
550 cout <<
"only filenames or filelists are supported, not mixtures" << endl;
555 cout <<
"you need to give an input filenames or filelist" << endl;
560 string mgrname =
"DSTin" +
to_string(iter->first);
572 string mgrname =
"DSTin" +
to_string(iter->first);
597 cout <<
"no filename INPUTHEPMC::filename or listfile INPUTHEPMC::listfile given" << endl;
603 gSystem->Load(
"libg4dst.so");
606 cout <<
"only filenames or filelists are supported, not mixtures" << endl;
611 cout <<
"you need to give an input filenames or filelist" << endl;
616 string mgrname =
"DSTin" +
to_string(iter->first);
624 string mgrname =
"DSTin" +
to_string(iter->first);
644 double extended_readout_time = 0.0;
647 cout <<
"Pileup window is from " << -time_window <<
" to " << time_window + extended_readout_time << endl;