Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
doFitAndCalibUpdate.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file doFitAndCalibUpdate.C
1 
2 #include <calib_emc_pi0/pi0EtaByEta.h>
3 R__LOAD_LIBRARY(libcalibCaloEmc_pi0.so)
4 
5 void doFitAndCalibUpdate(const std::string &hist_fname = "base/combine_out/out2.root", const std::string &calib_fname = "base/local_calib_copy.root" ,int iter = 2)
6 {
7 
8 
9  pi0EtaByEta *caFit = new pi0EtaByEta("calomodulename", "bla.root");
10  caFit->fitEtaSlices(hist_fname.c_str(), Form("fitout_iter%d.root", iter), calib_fname.c_str());
11 
12  size_t pos = calib_fname.find_last_of('.');
13  string f_calib_save_name = calib_fname;
14  f_calib_save_name.insert(pos,Form("_iter%d",iter));
15 
16  TFile* f_calib_mod = new TFile(calib_fname.c_str());
17  f_calib_mod->Cp(f_calib_save_name.c_str());
18 
19  gSystem->Exit(0);
20 }
21 
22