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>
27 #include <ffamodules/XploadInterface.h>
36 R__LOAD_LIBRARY(libfun4all.so)
37 R__LOAD_LIBRARY(libffamodules.so)
44 const
string &inputFile = "/sphenix/lustre01/sphnxpro/mdc2/shijing_hepmc/fm_0_20/g4hits/G4Hits_sHijing_0_20fm-0000000040-00848.
root",
45 const
string &outputFile = "sPhenixG4_test00019.root",
46 const
string &embed_input_file = "/sphenix/lustre01/sphnxpro/mdc2/shijing_hepmc/fm_0_20/g4hits/G4Hits_sHijing_0_20fm-0000000040-00848.root",
48 const
string &outdir = ".")
280 Enable::BBCFAKE =
true;
447 if (Enable::BBC || Enable::BBCFAKE)
Bbc_Reco();
502 cout <<
"You can only enable Enable::GLOBAL_RECO or Enable::GLOBAL_FASTSIM, not both" << endl;
544 string outputroot = outputFile;
545 string remove_this =
".root";
546 size_t pos = outputroot.find(remove_this);
547 if (pos != string::npos)
549 outputroot.erase(pos, remove_this.length());
619 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
620 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
622 cout <<
"-------------------------------------------------" << endl;
623 cout <<
"You are in event display mode. Run one event with" << endl;
624 cout <<
"se->run(1)" << endl;
625 cout <<
"Run Geant4 command with following examples" << endl;
626 gROOT->ProcessLine(
"displaycmd()");
640 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
641 cout <<
"it will run forever, so I just return without running anything" << endl;
652 if (Enable::QA)
QA_Output(outputroot +
"_qa.root");
659 std::cout <<
"All done" << std::endl;