ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/MVATools.h
Revision: 1.6
Committed: Sun Dec 11 00:03:05 2011 UTC (13 years, 4 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.5: +2 -2 lines
Log Message:
more photon updates for mva plus id analysis

File Contents

# Content
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 MVATools();
39
40
41 //--------------------------
42 //MVA
43 //--------------------------
44
45 void InitializeMVA(int VariableType, TString EndcapWeights,TString BarrelWeights);
46 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 Int_t PassElectronVetoInt(const Photon* p, const ElectronCol* els);
48 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
50 TMVA::Reader *fReaderEndcap;
51 TMVA::Reader *fReaderBarrel;
52
53 //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
75 float EtaWidth;
76 float PhiWidth;
77 float CoviEtaiPhi;
78 float CoviPhiiPhi;
79
80 float NVertexes;
81 float RelPreshowerEnergy;
82
83 //variable for v2 and v1
84 float RelIsoEcal;
85 float RelIsoHcal;
86 float tIso1;
87 float tIso3;
88 float tIso2;
89
90 //variables used to compute mva variables
91
92 Bool_t PassElecVeto;
93
94 double ecalIso3;
95 double ecalIso4;
96 double hcalIso4;
97
98 unsigned int wVtxInd;
99
100 double trackIso1;
101
102 // track iso only
103 double trackIso3;
104
105 // track iso worst vtx
106 double trackIso2;
107
108 double combIso1;
109 double combIso2;
110
111 double RawEnergy;
112
113 double dRTrack;
114
115 //spectator variables
116 double Pt_MVA;
117 double ScEta_MVA;
118
119 Bool_t isbarrel;
120
121 // check which category it is ...
122 int _tCat;
123
124 //MVA
125 Bool_t PassMVA;
126 TMVA::Reader *reader;
127 Float_t bdt;
128 Int_t PassElecVetoInt;
129
130 ClassDef(MVATools, 0)
131 };
132 }
133
134 #endif