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>
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)
45 const
string &outputFile = "oldoutput2",
48 const
int mdc2_4_file_num = 31,
52 const
string &outdir = ".")
64 string inputFile0 =
"DST_CALO_G4HIT_single_pi0_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000062-";
66 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");
355 out->
AddNode(
"CLUSTER_POS_COR_CEMC");
357 out->
AddNode(
"TOPOCLUSTER_ALLCALO");
358 out->
AddNode(
"TOPOCLUSTER_EMCAL");
359 out->
AddNode(
"TOPOCLUSTER_HCAL");
360 out->
AddNode(
"GlobalVertexMap");
371 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
372 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
374 cout <<
"-------------------------------------------------" << endl;
375 cout <<
"You are in event display mode. Run one event with" << endl;
376 cout <<
"se->run(1)" << endl;
377 cout <<
"Run Geant4 command with following examples" << endl;
378 gROOT->ProcessLine(
"displaycmd()");
383 string outputfile = outputFile2 +
"_ho4ho_eval.root";
384 string outputfile2 = outputFile2 +
"_piemc.root";
385 string outputfile3 = outputFile2 +
"_towinfo_pi.root";
386 string outputfile4 = outputFile2 +
"_hcalin.root";
387 string outputfile5 = outputFile2 +
"_hcalin_mod.root";
388 string outputfile6 = outputFile2 +
"_emcal.root";
427 cout <<
"successful registration of pi0 2" << endl;
451 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
452 cout <<
"it will run forever, so I just return without running anything" << endl;
465 std::cout <<
"All done" << std::endl;