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>
25 #include <litecaloeval/LiteCaloEval.h>
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)
36 R__LOAD_LIBRARY(libcalibCaloEmc_pi0.so)
37 R__LOAD_LIBRARY(libLiteCaloEvalTowSlope.so)
47 const
int mdc2_4_file_num = 1,
48 const
string &outputFile = "newoutput1_calo1",
52 const
string &outdir = ".")
65 string inputFile0 =
"DST_CALO_G4HIT_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000004-";
66 string inputFile1 =
"DST_VERTEX_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000004-";
69 int ynum_int = 100000+ mdc2_4_file_num;
73 inputFile0 += yn_tstr.Data();
74 inputFile1 += yn_tstr.Data();
76 inputFile0 +=
".root";
77 inputFile1 +=
".root";
79 cout <<
"running over these files" << endl;
80 cout << inputFile0 << endl;
81 cout << inputFile1 << endl;
94 string outputFile2 = outputFile.c_str();
95 outputFile2 = outputFile2 +
".root";
284 cout <<
"You can only enable Enable::GLOBAL_RECO or Enable::GLOBAL_FASTSIM, not both" << endl;
317 string outputroot = outputFile;
318 string remove_this =
".root";
319 size_t pos = outputroot.find(remove_this);
320 if (pos != string::npos)
322 outputroot.erase(pos, remove_this.length());
342 out->
AddNode(
"TOWER_SIM_HCALIN");
343 out->
AddNode(
"TOWER_RAW_HCALIN");
344 out->
AddNode(
"TOWER_CALIB_HCALIN");
345 out->
AddNode(
"CLUSTER_HCALIN");
346 out->
AddNode(
"TOWER_SIM_HCALOUT");
347 out->
AddNode(
"TOWER_RAW_HCALOUT");
348 out->
AddNode(
"TOWER_CALIB_HCALOUT");
349 out->
AddNode(
"CLUSTER_HCALOUT");
350 out->
AddNode(
"TOWER_SIM_CEMC");
351 out->
AddNode(
"TOWER_RAW_CEMC");
352 out->
AddNode(
"TOWER_CALIB_CEMC");
354 out->
AddNode(
"CLUSTER_POS_COR_CEMC");
356 out->
AddNode(
"TOPOCLUSTER_ALLCALO");
357 out->
AddNode(
"TOPOCLUSTER_EMCAL");
358 out->
AddNode(
"TOPOCLUSTER_HCAL");
359 out->
AddNode(
"GlobalVertexMap");
370 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
371 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
373 cout <<
"-------------------------------------------------" << endl;
374 cout <<
"You are in event display mode. Run one event with" << endl;
375 cout <<
"se->run(1)" << endl;
376 cout <<
"Run Geant4 command with following examples" << endl;
377 gROOT->ProcessLine(
"displaycmd()");
382 string outputfile = outputFile2 +
"_g4hcin_eval.root";
383 string outputfile2 = outputFile2 +
"_hout.root";
384 string outputfile3 = outputFile2 +
"_hin_eval_mod.root";
385 string outputfile4 = outputFile2 +
"_hout_mod.root";
386 string outputfile5 = outputFile2 +
"_cemc_eval.root";
387 string outputfile6 = outputFile2 +
"_cemceval_mod.root";
468 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
469 cout <<
"it will run forever, so I just return without running anything" << endl;
482 std::cout <<
"All done" << std::endl;