1 #ifndef MACRO_FUN4ALLG4CALO_C
2 #define MACRO_FUN4ALLG4CALO_C
5 #include <../../pi0Efficiency.h>
10 #include <G4_CaloTrigger.C>
11 #include <G4_DSTReader.C>
12 #include <G4_Global.C>
13 #include <G4_HIJetReco.C>
23 #include <ffamodules/XploadInterface.h>
32 R__LOAD_LIBRARY(libffamodules.so)
33 R__LOAD_LIBRARY(libfun4all.so)
34 R__LOAD_LIBRARY(libpi0Efficiency.so)
41 const
string &inputFile0 = "g4hits.list",
43 const
string &outputFile = "G4sPHENIX_calo.
root",
44 const
string &outdir = ".")
63 Enable::XPLOAD =
true;
192 if (Enable::BBC || Enable::BBCFAKE)
Bbc_Reco();
246 cout <<
"You can only enable Enable::GLOBAL_RECO or Enable::GLOBAL_FASTSIM, not both" << endl;
279 string outputroot = outputFile;
280 string remove_this =
".root";
281 size_t pos = outputroot.find(remove_this);
282 if (pos != string::npos)
284 outputroot.erase(pos, remove_this.length());
304 out->
AddNode(
"TOWER_SIM_HCALIN");
305 out->
AddNode(
"TOWER_RAW_HCALIN");
306 out->
AddNode(
"TOWER_CALIB_HCALIN");
307 out->
AddNode(
"CLUSTER_HCALIN");
308 out->
AddNode(
"TOWER_SIM_HCALOUT");
309 out->
AddNode(
"TOWER_RAW_HCALOUT");
310 out->
AddNode(
"TOWER_CALIB_HCALOUT");
311 out->
AddNode(
"CLUSTER_HCALOUT");
312 out->
AddNode(
"TOWER_SIM_CEMC");
313 out->
AddNode(
"TOWER_RAW_CEMC");
314 out->
AddNode(
"TOWER_CALIB_CEMC");
316 out->
AddNode(
"CLUSTER_POS_COR_CEMC");
318 out->
AddNode(
"TOPOCLUSTER_ALLCALO");
319 out->
AddNode(
"TOPOCLUSTER_EMCAL");
320 out->
AddNode(
"TOPOCLUSTER_HCAL");
321 out->
AddNode(
"GlobalVertexMap");
332 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
333 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
335 cout <<
"-------------------------------------------------" << endl;
336 cout <<
"You are in event display mode. Run one event with" << endl;
337 cout <<
"se->run(1)" << endl;
338 cout <<
"Run Geant4 command with following examples" << endl;
339 gROOT->ProcessLine(
"displaycmd()");
352 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
353 cout <<
"it will run forever, so I just return without running anything" << endl;
368 std::cout <<
"All done" << std::endl;