ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/MVATools.h
Revision: 1.9
Committed: Sun May 27 19:41:21 2012 UTC (12 years, 11 months ago) by mingyang
Content type: text/plain
Branch: MAIN
Changes since 1.8: +2 -2 lines
Log Message:
20112/2012 id

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 mingyang 1.8 #include "MitAna/DataTree/interface/PFCandidateCol.h"
29 mingyang 1.1
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 mingyang 1.9 Float_t GetMVAbdtValue_2011(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho,const ElectronCol* els=0, Bool_t applyElectronVeto=kTRUE);
49     Float_t GetMVAbdtValue_2012_globe(const Photon* p,const Vertex* vtx,const TrackCol* trackCol,const VertexCol* vtxCol,Double_t _tRho, const PFCandidateCol *fPFCands,const ElectronCol* els=0, Bool_t applyElectronVeto=kTRUE);
50 mingyang 1.2
51     TMVA::Reader *fReaderEndcap;
52     TMVA::Reader *fReaderBarrel;
53    
54 mingyang 1.4 //MVA Variables
55     float HoE;
56     float covIEtaIEta;
57     float tIso1abs;
58     float tIso3abs;
59     float tIso2abs;
60     float R9;
61    
62     float absIsoEcal;
63     float absIsoHcal;
64     float RelEMax;
65     float RelETop;
66     float RelEBottom;
67     float RelELeft;
68     float RelERight;
69     float RelE2x5Max;
70     float RelE2x5Top;
71     float RelE2x5Bottom;
72     float RelE2x5Left;
73     float RelE2x5Right;
74     float RelE5x5;
75 mingyang 1.1
76 mingyang 1.4 float EtaWidth;
77     float PhiWidth;
78     float CoviEtaiPhi;
79     float CoviPhiiPhi;
80 mingyang 1.1
81 mingyang 1.4 float NVertexes;
82     float RelPreshowerEnergy;
83 mingyang 1.1
84 mingyang 1.4 //variable for v2 and v1
85     float RelIsoEcal;
86     float RelIsoHcal;
87     float tIso1;
88     float tIso3;
89     float tIso2;
90    
91 bendavid 1.7 float ScEta;
92    
93 mingyang 1.4 //variables used to compute mva variables
94    
95     Bool_t PassElecVeto;
96    
97     double ecalIso3;
98     double ecalIso4;
99     double hcalIso4;
100    
101     unsigned int wVtxInd;
102    
103     double trackIso1;
104    
105     // track iso only
106     double trackIso3;
107    
108     // track iso worst vtx
109     double trackIso2;
110    
111     double combIso1;
112     double combIso2;
113    
114     double RawEnergy;
115    
116     double dRTrack;
117    
118     //spectator variables
119     double Pt_MVA;
120     double ScEta_MVA;
121    
122     Bool_t isbarrel;
123    
124     // check which category it is ...
125     int _tCat;
126 mingyang 1.8
127     //1201 variable
128     float myphoton_pfchargedisogood03;
129     float myphoton_pfchargedisobad03;
130     float myphoton_pfphotoniso03;
131     float myphoton_sieie;
132     float myphoton_sieip;
133     float myphoton_etawidth;
134     float myphoton_phiwidth;
135     float myphoton_r9;
136     float myphoton_s4ratio;
137     float myphoton_SCeta;
138     float event_rho;
139     float myphoton_ESEffSigmaRR;
140    
141 mingyang 1.4 //MVA
142     Bool_t PassMVA;
143     TMVA::Reader *reader;
144     Float_t bdt;
145     Int_t PassElecVetoInt;
146    
147     ClassDef(MVATools, 0)
148     };
149 mingyang 1.1 }
150    
151     #endif