ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/MVATools.h
Revision: 1.7
Committed: Sat Dec 17 20:00:40 2011 UTC (13 years, 4 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_028, Mit_027, Mit_027a, Mit_025e, Mit_025d
Changes since 1.6: +2 -0 lines
Log Message:
Update photon id mva, fix preselection bug

File Contents

# User Rev Content
1 mingyang 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id $
3     //
4     // MVATools
5     //
6     // Helper Class for photon Identification decisions.
7     //
8     // Authors: M.Yang 2011/10/12
9     //--------------------------------------------------------------------------------------------------
10    
11     #ifndef MITPHYSICS_UTILS_MVATOOLS_H
12     #define MITPHYSICS_UTILS_MVATOOLS_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    
29    
30     class TRandom3;
31     namespace TMVA {//MVA
32     class Reader;
33     }
34    
35     namespace mithep {
36     class MVATools {
37     public:
38 mingyang 1.4 MVATools();
39 mingyang 1.2
40 mingyang 1.4
41     //--------------------------
42     //MVA
43     //--------------------------
44    
45     void InitializeMVA(int VariableType, TString EndcapWeights,TString BarrelWeights);
46 bendavid 1.6 Bool_t PassMVASelection(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,Float_t bdtCutBarrel, Float_t bdtCutEndcap, const ElectronCol* els=0, Bool_t applyElectronVeto=kTRUE);
47 mingyang 1.4 Int_t PassElectronVetoInt(const Photon* p, const ElectronCol* els);
48 bendavid 1.6 Float_t GetMVAbdtValue(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho, const ElectronCol* els=0, Bool_t applyElectronVeto=kTRUE);
49 mingyang 1.2
50     TMVA::Reader *fReaderEndcap;
51     TMVA::Reader *fReaderBarrel;
52    
53 mingyang 1.4 //MVA Variables
54     float HoE;
55     float covIEtaIEta;
56     float tIso1abs;
57     float tIso3abs;
58     float tIso2abs;
59     float R9;
60    
61     float absIsoEcal;
62     float absIsoHcal;
63     float RelEMax;
64     float RelETop;
65     float RelEBottom;
66     float RelELeft;
67     float RelERight;
68     float RelE2x5Max;
69     float RelE2x5Top;
70     float RelE2x5Bottom;
71     float RelE2x5Left;
72     float RelE2x5Right;
73     float RelE5x5;
74 mingyang 1.1
75 mingyang 1.4 float EtaWidth;
76     float PhiWidth;
77     float CoviEtaiPhi;
78     float CoviPhiiPhi;
79 mingyang 1.1
80 mingyang 1.4 float NVertexes;
81     float RelPreshowerEnergy;
82 mingyang 1.1
83 mingyang 1.4 //variable for v2 and v1
84     float RelIsoEcal;
85     float RelIsoHcal;
86     float tIso1;
87     float tIso3;
88     float tIso2;
89    
90 bendavid 1.7 float ScEta;
91    
92 mingyang 1.4 //variables used to compute mva variables
93    
94     Bool_t PassElecVeto;
95    
96     double ecalIso3;
97     double ecalIso4;
98     double hcalIso4;
99    
100     unsigned int wVtxInd;
101    
102     double trackIso1;
103    
104     // track iso only
105     double trackIso3;
106    
107     // track iso worst vtx
108     double trackIso2;
109    
110     double combIso1;
111     double combIso2;
112    
113     double RawEnergy;
114    
115     double dRTrack;
116    
117     //spectator variables
118     double Pt_MVA;
119     double ScEta_MVA;
120    
121     Bool_t isbarrel;
122    
123     // check which category it is ...
124     int _tCat;
125    
126     //MVA
127     Bool_t PassMVA;
128     TMVA::Reader *reader;
129     Float_t bdt;
130     Int_t PassElecVetoInt;
131    
132     ClassDef(MVATools, 0)
133     };
134 mingyang 1.1 }
135    
136     #endif