Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:23:26

0001 #ifndef PhysicsTools_Heppy_RochCor_h
0002 #define PhysicsTools_Heppy_RochCor_h
0003 
0004 ////  VERSION 4, taken from http://www-cdf.fnal.gov/~jyhan/cms_momscl/cms_RochCor_manual.html on 19 september 2012
0005 ////  moved static const float from .h to .cc to make the gcc434 happy
0006 
0007 #include <iostream>
0008 #include <TChain.h>
0009 #include <TClonesArray.h>
0010 #include <TString.h>
0011 #include <map>
0012 
0013 #include <TSystem.h>
0014 #include <TROOT.h>
0015 #include <TMath.h>
0016 #include <TLorentzVector.h>
0017 #include <TRandom3.h>
0018 
0019 namespace heppy {
0020 
0021   class RochCor {
0022   public:
0023     RochCor();
0024     RochCor(int seed);
0025     ~RochCor();
0026 
0027     void momcor_mc(TLorentzVector&, float, float, int);
0028     void momcor_data(TLorentzVector&, float, float, int);
0029 
0030     void musclefit_data(TLorentzVector&, TLorentzVector&);
0031 
0032     float zptcor(float);
0033     int etabin(float);
0034     int phibin(float);
0035 
0036   private:
0037     TRandom3 eran;
0038     TRandom3 sran;
0039 
0040     //  static float netabin[9] = {-2.4,-2.1,-1.4,-0.7,0.0,0.7,1.4,2.1,2.4};
0041     static const float netabin[9];
0042 
0043     ////^^^^^------------ GP BEGIN
0044     static const double pi;
0045     static const float
0046         genm_smr;  //gen mass peak with eta dependent gaussian smearing => better match in Z mass profile vs. eta/phi
0047     static const float genm;  //gen mass peak without smearing => Z mass profile vs. eta/phi in CMS note
0048 
0049     static const float recmA;        //rec mass peak in MC (2011A)
0050     static const float drecmA;       //rec mass peak in data (2011A)
0051     static const float mgsclA_stat;  //stat. error of global factor for mass peak in MC (2011A)
0052     static const float mgsclA_syst;  //syst. error of global factor for mass peak in MC (2011A)
0053     static const float dgsclA_stat;  //stat. error of global factor for mass peak in data (2011A)
0054     static const float dgsclA_syst;  //syst. error of global factor for mass peak in data (2011A)
0055     static const float recmB;        //rec mass peak in MC (2011B)
0056     static const float drecmB;       //rec mass peak in data (2011B)
0057     static const float mgsclB_stat;  //stat. error of global factor for mass peak in MC (2011B)
0058     static const float mgsclB_syst;  //syst. error of global factor for mass peak in MC (2011B)
0059     static const float dgsclB_stat;  //stat. error of global factor for mass peak in data (2011B)
0060     static const float dgsclB_syst;  //syst. error of global factor for mass peak in data (2011B)
0061 
0062     //iteration2 after FSR : after Z Pt correction
0063     static const float deltaA;
0064     static const float deltaA_stat;
0065     static const float deltaA_syst;
0066 
0067     static const float sfA;
0068     static const float sfA_stat;
0069     static const float sfA_syst;
0070 
0071     static const float deltaB;
0072     static const float deltaB_stat;
0073     static const float deltaB_syst;
0074 
0075     static const float sfB;
0076     static const float sfB_stat;
0077     static const float sfB_syst;
0078 
0079     static const float apar;   //+- 0.002
0080     static const float bpar;   //+- 1.57968e-06
0081     static const float cpar;   //+- 1.92775e-06
0082     static const float d0par;  //+- 3.16301e-06
0083     static const float e0par;  //+- 0.0249021
0084     static const float d1par;  //+- 1.12386e-05
0085     static const float e1par;  //+- 0.17896
0086     static const float d2par;  //+- 5.68386e-06
0087     static const float e2par;  //+- 0.0431732
0088                                ////^^^^^------------ GP END
0089 
0090     //---------------------------------------------------------------------------------------------
0091 
0092     static const float dcor_bfA[8][8];
0093     static const float dcor_maA[8][8];
0094     static const float mcor_bfA[8][8];
0095     static const float mcor_maA[8][8];
0096     static const float dcor_bfAer[8][8];
0097     static const float dcor_maAer[8][8];
0098     static const float mcor_bfAer[8][8];
0099     static const float mcor_maAer[8][8];
0100 
0101     static const float dcor_bfB[8][8];
0102     static const float dcor_maB[8][8];
0103     static const float mcor_bfB[8][8];
0104     static const float mcor_maB[8][8];
0105     static const float dcor_bfBer[8][8];
0106     static const float dcor_maBer[8][8];
0107     static const float mcor_bfBer[8][8];
0108     static const float mcor_maBer[8][8];
0109 
0110     //=======================================================================================================
0111 
0112     static const float dmavgA[8][8];
0113     static const float dpavgA[8][8];
0114     static const float mmavgA[8][8];
0115     static const float mpavgA[8][8];
0116 
0117     static const float dmavgB[8][8];
0118     static const float dpavgB[8][8];
0119     static const float mmavgB[8][8];
0120     static const float mpavgB[8][8];
0121 
0122     //===============================================================================================
0123     //parameters for Z pt correction
0124     static const int nptbins = 84;
0125     static const float ptlow[85];
0126 
0127     static const float zptscl[84];
0128     static const float zptscler[84];
0129 
0130     float mptsys_mc_dm[8][8];
0131     float mptsys_mc_da[8][8];
0132     float mptsys_da_dm[8][8];
0133     float mptsys_da_da[8][8];
0134   };
0135 }  // namespace heppy
0136 
0137 #endif