CMS 3D CMS Logo

EGammaMvaEleEstimatorCSA14.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------------------------------
2 // $Id $
3 //
4 // EGammaMvaEleEstimatorCSA14
5 //
6 // Helper Class for applying MVA electron ID selection
7 //
8 // Authors: D.Benedetti, E.DiMaro, S.Xie
9 //--------------------------------------------------------------------------------------------------
10 
11 #ifndef EGammaMvaEleEstimatorCSA14_H
12 #define EGammaMvaEleEstimatorCSA14_H
13 
14 #include <vector>
15 #include <TROOT.h>
16 #include "TMVA/Factory.h"
17 #include "TMVA/Tools.h"
18 #include "TMVA/Reader.h"
19 
35 
37 
39 public:
42 
43  enum MVAType {
44  kTrig = 0, // MVA for triggering electrons
45  kNonTrig = 1, // MVA for non-triggering electrons
46  kNonTrigPhys14 = 2, // MVA for non-triggering electrons in Phys14
47  };
48 
50  void initialize(std::string methodName,
52  Bool_t useBinnedVersion,
53  std::vector<std::string> weightsfiles);
54 
55  Bool_t isInitialized() const { return fisInitialized; }
56  UInt_t GetMVABin(double eta, double pt) const;
57 
58  void bindVariables();
59 
60  // for kTrig and kNonTrig algorithm
61  Double_t mvaValue(const reco::GsfElectron& ele,
62  const reco::Vertex& vertex,
63  const TransientTrackBuilder& transientTrackBuilder,
64  noZS::EcalClusterLazyTools myEcalCluster,
65  bool printDebug = kFALSE);
66 
67  Double_t mvaValue(const pat::Electron& ele, bool printDebug);
68 
69 private:
70  std::vector<TMVA::Reader*> fTMVAReader;
71  std::vector<TMVA::MethodBase*> fTMVAMethod;
76  UInt_t fNMVABins;
77 
78  Float_t fMVAVar_fbrem;
79  Float_t fMVAVar_kfchi2;
80  Float_t fMVAVar_kfhits; //number of layers
81  Float_t fMVAVar_kfhitsall; //number of hits
82  Float_t fMVAVar_gsfchi2;
83 
84  Float_t fMVAVar_deta;
85  Float_t fMVAVar_dphi;
87 
88  Float_t fMVAVar_see;
89  Float_t fMVAVar_spp;
93  Float_t fMVAVar_R9;
94 
95  Float_t fMVAVar_HoE;
96  Float_t fMVAVar_EoP;
97  Float_t fMVAVar_IoEmIoP;
99  Float_t fMVAVar_EoPout;
101 
102  Float_t fMVAVar_d0;
103  Float_t fMVAVar_ip3d;
105 
106  Float_t fMVAVar_eta;
107  Float_t fMVAVar_abseta;
108  Float_t fMVAVar_pt;
109  Float_t fMVAVar_rho;
112  Float_t fMVAVar_SCeta;
113 
129 };
130 
131 #endif
EGammaMvaEleEstimatorCSA14::fTMVAReader
std::vector< TMVA::Reader * > fTMVAReader
Definition: EGammaMvaEleEstimatorCSA14.h:70
Muon.h
EGammaMvaEleEstimatorCSA14::fMVAVar_isBarrel
Float_t fMVAVar_isBarrel
Definition: EGammaMvaEleEstimatorCSA14.h:110
EGammaMvaEleEstimatorCSA14::mvaValue
Double_t mvaValue(const reco::GsfElectron &ele, const reco::Vertex &vertex, const TransientTrackBuilder &transientTrackBuilder, noZS::EcalClusterLazyTools myEcalCluster, bool printDebug=kFALSE)
Definition: EGammaMvaEleEstimatorCSA14.cc:251
PFCandidate.h
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
EGammaMvaEleEstimatorCSA14::fisInitialized
Bool_t fisInitialized
Definition: EGammaMvaEleEstimatorCSA14.h:73
EGammaMvaEleEstimatorCSA14::fMVAVar_GammaIso_DR0p2To0p3
Float_t fMVAVar_GammaIso_DR0p2To0p3
Definition: EGammaMvaEleEstimatorCSA14.h:121
EGammaMvaEleEstimatorCSA14::kNonTrigPhys14
Definition: EGammaMvaEleEstimatorCSA14.h:46
EGammaMvaEleEstimatorCSA14::fMVAVar_IoEmIoP
Float_t fMVAVar_IoEmIoP
Definition: EGammaMvaEleEstimatorCSA14.h:97
EGammaMvaEleEstimatorCSA14::fNMVABins
UInt_t fNMVABins
Definition: EGammaMvaEleEstimatorCSA14.h:76
EGammaMvaEleEstimatorCSA14::fMVAVar_ChargedIso_DR0p4To0p5
Float_t fMVAVar_ChargedIso_DR0p4To0p5
Definition: EGammaMvaEleEstimatorCSA14.h:118
EGammaMvaEleEstimatorCSA14::initialize
void initialize(std::string methodName, std::string weightsfile, EGammaMvaEleEstimatorCSA14::MVAType type)
Definition: EGammaMvaEleEstimatorCSA14.cc:25
EGammaMvaEleEstimatorCSA14::fMVAVar_NeutralHadronIso_DR0p4To0p5
Float_t fMVAVar_NeutralHadronIso_DR0p4To0p5
Definition: EGammaMvaEleEstimatorCSA14.h:128
EGammaMvaEleEstimatorCSA14::fMVAVar_see
Float_t fMVAVar_see
Definition: EGammaMvaEleEstimatorCSA14.h:88
EcalClusterLazyTools.h
EGammaMvaEleEstimatorCSA14::fMVAVar_isEndcap
Float_t fMVAVar_isEndcap
Definition: EGammaMvaEleEstimatorCSA14.h:111
EGammaMvaEleEstimatorCSA14::fMVAVar_ChargedIso_DR0p2To0p3
Float_t fMVAVar_ChargedIso_DR0p2To0p3
Definition: EGammaMvaEleEstimatorCSA14.h:116
EGammaMvaEleEstimatorCSA14::fMVAVar_eta
Float_t fMVAVar_eta
Definition: EGammaMvaEleEstimatorCSA14.h:106
EGammaMvaEleEstimatorCSA14::fMVAVar_kfhitsall
Float_t fMVAVar_kfhitsall
Definition: EGammaMvaEleEstimatorCSA14.h:81
EGammaMvaEleEstimatorCSA14::fMVAVar_eleEoPout
Float_t fMVAVar_eleEoPout
Definition: EGammaMvaEleEstimatorCSA14.h:98
EGammaMvaEleEstimatorCSA14::fMVAVar_GammaIso_DR0p1To0p2
Float_t fMVAVar_GammaIso_DR0p1To0p2
Definition: EGammaMvaEleEstimatorCSA14.h:120
EGammaMvaEleEstimatorCSA14::bindVariables
void bindVariables()
Definition: EGammaMvaEleEstimatorCSA14.cc:451
EGammaMvaEleEstimatorCSA14::fMVAVar_EoP
Float_t fMVAVar_EoP
Definition: EGammaMvaEleEstimatorCSA14.h:96
EGammaMvaEleEstimatorCSA14::fMVAVar_kfchi2
Float_t fMVAVar_kfchi2
Definition: EGammaMvaEleEstimatorCSA14.h:79
EGammaMvaEleEstimatorCSA14::fMVAVar_PreShowerOverRaw
Float_t fMVAVar_PreShowerOverRaw
Definition: EGammaMvaEleEstimatorCSA14.h:100
EGammaMvaEleEstimatorCSA14::fMVAVar_etawidth
Float_t fMVAVar_etawidth
Definition: EGammaMvaEleEstimatorCSA14.h:90
EGammaMvaEleEstimatorCSA14::fMVAVar_GammaIso_DR0p4To0p5
Float_t fMVAVar_GammaIso_DR0p4To0p5
Definition: EGammaMvaEleEstimatorCSA14.h:123
EGammaMvaEleEstimatorCSA14::EGammaMvaEleEstimatorCSA14
EGammaMvaEleEstimatorCSA14()
Definition: EGammaMvaEleEstimatorCSA14.cc:11
EGammaMvaEleEstimatorCSA14::fMVAVar_NeutralHadronIso_DR0p1To0p2
Float_t fMVAVar_NeutralHadronIso_DR0p1To0p2
Definition: EGammaMvaEleEstimatorCSA14.h:125
Track.h
TrackFwd.h
PVValHelper::eta
Definition: PVValidationHelpers.h:69
reco::GsfElectron
Definition: GsfElectron.h:35
GsfElectron.h
EGammaMvaEleEstimatorCSA14::fMVAVar_NeutralHadronIso_DR0p3To0p4
Float_t fMVAVar_NeutralHadronIso_DR0p3To0p4
Definition: EGammaMvaEleEstimatorCSA14.h:127
EGammaMvaEleEstimatorCSA14
Definition: EGammaMvaEleEstimatorCSA14.h:38
EGammaMvaEleEstimatorCSA14::GetMVABin
UInt_t GetMVABin(double eta, double pt) const
Definition: EGammaMvaEleEstimatorCSA14.cc:205
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
EcalClusterLazyToolsT
Definition: EcalClusterLazyTools.h:105
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
TransientTrackBuilder.h
EGammaMvaEleEstimatorCSA14::fMVAVar_deta
Float_t fMVAVar_deta
Definition: EGammaMvaEleEstimatorCSA14.h:84
EGammaMvaEleEstimatorCSA14::fMVAVar_d0
Float_t fMVAVar_d0
Definition: EGammaMvaEleEstimatorCSA14.h:102
EGammaMvaEleEstimatorCSA14::fMVAVar_ChargedIso_DR0p3To0p4
Float_t fMVAVar_ChargedIso_DR0p3To0p4
Definition: EGammaMvaEleEstimatorCSA14.h:117
EGammaMvaEleEstimatorCSA14::fMVAVar_ip3d
Float_t fMVAVar_ip3d
Definition: EGammaMvaEleEstimatorCSA14.h:103
EGammaMvaEleEstimatorCSA14::fMVAVar_pt
Float_t fMVAVar_pt
Definition: EGammaMvaEleEstimatorCSA14.h:108
RefToPtr.h
GsfTrack.h
EGammaMvaEleEstimatorCSA14::fMVAVar_EoPout
Float_t fMVAVar_EoPout
Definition: EGammaMvaEleEstimatorCSA14.h:99
TransientTrackBuilder
Definition: TransientTrackBuilder.h:16
EGammaMvaEleEstimatorCSA14::fMVAVar_abseta
Float_t fMVAVar_abseta
Definition: EGammaMvaEleEstimatorCSA14.h:107
EGammaMvaEleEstimatorCSA14::fMVAVar_kfhits
Float_t fMVAVar_kfhits
Definition: EGammaMvaEleEstimatorCSA14.h:80
EGammaMvaEleEstimatorCSA14::fMVAVar_R9
Float_t fMVAVar_R9
Definition: EGammaMvaEleEstimatorCSA14.h:93
EGammaMvaEleEstimatorCSA14::fMVAVar_ChargedIso_DR0p1To0p2
Float_t fMVAVar_ChargedIso_DR0p1To0p2
Definition: EGammaMvaEleEstimatorCSA14.h:115
EGammaMvaEleEstimatorCSA14::MVAType
MVAType
Definition: EGammaMvaEleEstimatorCSA14.h:43
EGammaMvaEleEstimatorCSA14::fMVAType
MVAType fMVAType
Definition: EGammaMvaEleEstimatorCSA14.h:74
EGammaMvaEleEstimatorCSA14::fMVAVar_NeutralHadronIso_DR0p2To0p3
Float_t fMVAVar_NeutralHadronIso_DR0p2To0p3
Definition: EGammaMvaEleEstimatorCSA14.h:126
ElectronEffectiveArea.h
EGammaMvaEleEstimatorCSA14::fMVAVar_NeutralHadronIso_DR0p0To0p1
Float_t fMVAVar_NeutralHadronIso_DR0p0To0p1
Definition: EGammaMvaEleEstimatorCSA14.h:124
EGammaMvaEleEstimatorCSA14::kNonTrig
Definition: EGammaMvaEleEstimatorCSA14.h:45
type
type
Definition: HCALResponse.h:21
EGammaMvaEleEstimatorCSA14::fMVAVar_fbrem
Float_t fMVAVar_fbrem
Definition: EGammaMvaEleEstimatorCSA14.h:78
IPTools.h
EGammaMvaEleEstimatorCSA14::fMethodname
std::string fMethodname
Definition: EGammaMvaEleEstimatorCSA14.h:72
EGammaMvaEleEstimatorCSA14::fMVAVar_spp
Float_t fMVAVar_spp
Definition: EGammaMvaEleEstimatorCSA14.h:89
EGammaMvaEleEstimatorCSA14::isInitialized
Bool_t isInitialized() const
Definition: EGammaMvaEleEstimatorCSA14.h:55
SuperCluster.h
EGammaMvaEleEstimatorCSA14::fMVAVar_OneMinusE1x5E5x5
Float_t fMVAVar_OneMinusE1x5E5x5
Definition: EGammaMvaEleEstimatorCSA14.h:92
EGammaMvaEleEstimatorCSA14::fMVAVar_ip3dSig
Float_t fMVAVar_ip3dSig
Definition: EGammaMvaEleEstimatorCSA14.h:104
EGammaMvaEleEstimatorCSA14::fMVAVar_ChargedIso_DR0p0To0p1
Float_t fMVAVar_ChargedIso_DR0p0To0p1
Definition: EGammaMvaEleEstimatorCSA14.h:114
Electron.h
EGammaMvaEleEstimatorCSA14::fMVAVar_HoE
Float_t fMVAVar_HoE
Definition: EGammaMvaEleEstimatorCSA14.h:95
EGammaMvaEleEstimatorCSA14::~EGammaMvaEleEstimatorCSA14
~EGammaMvaEleEstimatorCSA14()
Definition: EGammaMvaEleEstimatorCSA14.cc:17
EGammaMvaEleEstimatorCSA14::fTMVAMethod
std::vector< TMVA::MethodBase * > fTMVAMethod
Definition: EGammaMvaEleEstimatorCSA14.h:71
pat::Electron
Analysis-level electron class.
Definition: Electron.h:51
EGammaMvaEleEstimatorCSA14::fUseBinnedVersion
Bool_t fUseBinnedVersion
Definition: EGammaMvaEleEstimatorCSA14.h:75
HLT_2018_cff.printDebug
printDebug
Definition: HLT_2018_cff.py:34187
EGammaMvaEleEstimatorCSA14::fMVAVar_SCeta
Float_t fMVAVar_SCeta
Definition: EGammaMvaEleEstimatorCSA14.h:112
EGammaMvaEleEstimatorCSA14::fMVAVar_detacalo
Float_t fMVAVar_detacalo
Definition: EGammaMvaEleEstimatorCSA14.h:86
EGammaMvaEleEstimatorCSA14::kTrig
Definition: EGammaMvaEleEstimatorCSA14.h:44
reco::Vertex
Definition: Vertex.h:35
EGammaMvaEleEstimatorCSA14::fMVAVar_rho
Float_t fMVAVar_rho
Definition: EGammaMvaEleEstimatorCSA14.h:109
PFCandidateFwd.h
EGammaMvaEleEstimatorCSA14::fMVAVar_phiwidth
Float_t fMVAVar_phiwidth
Definition: EGammaMvaEleEstimatorCSA14.h:91
EGammaMvaEleEstimatorCSA14::fMVAVar_GammaIso_DR0p3To0p4
Float_t fMVAVar_GammaIso_DR0p3To0p4
Definition: EGammaMvaEleEstimatorCSA14.h:122
EGammaMvaEleEstimatorCSA14::fMVAVar_gsfchi2
Float_t fMVAVar_gsfchi2
Definition: EGammaMvaEleEstimatorCSA14.h:82
EGammaMvaEleEstimatorCSA14::fMVAVar_GammaIso_DR0p0To0p1
Float_t fMVAVar_GammaIso_DR0p0To0p1
Definition: EGammaMvaEleEstimatorCSA14.h:119
EGammaMvaEleEstimatorCSA14::fMVAVar_dphi
Float_t fMVAVar_dphi
Definition: EGammaMvaEleEstimatorCSA14.h:85