CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
12 
13 
14 #ifndef EGammaMvaEleEstimatorCSA14_H
15 #define EGammaMvaEleEstimatorCSA14_H
16 
17 #include <vector>
18 #include <TROOT.h>
19 #include "TMVA/Factory.h"
20 #include "TMVA/Tools.h"
21 #include "TMVA/Reader.h"
22 
23 
39 
41 
42 
44  public:
47 
48  enum MVAType {
49  kTrig = 0, // MVA for triggering electrons
50  kNonTrig = 1, // MVA for non-triggering electrons
51  kNonTrigPhys14 = 2, // MVA for non-triggering electrons in Phys14
52  };
53 
54  void initialize( std::string methodName,
55  std::string weightsfile,
57  void initialize( std::string methodName,
59  Bool_t useBinnedVersion,
60  std::vector<std::string> weightsfiles );
61 
62  Bool_t isInitialized() const { return fisInitialized; }
63  UInt_t GetMVABin(double eta,double pt ) const;
64 
65  void bindVariables();
66 
67  // for kTrig and kNonTrig algorithm
68  Double_t mvaValue(const reco::GsfElectron& ele,
69  const reco::Vertex& vertex,
70  const TransientTrackBuilder& transientTrackBuilder,
71  noZS::EcalClusterLazyTools myEcalCluster,
72  bool printDebug = kFALSE);
73 
74 
75  Double_t mvaValue(const pat::Electron& ele,
76  bool printDebug);
77 
78 
79 
80 
81 
82 
83 
84  private:
85 
86  std::vector<TMVA::Reader*> fTMVAReader;
87  std::vector<TMVA::MethodBase*> fTMVAMethod;
92  UInt_t fNMVABins;
93 
94  Float_t fMVAVar_fbrem;
95  Float_t fMVAVar_kfchi2;
96  Float_t fMVAVar_kfhits; //number of layers
97  Float_t fMVAVar_kfhitsall; //number of hits
98  Float_t fMVAVar_gsfchi2;
99 
100  Float_t fMVAVar_deta;
101  Float_t fMVAVar_dphi;
103 
104  Float_t fMVAVar_see;
105  Float_t fMVAVar_spp;
109  Float_t fMVAVar_R9;
110 
111  Float_t fMVAVar_HoE;
112  Float_t fMVAVar_EoP;
115  Float_t fMVAVar_EoPout;
117 
118  Float_t fMVAVar_d0;
119  Float_t fMVAVar_ip3d;
121 
122  Float_t fMVAVar_eta;
123  Float_t fMVAVar_abseta;
124  Float_t fMVAVar_pt;
125  Float_t fMVAVar_rho;
128  Float_t fMVAVar_SCeta;
129 
145 
146 };
147 
148 #endif
type
Definition: HCALResponse.h:21
void initialize(std::string methodName, std::string weightsfile, EGammaMvaEleEstimatorCSA14::MVAType type)
std::vector< TMVA::MethodBase * > fTMVAMethod
Double_t mvaValue(const reco::GsfElectron &ele, const reco::Vertex &vertex, const TransientTrackBuilder &transientTrackBuilder, noZS::EcalClusterLazyTools myEcalCluster, bool printDebug=kFALSE)
std::vector< TMVA::Reader * > fTMVAReader
Analysis-level electron class.
Definition: Electron.h:52
UInt_t GetMVABin(double eta, double pt) const