1 #ifndef MACRO_FUN4ALLG4SPHENIX_C
2 #define MACRO_FUN4ALLG4SPHENIX_C
9 #include <G4_CaloTrigger.C>
11 #include <G4_DSTReader.C>
12 #include <G4_Global.C>
13 #include <G4_HIJetReco.C>
44 R__LOAD_LIBRARY(libfun4all.so)
45 R__LOAD_LIBRARY(libffamodules.so)
53 const
string &outputFile = "G4sPHENIX.
root",
54 const
string &inputFile = "https:
55 const
string &embed_input_file = "https:
56 const
string &outdir = ".")
167 const UInt_t nPerEvt(1);
168 const TString sParticle(
"pi-");
169 const Double_t ptParMin(10.);
170 const Double_t ptParMax(10.);
173 const Bool_t doGausVertex(
false);
174 const Double_t meanVtxXG(0.);
175 const Double_t meanVtxYG(0.);
176 const Double_t meanVtxZG(0.);
177 const Double_t meanVtxXU(0.);
178 const Double_t meanVtxYU(0.);
179 const Double_t meanVtxZU(0.);
180 const Double_t widthVtxXG(0.01);
181 const Double_t widthVtxYG(0.01);
182 const Double_t widthVtxZG(5.);
183 const Double_t widthVtxXU(0.);
184 const Double_t widthVtxYU(0.);
185 const Double_t widthVtxZU(0.);
582 const std::string kshortFile =
"./kshort_" + outputFile;
583 const std::string residualsFile =
"./residuals_" + outputFile;
596 cout <<
"You can only enable Enable::GLOBAL_RECO or Enable::GLOBAL_FASTSIM, not both" << endl;
599 if (Enable::GLOBAL_RECO)
638 string outputroot = outputFile;
639 string remove_this =
".root";
640 size_t pos = outputroot.find(remove_this);
641 if (pos != string::npos)
643 outputroot.erase(pos, remove_this.length());
651 std::cout <<
"CHECK I am inside the svtx evaluator block!" << std::endl;
655 outputroot +
"_g4svtx_eval.root",
673 bool embed_scan =
true;
679 std::cout <<
"SvtxEvaluator: pp_mode set to " <<
TRACKING::pp_mode <<
" and scan_for_embedded set to " << embed_scan << std::endl;
747 trackmatcher->set_min_cl_match (5);
748 trackmatcher->set_min_cl_ratio (0.1);
749 trackmatcher->set_cutoff_deta (0.3);
750 trackmatcher->set_cutoff_dphi (0.3);
751 trackmatcher->set_smallsearch_deta (0.05);
752 trackmatcher->set_smallsearch_dphi (0.05);
755 trackmatcher->set_max_nreco_per_truth (1);
756 trackmatcher->set_max_ntruth_per_reco (1);
760 trackmatcher->Verbosity(verbosity);
764 auto treefiller =
new FillClusMatchTree(ismatcher, outputroot +
"_g4trackmatching.root");
765 treefiller->Verbosity(verbosity);
767 treefiller->m_fill_clusters =
true;
768 treefiller->m_fill_SvUnmatched =
true;
770 treefiller->m_fill_clusters =
false;
771 treefiller->m_fill_SvUnmatched =
false;
773 treefiller->m_fill_clusverbose =
false;
807 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
808 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
810 cout <<
"-------------------------------------------------" << endl;
811 cout <<
"You are in event display mode. Run one event with" << endl;
812 cout <<
"se->run(1)" << endl;
813 cout <<
"Run Geant4 command with following examples" << endl;
814 gROOT->ProcessLine(
"displaycmd()");
828 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
829 cout <<
"it will run forever, so I just return without running anything" << endl;
840 if (Enable::QA)
QA_Output(outputroot +
"_qa.root");
848 std::cout <<
"All done" << std::endl;