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>
31 #include <calib_emc_pi0/CaloCalibEmc_Pi0.h>
33 R__LOAD_LIBRARY(libfun4all.so)
34 R__LOAD_LIBRARY(libcaloCalibDBFile.so)
35 R__LOAD_LIBRARY(libcalibCaloEmc_pi0.so)
42 const
int mdc2_4_file_num = 1,
43 const
string &outputFile = "out_jan23.
root",
45 const
string &outdir = ".")
50 string inputFile0 =
"DST_CALO_G4HIT_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000062-";
51 string inputFile1 =
"DST_VERTEX_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000062-";
52 string inputFile2 =
"DST_TRUTH_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000062-";
55 int ynum_int = 100000+ mdc2_4_file_num;
59 inputFile0 += yn_tstr.Data();
60 inputFile1 += yn_tstr.Data();
61 inputFile2 += yn_tstr.Data();
63 inputFile0 +=
".root";
64 inputFile1 +=
".root";
65 inputFile2 +=
".root";
67 cout <<
"running over these files" << endl;
68 cout << inputFile0 << endl;
69 cout << inputFile1 << endl;
388 string outputroot = outputFile;
389 string remove_this =
".root";
390 size_t pos = outputroot.find(remove_this);
391 if (pos != string::npos)
393 outputroot.erase(pos, remove_this.length());
466 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
467 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
469 cout <<
"-------------------------------------------------" << endl;
470 cout <<
"You are in event display mode. Run one event with" << endl;
471 cout <<
"se->run(1)" << endl;
472 cout <<
"Run Geant4 command with following examples" << endl;
473 gROOT->ProcessLine(
"displaycmd()");
484 cout <<
"successful registration of pi0 " << endl;
496 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
497 cout <<
"it will run forever, so I just return without running anything" << endl;
508 if (Enable::QA)
QA_Output(outputroot +
"_qa.root");
515 std::cout <<
"All done" << std::endl;