ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/MVATools.h
Revision: 1.4
Committed: Mon Dec 5 00:48:08 2011 UTC (13 years, 5 months ago) by mingyang
Content type: text/plain
Branch: MAIN
Changes since 1.3: +85 -81 lines
Log Message:
set bdt function and pass mva function changed

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     Bool_t PassMVASelection(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,const ElectronCol* els,Float_t bdtCutBarrel, Float_t bdtCutEndcap);
47     Int_t PassElectronVetoInt(const Photon* p, const ElectronCol* els);
48 mingyang 1.2 Float_t GetMVAbdtValue(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,const ElectronCol* els);
49    
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     //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 mingyang 1.1 }
133    
134     #endif