1 #ifndef MACRO_G4TRACKING_C
2 #define MACRO_G4TRACKING_C
44 #include <phtpctracker/PHTpcTracker.h>
46 #include <qa_modules/QAG4SimulationTracking.h>
47 #include <qa_modules/QAG4SimulationUpsilon.h>
48 #include <qa_modules/QAG4SimulationVertex.h>
111 std::string
vmethod(
"avf-smoothing:1");
117 #if __cplusplus < 201703L
118 std::cout << std::endl;
119 std::cout <<
"Cannot run tracking without gcc-8.3 (c++17) environment. Please run:" << std::endl;
128 std::string current_opt = getenv(
"OPT_SPHENIX");
129 std::string x8664_sl7 =
"x8664_sl7";
130 std::string gcc83 =
"gcc-8.3";
131 size_t x8664pos = current_opt.find(x8664_sl7);
132 current_opt.replace(x8664pos, x8664_sl7.size(), gcc83);
133 std::string setupscript =
"sphenix_setup";
134 std::string setupscript_ext =
".csh";
135 if (current_opt.find(
"eic") != string::npos)
136 setupscript =
"eic_setup";
137 std::string shell = getenv(
"SHELL");
138 if (shell.find(
"tcsh") == string::npos)
139 setupscript_ext =
".sh";
140 std::cout <<
"source " << current_opt <<
"/bin/"
141 << setupscript << setupscript_ext <<
" -n" << std::endl;
142 std::cout <<
"to set it up and try again" << std::endl;
157 std::cout <<
"Cannot enable space charge correction if not using GenFit tracking chain" << std::endl;
164 std::cerr <<
"***WARNING: MULTIPLE SEEDER OPTIONS SELECTED!***" << std::endl;
165 std::cerr <<
" Current config selects both PHTpcTracker and PHHybridSeeding." << std::endl;
166 std::cerr <<
" Revert to default...." << std::endl;
174 #if __cplusplus >= 201703L
261 std::cout <<
"Using normal TPC track seeding " << std::endl;
266 std::cout <<
" Using PHTpcTracker track seeding " << std::endl;
280 std::cout <<
" Using PHHybridSeeding track seeding " << std::endl;
293 std::cout <<
" Using PHCASeeding track seeding " << std::endl;
299 seeder->Verbosity(verbosity);
300 seeder->SetLayerRange(7, 55);
301 seeder->SetSearchWindow(0.01, 0.02);
302 seeder->SetMinHitsPerCluster(0);
304 else seeder->SetMinClustersPerTrack(20);
305 seeder->useConstBField(
false);
306 seeder->useFixedClusterError(
true);
315 std::cout <<
" Using PHSimpleKFProp propagator " << std::endl;
346 std::cout <<
" Using truth Si matching " << std::endl;
355 std::cout <<
" Using stub matching for Si matching " << std::endl;
387 std::cout <<
" Using Micromegas matching " << std::endl;
419 std::cout <<
" Using Acts track fitting " << std::endl;
433 residuals->Verbosity(verbosity);
446 std::string trackmapnamef =
"SvtxTrackMap";
469 std::cout <<
" Using full truth track seeding for Acts" << std::endl;
482 std::cout <<
" Using Acts track fitting " << std::endl;
496 residuals->Verbosity(verbosity);
516 std::cout <<
" Using truth track seeding for Genfit" << std::endl;
533 std::cout <<
" Using PHTpcTracker track seeding " << std::endl;
547 std::cout <<
" Using PHHybridSeeding track seeding " << std::endl;
559 std::cout <<
" Using PHCASeeding track seeding " << std::endl;
563 seeder->Verbosity(verbosity);
564 seeder->SetLayerRange(7, 55);
565 seeder->SetSearchWindow(0.01, 0.02);
566 seeder->SetMinHitsPerCluster(2);
567 seeder->SetMinClustersPerTrack(20);
571 std::cout <<
" Using PHGenFitTrkProp " << std::endl;
580 track_prop->Verbosity(verbosity);
585 track_prop->set_max_search_win_theta_intt(i, 0.200);
586 track_prop->set_min_search_win_theta_intt(i, 0.200);
587 track_prop->set_max_search_win_phi_intt(i, 0.0050);
588 track_prop->set_min_search_win_phi_intt(i, 0.000);
592 std::cout <<
" Using Genfit track fitting " << std::endl;
597 kalman->set_use_truth_vertex(
false);
602 std::cout <<
"Tracking_reco - Disabling TPC layers from kalman filter" << std::endl;
659 eval =
new SvtxEvaluator(
"SVTXEVALUATOR", outputfile,
"SvtxTrackMap",
713 #if __cplusplus >= 201703L