1 #ifndef MACRO_G4TRKRSIM_C
2 #define MACRO_G4TRKRSIM_C
30 #pragma GCC diagnostic push
31 #pragma GCC diagnostic ignored "-Wundefined-internal"
33 #pragma GCC diagnostic pop
44 R__LOAD_LIBRARY(libg4tpc.so)
45 R__LOAD_LIBRARY(libg4mvtx.so)
46 R__LOAD_LIBRARY(libg4intt.so)
47 R__LOAD_LIBRARY(libg4micromegas.so)
57 const int supportactive = 0)
72 cout <<
"Create Maps layer " << ilayer <<
" with radius " << radius_lyr <<
" mm." << endl;
74 radius = radius_lyr / 10.;
98 double maps_readout_window = 5000.0;
99 double extended_readout_time = 0.0;
103 maps_hits->
set_double_param(
"mvtx_tmax", maps_readout_window + extended_readout_time);
105 std::cout <<
"PHG4MvtxHitReco: readout window is from " << -maps_readout_window <<
" to " << maps_readout_window + extended_readout_time << std::endl;
132 const int absorberactive = 0)
145 std::vector<std::pair<int, int>> vpair;
150 if (verbosity) cout <<
"Create strip tracker layer " << vpair[
i].second <<
" as sphenix layer " << vpair[
i].first << endl;
169 cout <<
"Intt has " << G4INTT::n_intt_layer <<
" layers with layer setup:" << endl;
197 string DeadMapConfigName = Form(
"intt_layer%d/",
i);
201 string DeadMapPath =
string(getenv(
"CALIBRATIONROOT")) +
string(
"/Tracking/INTT/DeadMap/");
204 DeadMapPath += DeadMapConfigName;
223 double extended_readout_time = 0.0;
227 std::cout <<
"INTT readout window is set to -20 to " << 80.0 + extended_readout_time << std::endl;
254 std::vector<double> userrange;
255 userrange.push_back(0.0584625322997416);
256 userrange.push_back(0.116925064599483);
257 userrange.push_back(0.233850129198966);
258 userrange.push_back(0.35077519379845);
259 userrange.push_back(0.584625322997416);
260 userrange.push_back(0.818475452196383);
261 userrange.push_back(1.05232558139535);
262 userrange.push_back(1.28617571059432);
279 std::cout <<
"G4_TrkrSimulation::TpcInit" << std::endl;
318 if (AbsorberActive) tpc_endcap->
SetActive();
331 std::cout <<
"G4_TrkrSimulation::TPC" << std::endl;
350 double extended_readout_time = 0.0;
383 centralMembrane->setCentralMembraneEventModulo(1);
384 se->registerSubsystem(centralMembrane);
394 static constexpr
double deg_to_rad = M_PI/180.;
396 directLaser->SetThetaStepping( 36, 0*deg_to_rad, 90*deg_to_rad );
398 directLaser->SetDirectLaserAuto(
true );
405 se->registerSubsystem(directLaser);
416 double extended_readout_time = 0.0;
418 padplane->SetReadoutTime(extended_readout_time);
422 edrift->Verbosity(verbosity);
432 distortionMap->Init();
433 edrift->setTpcDistortion( distortionMap );
437 edrift->set_double_param(
"max_time", tpc_readout_time);
438 edrift->set_double_param(
"extended_readout_time", extended_readout_time);
439 std::cout <<
"PHG4TpcElectronDrift readout window is from 0 to " << tpc_readout_time + extended_readout_time << std::endl;
449 edrift->registerPadPlane(padplane);
450 se->registerSubsystem(edrift);
458 double ADC_threshold = 4.0 * ENC;
461 cout <<
" Tpc digitizer: Setting ENC to " << ENC <<
" ADC threshold to " << ADC_threshold
464 se->registerSubsystem(digitpc);
495 mm->Verbosity(verbosity);
498 mm->SetSupportActive();
500 mm->OverlapCheck(overlapcheck );
514 double extended_readout_time = 0.0;
517 reco->set_double_param(
"micromegas_tmax", 800.0+extended_readout_time);
518 se->registerSubsystem(reco);