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)
52 const
string &inputFile = "https:
53 const
string &outputFile = "G4sPHENIX.
root",
54 const
string &embed_input_file = "https:
56 const
string &outdir = ".")
548 const std::string kshortFile =
"./kshort_" + outputFile;
549 const std::string residualsFile =
"./residuals_" + outputFile;
562 cout <<
"You can only enable Enable::GLOBAL_RECO or Enable::GLOBAL_FASTSIM, not both" << endl;
565 if (Enable::GLOBAL_RECO)
604 string outputroot = outputFile;
605 string remove_this =
".root";
606 size_t pos = outputroot.find(remove_this);
607 if (pos != string::npos)
609 outputroot.erase(pos, remove_this.length());
688 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
689 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
691 cout <<
"-------------------------------------------------" << endl;
692 cout <<
"You are in event display mode. Run one event with" << endl;
693 cout <<
"se->run(1)" << endl;
694 cout <<
"Run Geant4 command with following examples" << endl;
695 gROOT->ProcessLine(
"displaycmd()");
709 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
710 cout <<
"it will run forever, so I just return without running anything" << endl;
721 if (Enable::QA)
QA_Output(outputroot +
"_qa.root");
729 std::cout <<
"All done" << std::endl;