ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/EGEnergyCorrector.h
Revision: 1.9
Committed: Tue Aug 27 15:27:49 2013 UTC (11 years, 8 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.8: +2 -0 lines
Log Message:
fix possible small memory leak

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.9 #include "RooArgSet.h"
32 bendavid 1.1
33     class TRandom3;
34 bendavid 1.2 class GBRForest;
35 bendavid 1.8 class HybridGBRForest;
36     class RooRealVar;
37     class RooAbsPdf;
38     class RooAbsReal;
39 bendavid 1.2 // namespace TMVA {
40     // class Reader;
41     // }
42    
43 bendavid 1.1
44     namespace mithep {
45     class EGEnergyCorrector {
46     public:
47     EGEnergyCorrector();
48     ~EGEnergyCorrector();
49    
50 bendavid 1.8 void Initialize(TString phfixstring, TString phfixfile, TString regweights, Int_t version);
51 bendavid 1.1 Bool_t IsInitialized() const { return fIsInitialized; }
52    
53 bendavid 1.7 void CorrectEnergyWithError(Photon *p, const VertexCol *vtxs = 0, Double_t rho = 0., UInt_t version=1, Bool_t applyRescale = kFALSE);
54 bendavid 1.1 std::pair<double,double> CorrectedEnergyWithError(const Photon *p);
55 bendavid 1.4 std::pair<double,double> CorrectedEnergyWithErrorV2(const Photon *p, const VertexCol *vtxs);
56 bendavid 1.7 std::pair<double,double> CorrectedEnergyWithErrorV3(const Photon *p, const VertexCol *vtxs, Double_t rho, Bool_t applyRescale = kFALSE);
57 bendavid 1.4
58 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);
59    
60 bendavid 1.1
61     protected:
62     PhotonFix fPhFix;
63 bendavid 1.2 GBRForest *fReadereb;
64     GBRForest *fReaderebvariance;
65     GBRForest *fReaderee;
66     GBRForest *fReadereevariance;
67 bendavid 1.8
68     HybridGBRForest *fReaderebsemi;
69     HybridGBRForest *fReadereesemi;
70 bendavid 1.1
71 bendavid 1.8 RooRealVar *_mean;
72     RooRealVar *_tgt;
73     RooRealVar *_sigma;
74     RooRealVar *_n1;
75     RooRealVar *_n2;
76    
77     RooAbsReal *_meanlim;
78     RooAbsReal *_sigmalim;
79     RooAbsReal *_n1lim;
80     RooAbsReal *_n2lim;
81    
82     RooAbsPdf *_pdf;
83    
84     RooArgList _args;
85 bendavid 1.9 RooArgSet _normset;
86 bendavid 1.8
87 bendavid 1.1 TString fMethodname;
88    
89     Bool_t fIsInitialized;
90     Bool_t fIsMC;
91 bendavid 1.2
92     Float_t *fVals;
93 bendavid 1.1
94     ClassDef(EGEnergyCorrector, 0) // Muon tools
95     };
96     }
97    
98     #endif