1 #ifndef MACRO_FUN4ALLG4SPHENIX_C
2 #define MACRO_FUN4ALLG4SPHENIX_C
4 #include <anatutorial/AnaTutorial.h>
11 #include <G4_CaloTrigger.C>
12 #include <G4_DSTReader.C>
14 #include <G4_HIJetReco.C>
21 #include <G4_Tracking.C>
40 const
string &inputFile = "https:
41 const
string &outputFile = "G4sPHENIX.root",
42 const
string &embed_input_file = "https:
44 const
string &outdir = ".")
265 Enable::MVTX_CLUSTER = Enable::MVTX_CELL &&
true;
266 Enable::MVTX_QA = Enable::MVTX_CLUSTER and
Enable::QA &&
true;
269 Enable::INTT_CELL = Enable::INTT &&
true;
270 Enable::INTT_CLUSTER = Enable::INTT_CELL &&
true;
271 Enable::INTT_QA = Enable::INTT_CLUSTER and Enable::QA &&
true;
276 Enable::TPC_CLUSTER = Enable::TPC_CELL &&
true;
277 Enable::TPC_QA = Enable::TPC_CLUSTER and Enable::QA &&
true;
283 Enable::TRACKING_TRACK =
true;
285 Enable::TRACKING_QA = Enable::TRACKING_TRACK and Enable::QA &&
true;
401 if (Enable::MVTX_CELL) Mvtx_Cells();
402 if (Enable::INTT_CELL) Intt_Cells();
403 if (Enable::TPC_CELL) TPC_Cells();
438 if (Enable::MVTX_CLUSTER) Mvtx_Clustering();
439 if (Enable::INTT_CLUSTER) Intt_Clustering();
440 if (Enable::TPC_CLUSTER) TPC_Clustering();
443 if (Enable::TRACKING_TRACK)
454 cout <<
"You can only enable Enable::GLOBAL_RECO or Enable::GLOBAL_FASTSIM, not both" << endl;
470 if (Enable::CALOTRIGGER)
480 if (Enable::HIJETS) HIJetReco();
487 string outputroot = outputFile;
488 string remove_this =
".root";
489 size_t pos = outputroot.find(remove_this);
490 if (pos != string::npos)
492 outputroot.erase(pos, remove_this.length());
537 if (Enable::MVTX_QA) Mvtx_QA();
538 if (Enable::INTT_QA) Intt_QA();
539 if (Enable::TPC_QA) TPC_QA();
540 if (Enable::TRACKING_QA) Tracking_QA();
573 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
574 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
576 cout <<
"-------------------------------------------------" << endl;
577 cout <<
"You are in event display mode. Run one event with" << endl;
578 cout <<
"se->run(1)" << endl;
579 cout <<
"Run Geant4 command with following examples" << endl;
580 gROOT->ProcessLine(
"displaycmd()");
593 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
594 cout <<
"it will run forever, so I just return without running anything" << endl;
605 if (Enable::QA)
QA_Output(outputroot +
"_qa.root");
612 std::cout <<
"All done" << std::endl;