1 #ifndef FUN4ALL_EMCAL_C
2 #define FUN4ALL_EMCAL_C
4 #include <caloreco/CaloTowerCalib.h>
5 #include <caloreco/RawClusterBuilderTemplate.h>
6 #include <caloreco/RawClusterPositionCorrection.h>
28 #include <litecaloeval/LiteCaloEval.h>
29 #include <calib_emc_pi0/pi0EtaByEta.h>
31 R__LOAD_LIBRARY(libcdbobjects)
32 R__LOAD_LIBRARY(libfun4all.so)
33 R__LOAD_LIBRARY(libfun4allraw.so)
34 R__LOAD_LIBRARY(libcalo_reco.so)
35 R__LOAD_LIBRARY(libffamodules.so)
36 R__LOAD_LIBRARY(libLiteCaloEvalTowSlope.so)
37 R__LOAD_LIBRARY(libcalibCaloEmc_pi0.so)
44 void Fun4All_EMCal(
int nevents = 0, const std::
string &fname = "inputdata.txt",
int iter = 2, const std::
string &calib_fname="local_calib_copy.
root")
46 bool enableMasking = 0;
59 getline(file, first_file);
66 cout <<
"run number = " << runnumber << endl;
78 std::string OutFile = Form(
"OUTHIST_iter%d_%s",iter , filename.c_str());
84 cout <<
"creating " << calib_fname.c_str() <<
" and exiting" << endl;
91 std::cout <<
"Calibrating EMCal" << std::endl;
100 std::cout <<
"Building clusters" << std::endl;
105 emc_prof +=
"/EmcProfile/CEMCprof_Thresh30MeV.root";
140 TFile* f_done_signal =
new TFile(
"DONE.root",
"recreate");
141 std::cout <<
"All done!" << std::endl;
150 string default_time_independent_calib =
"cemc_pi0_twrSlope_v1_default";
151 string m_calibName =
"cemc_pi0_twrSlope_v1";
156 if (!calibdir.empty())
165 if (calibdir.empty())
167 std::cout <<
"No EMCal Calibration NOT even a default" << std::endl;
172 std::cout <<
"No specific file for " << m_calibName <<
" found, using default calib " << default_time_independent_calib << std::endl;
175 TFile *f_cdb =
new TFile(filePath.c_str());
176 f_cdb->Cp(fname.c_str());
178 std::cout <<
"created local Calib file for run " << runNumber <<
" named " << fname << std::endl;