ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/MVATools.h
Revision: 1.1
Committed: Thu Oct 13 17:29:19 2011 UTC (13 years, 6 months ago) by mingyang
Content type: text/plain
Branch: MAIN
Log Message:
PhotonIdMVA added

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 //void InitializeMVA(int VariableType, TString EndcapWeights,TString BarrelWeights);
45 //Bool_t PassMVASelection(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,const ElectronCol *els);
46
47 void InitializeMVA(int VariableType, TString EndcapWeights,TString BarrelWeights);
48 Bool_t PassMVASelection(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,const ElectronCol* els,double MVAPtMin);
49 Int_t PassElectronVetoInt(const Photon* p, const ElectronCol* els);
50 Float_t GetMVAbdtValue(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,const ElectronCol* els);
51
52 TMVA::Reader *fReaderEndcap;
53 TMVA::Reader *fReaderBarrel;
54
55 //MVA variables 0
56 Float_t HoE;
57 Float_t covIEtaIEta;
58 Float_t tIso1;
59 Float_t tIso3;
60 Float_t tIso2;
61 Float_t R9;
62
63 //MVA variables 1
64 float RelIsoEcal;
65 float RelIsoHcal;
66
67 float RelEMax;
68 float RelETop;
69 float RelEBottom;
70 float RelELeft;
71 float RelERight;
72 float RelE2x5Max;
73 float RelE2x5Top;
74 float RelE2x5Bottom;
75 float RelE2x5Left;
76 float RelE2x5Right;
77 float RelE5x5;
78
79 //MVA variables 2
80 float EtaWidth;
81 float PhiWidth;
82 float CoviEtaiPhi;
83 float CoviPhiiPhi;
84 float RelPreshowerEnergy;
85
86 //variables used to compute mva variables
87
88 Bool_t PassElecVeto;
89
90 double ecalIso3;
91 double ecalIso4;
92 double hcalIso4;
93
94 unsigned int wVtxInd;
95
96 double trackIso1;
97
98 // track iso only
99 double trackIso3;
100
101 // track iso worst vtx
102 double trackIso2;
103
104 double combIso1;
105 double combIso2;
106
107 double RawEnergy;
108
109 double dRTrack;
110
111 //spectator variables
112 double Pt_MVA;
113 double ScEta_MVA;
114
115 Bool_t isbarrel;
116
117 // check which category it is ...
118 int _tCat;
119
120 //MVA
121 Bool_t PassMVA;
122 TMVA::Reader *reader;
123 Float_t bdt;
124 Int_t PassElecVetoInt;
125
126 ClassDef(MVATools, 0) // Muon tools
127 };
128 }
129
130 #endif