Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:19:43

0001 #include <GlobalVariables.C>
0002 
0003 #include "litecaloeval/LiteCaloEval.h"
0004 R__LOAD_LIBRARY(libLiteCaloEvalTowSlope.so)
0005 
0006 // File parameters - not modified histos, modified histos, output
0007 void do_eta_fit2_emc(const char * reffile, const char * infile, const char * modfile)
0008 {
0009 
0010   TStopwatch t;
0011   t.Start();
0012 
0013 
0014   gSystem->Load("libLiteCaloEvalTowSlope.so");
0015 
0016   /// create LCE objects, one for a mod set of histos (modlce) and other for non mod set of histos (reflce)
0017   LiteCaloEval reflce, modlce;
0018 
0019 
0020   ///set the calo type to run over
0021   reflce.CaloType(LiteCaloEval::CEMC);
0022   modlce.CaloType(LiteCaloEval::CEMC);
0023 
0024 
0025   /// get histograms for not mod histos
0026   reflce.Get_Histos(reffile);
0027 
0028   /// get histograms for mod histos
0029   modlce.Get_Histos(infile,modfile);
0030 
0031   ///set the fit range
0032   modlce.setFitMin(0.12);
0033   modlce.setFitMax(0.7);
0034 
0035 
0036   /*Fit histos,obtain fit values. Second parameter determines smoothing/include phi loop (individual towers). 
0037     If set to e.g. 10 - do 1 smoothing and run over phi. 
0038     If set to 11, do one smoothing and dont do phi loop. Can do just 0 or 1. Which would be no smoothing, and 
0039     include phi if 0, and dont include if 1.
0040   */
0041   modlce.FitRelativeShifts(&reflce,10);
0042   
0043   t.Stop();
0044   t.Print();
0045 
0046 }