1 #ifndef MACRO_FUN4ALLG4CALO_C
2 #define MACRO_FUN4ALLG4CALO_C
7 #include <G4Setup_sPHENIX.C>
9 #include <G4_CaloTrigger.C>
10 #include <G4_DSTReader.C>
11 #include <G4_Global.C>
12 #include <G4_HIJetReco.C>
31 #include <litecaloeval/LiteCaloEval.h>
32 #include <calib_emc_pi0/CaloCalibEmc_Pi0.h>
34 R__LOAD_LIBRARY(libfun4all.so)
35 R__LOAD_LIBRARY(libcaloCalibDBFile.so)
37 R__LOAD_LIBRARY(libLiteCaloEvalTowSlope.so)
47 const
int mdc2_4_file_num = 20,
48 const
string &outputFile = "dstnewoutput5_calo5",
52 const
string &outdir = ".")
65 string inputFile0 =
"DST_CALO_G4HIT_single_pi0_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000062-";
67 string inputFile1 =
"DST_VERTEX_single_pi0_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000062-";
70 int ynum_int = 100000+ mdc2_4_file_num;
74 inputFile0 += yn_tstr.Data();
75 inputFile1 += yn_tstr.Data();
77 inputFile0 +=
".root";
78 inputFile1 +=
".root";
80 cout <<
"running over these files" << endl;
81 cout << inputFile0 << endl;
82 cout << inputFile1 << endl;
95 string outputFile2 = outputFile.c_str();
96 outputFile2 = outputFile2 +
".root";
285 cout <<
"You can only enable Enable::GLOBAL_RECO or Enable::GLOBAL_FASTSIM, not both" << endl;
318 string outputroot = outputFile;
319 string remove_this =
".root";
320 size_t pos = outputroot.find(remove_this);
321 if (pos != string::npos)
323 outputroot.erase(pos, remove_this.length());
343 out->
AddNode(
"TOWER_SIM_HCALIN");
344 out->
AddNode(
"TOWER_RAW_HCALIN");
345 out->
AddNode(
"TOWER_CALIB_HCALIN");
346 out->
AddNode(
"CLUSTER_HCALIN");
347 out->
AddNode(
"TOWER_SIM_HCALOUT");
348 out->
AddNode(
"TOWER_RAW_HCALOUT");
349 out->
AddNode(
"TOWER_CALIB_HCALOUT");
350 out->
AddNode(
"CLUSTER_HCALOUT");
351 out->
AddNode(
"TOWER_SIM_CEMC");
352 out->
AddNode(
"TOWER_RAW_CEMC");
353 out->
AddNode(
"TOWER_CALIB_CEMC");
354 out->
AddNode(
"TOWERINFO_SIM_CEMC");
355 out->
AddNode(
"TOWERINFO_RAW_CEMC");
356 out->
AddNode(
"TOWERINFO_CALIB_CEMC");
363 out->
AddNode(
"GlobalVertexMap");
374 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
375 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
377 cout <<
"-------------------------------------------------" << endl;
378 cout <<
"You are in event display mode. Run one event with" << endl;
379 cout <<
"se->run(1)" << endl;
380 cout <<
"Run Geant4 command with following examples" << endl;
381 gROOT->ProcessLine(
"displaycmd()");
386 string outputfile = outputFile2 +
"_ho4ho_eval.root";
387 string outputfile2 = outputFile2 +
"_piemc.root";
388 string outputfile3 = outputFile2 +
"_towslopemc.root";
389 string outputfile4 = outputFile2 +
"_hcalin.root";
390 string outputfile5 = outputFile2 +
"_hcalin_mod.root";
391 string outputfile6 = outputFile2 +
"_emcal.root";
457 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
458 cout <<
"it will run forever, so I just return without running anything" << endl;
471 std::cout <<
"All done" << std::endl;