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 = ".")
291 Enable::BBCFAKE =
true;
456 if ((Enable::BBC && Enable::BBCRECO) || Enable::BBCFAKE)
Bbc_Reco();
524 const std::string kshortFile =
"./kshort_" + outputFile;
525 const std::string residualsFile =
"./residuals_" + outputFile;
537 cout <<
"You can only enable Enable::GLOBAL_RECO or Enable::GLOBAL_FASTSIM, not both" << endl;
579 string outputroot = outputFile;
580 string remove_this =
".root";
581 size_t pos = outputroot.find(remove_this);
582 if (pos != string::npos)
584 outputroot.erase(pos, remove_this.length());
590 const std::string svtxOutput = outputroot +
"_g4svtx_eval.root";
594 eval =
new SvtxEvaluator(
"SVTXEVALUATOR", svtxOutput,
"SvtxTrackMap",
601 eval -> do_cluster_eval(
false);
602 eval -> do_g4hit_eval(
false);
603 eval -> do_hit_eval(
false);
604 eval -> do_gpoint_eval(
false);
605 eval -> do_vtx_eval_light(
true);
606 eval -> do_eval_light(
true);
610 bool embed_scan =
false;
614 eval -> scan_for_embedded(embed_scan);
615 eval -> scan_for_primaries(embed_scan);
618 std::cout <<
"SvtxEvaluator: pp_mode set to " <<
TRACKING::pp_mode <<
" and scan_for_embedded set to " << embed_scan << std::endl;
620 eval -> set_cluster_version(G4TRACKING::cluster_version);
623 se -> registerSubsystem(eval);
695 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
696 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
698 cout <<
"-------------------------------------------------" << endl;
699 cout <<
"You are in event display mode. Run one event with" << endl;
700 cout <<
"se->run(1)" << endl;
701 cout <<
"Run Geant4 command with following examples" << endl;
702 gROOT->ProcessLine(
"displaycmd()");
716 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
717 cout <<
"it will run forever, so I just return without running anything" << endl;
728 if (Enable::QA)
QA_Output(outputroot +
"_qa.root");
736 std::cout <<
"All done" << std::endl;