Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:21:00

0001 #include <calib_emc_pi0/CaloCalibEmc_Pi0.h>
0002 
0003 void save_correc_value(
0004         std::string file_prefix = "m_clust_pi0_iter",
0005         int n_iter = 23
0006     )
0007             
0008 {   
0009     R__LOAD_LIBRARY(libcalibCaloEmc_pi0.so) 
0010 
0011     // file location
0012     std::string macro_loc = "/sphenix/user/sregmi/WORKING_AREA/PI_0/pi0_calib_m-clust/macros/RESULTS/mult_clus_loop_iter/";
0013     
0014     // input file
0015     std::string ifile = macro_loc + file_prefix + std::to_string(n_iter) + "_combined.root";
0016     
0017     // output file
0018     std::string ofile = macro_loc + file_prefix + std::to_string(n_iter) + "_combined_fitted.root";
0019     
0020     std::string infilent = ""; // used for first iteration ONLY
0021     if (n_iter > 1)
0022         {infilent = macro_loc + file_prefix + std::to_string(n_iter-1) + "_combined_fitted.root";}
0023 
0024     std::cout << "input file , " << ifile << std::endl;
0025     std::cout << "output file , " << ofile << std::endl;
0026     std::cout << "incorrect file , " << infilent << std::endl;
0027         
0028     
0029     CaloCalibEmc_Pi0 calo_obj("CaloCalibEmc_Pi0" /* this name goes to SubsysReco  */, ofile.c_str());
0030     //  calo_obj.InitRun(0); // to declare the eta_hist[96] 
0031     calo_obj.Get_Histos(ifile.c_str() , ofile.c_str()); // open the fun4al file and Get eta_hist[96] histos
0032     calo_obj.Fit_Histos_Etas96(infilent.c_str());   // do fittings
0033     calo_obj.End(0);    // save the output file
0034     std::cout << "All Done" << std::endl;
0035     gSystem->Exit(0);
0036 }
0037