ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/EGEnergyCorrector.h
Revision: 1.8
Committed: Wed Aug 21 13:16:30 2013 UTC (11 years, 8 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.7: +26 -2 lines
Log Message:
updated photon energy regression weights and implementation

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id $
3     //
4     // EGEnergyCorrector
5     //
6     // Helper Class for photon Identification decisions.
7     //
8     // Authors: J.Bendavid
9     //--------------------------------------------------------------------------------------------------
10    
11     #ifndef MITPHYSICS_UTILS_EGEnergyCorrector_H
12     #define MITPHYSICS_UTILS_EGEnergyCorrector_H
13    
14     #include "MitAna/DataTree/interface/Photon.h"
15     #include "MitAna/DataTree/interface/PhotonCol.h"
16     #include "MitAna/DataTree/interface/TrackCol.h"
17     #include "MitAna/DataTree/interface/Electron.h"
18     #include "MitAna/DataTree/interface/ElectronCol.h"
19     #include "MitAna/DataTree/interface/BaseVertex.h"
20     #include "MitAna/DataTree/interface/DecayParticleCol.h"
21     #include "MitAna/DataTree/interface/VertexCol.h"
22     #include "MitAna/DataTree/interface/BeamSpotCol.h"
23     #include "MitAna/DataTree/interface/TriggerObjectCol.h"
24     #include "MitAna/DataTree/interface/MCParticleCol.h"
25     #include "MitAna/DataTree/interface/SuperCluster.h"
26     #include "MitAna/DataTree/interface/SuperClusterCol.h"
27     #include "MitCommon/MathTools/interface/MathUtils.h"
28     #include "MitPhysics/Utils/interface/PhotonFix.h"
29     #include "MitPhysics/Utils/interface/PhotonTools.h"
30 bendavid 1.8 #include "RooArgList.h"
31 bendavid 1.1
32     class TRandom3;
33 bendavid 1.2 class GBRForest;
34 bendavid 1.8 class HybridGBRForest;
35     class RooRealVar;
36     class RooAbsPdf;
37     class RooAbsReal;
38 bendavid 1.2 // namespace TMVA {
39     // class Reader;
40     // }
41    
42 bendavid 1.1
43     namespace mithep {
44     class EGEnergyCorrector {
45     public:
46     EGEnergyCorrector();
47     ~EGEnergyCorrector();
48    
49 bendavid 1.8 void Initialize(TString phfixstring, TString phfixfile, TString regweights, Int_t version);
50 bendavid 1.1 Bool_t IsInitialized() const { return fIsInitialized; }
51    
52 bendavid 1.7 void CorrectEnergyWithError(Photon *p, const VertexCol *vtxs = 0, Double_t rho = 0., UInt_t version=1, Bool_t applyRescale = kFALSE);
53 bendavid 1.1 std::pair<double,double> CorrectedEnergyWithError(const Photon *p);
54 bendavid 1.4 std::pair<double,double> CorrectedEnergyWithErrorV2(const Photon *p, const VertexCol *vtxs);
55 bendavid 1.7 std::pair<double,double> CorrectedEnergyWithErrorV3(const Photon *p, const VertexCol *vtxs, Double_t rho, Bool_t applyRescale = kFALSE);
56 bendavid 1.4
57 bendavid 1.8 void CorrectedEnergyWithErrorV5(const Photon *p, const VertexCol *vtxs, Double_t rho, Double_t &ecor, Double_t &mean, Double_t &sigma, Double_t &alpha1, Double_t &n1, Double_t &alpha2, Double_t &n2, Double_t &pdfpeakval);
58    
59 bendavid 1.1
60     protected:
61     PhotonFix fPhFix;
62 bendavid 1.2 GBRForest *fReadereb;
63     GBRForest *fReaderebvariance;
64     GBRForest *fReaderee;
65     GBRForest *fReadereevariance;
66 bendavid 1.8
67     HybridGBRForest *fReaderebsemi;
68     HybridGBRForest *fReadereesemi;
69 bendavid 1.1
70 bendavid 1.8 RooRealVar *_mean;
71     RooRealVar *_tgt;
72     RooRealVar *_sigma;
73     RooRealVar *_n1;
74     RooRealVar *_n2;
75    
76     RooAbsReal *_meanlim;
77     RooAbsReal *_sigmalim;
78     RooAbsReal *_n1lim;
79     RooAbsReal *_n2lim;
80    
81     RooAbsPdf *_pdf;
82    
83     RooArgList _args;
84    
85 bendavid 1.1 TString fMethodname;
86    
87     Bool_t fIsInitialized;
88     Bool_t fIsMC;
89 bendavid 1.2
90     Float_t *fVals;
91 bendavid 1.1
92     ClassDef(EGEnergyCorrector, 0) // Muon tools
93     };
94     }
95    
96     #endif