File indexing completed on 2025-08-05 08:19:41
0001
0002 #include <calib_emc_pi0/pi0EtaByEta.h>
0003 R__LOAD_LIBRARY(libcalibCaloEmc_pi0.so)
0004
0005 void doFitAndCalibUpdate(const std::string &hist_fname = "OUTHIST_iter4_DST_CALO_run2pp_new_2024p003-00046754-00000.root", const std::string &calib_fname = "base/local_calib_copy.root" ,int iter = 2)
0006 {
0007
0008
0009 pi0EtaByEta *caFit = new pi0EtaByEta("calomodulename", "bla.root");
0010
0011 caFit->Init(0);
0012 caFit->SetTargetMass(0.1375);
0013 caFit->Split3DHist(hist_fname.c_str(),"split.root");
0014 caFit->fitEtaPhiTowers("split.root", Form("fitout_iter%d.root", iter), calib_fname.c_str());
0015
0016 size_t pos = calib_fname.find_last_of('.');
0017 string f_calib_save_name = calib_fname;
0018 f_calib_save_name.insert(pos,Form("_iter%d",iter));
0019
0020 TFile* f_calib_mod = new TFile(calib_fname.c_str());
0021 f_calib_mod->Cp(f_calib_save_name.c_str());
0022
0023 gSystem->Exit(0);
0024 }
0025
0026