1 #ifndef MACRO_FUN4ALLG4SPHENIX_C
2 #define MACRO_FUN4ALLG4SPHENIX_C
13 #include <DisplayOn.C>
15 #include <G4_CaloTrigger.C>
17 #include <G4_DSTReader.C>
18 #include <G4_Global.C>
19 #include <G4_HIJetReco.C>
33 #include <ffamodules/XploadInterface.h>
43 #include "../../macro/CEmc_Spacal.C"
45 R__LOAD_LIBRARY(libfun4all.so)
46 R__LOAD_LIBRARY(libffamodules.so)
47 R__LOAD_LIBRARY(libEMCalPositionDependentCalibration.so)
54 const
string &calib_path="
CEMC/PositionRecalibrationFull/",
55 const
string &outdir = ".",
56 const
string &inputFile = "https:
57 const
string &outputFile = "G4sPHENIX.
root",
58 const
string &embed_input_file = "https:
300 Enable::BBCFAKE =
true;
344 Enable::CEMC_EVAL_POSITION_CORRECTION = Enable::CEMC_CLUSTER_FULL &&
true;
464 if (Enable::BBC || Enable::BBCFAKE)
Bbc_Reco();
483 if (Enable::CEMC_CLUSTER_FULL) CEMC_Clusters_Full(calib_path);
520 cout <<
"You can only enable Enable::GLOBAL_RECO or Enable::GLOBAL_FASTSIM, not both" << endl;
562 string outputroot = outputFile;
563 string remove_this =
".root";
564 size_t pos = outputroot.find(remove_this);
565 if (pos != string::npos)
567 outputroot.erase(pos, remove_this.length());
574 if (Enable::CEMC_EVAL_POSITION_CORRECTION) CEMC_Eval_Position_Correction(outputroot +
"_g4cemc_eval.root");
639 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
640 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
642 cout <<
"-------------------------------------------------" << endl;
643 cout <<
"You are in event display mode. Run one event with" << endl;
644 cout <<
"se->run(1)" << endl;
645 cout <<
"Run Geant4 command with following examples" << endl;
646 gROOT->ProcessLine(
"displaycmd()");
660 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
661 cout <<
"it will run forever, so I just return without running anything" << endl;
672 if (Enable::QA)
QA_Output(outputroot +
"_qa.root");
679 std::cout <<
"All done" << std::endl;