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 using namespace std;
24 
40 
42 
43 using namespace reco;
44 
46  public:
49 
50  enum MVAType {
51  kTrig = 0, // MVA for triggering electrons
52  kNonTrig = 1, // MVA for non-triggering electrons
53  kNonTrigPhys14 = 2, // MVA for non-triggering electrons in Phys14
54  };
55 
56  void initialize( std::string methodName,
57  std::string weightsfile,
59  void initialize( std::string methodName,
61  Bool_t useBinnedVersion,
62  std::vector<std::string> weightsfiles );
63 
64  Bool_t isInitialized() const { return fisInitialized; }
65  UInt_t GetMVABin(double eta,double pt ) const;
66 
67  void bindVariables();
68 
69  // for kTrig and kNonTrig algorithm
70  Double_t mvaValue(const reco::GsfElectron& ele,
71  const reco::Vertex& vertex,
72  const TransientTrackBuilder& transientTrackBuilder,
73  noZS::EcalClusterLazyTools myEcalCluster,
74  bool printDebug = kFALSE);
75 
76 
77  Double_t mvaValue(const pat::Electron& ele,
78  bool printDebug);
79 
80 
81 
82 
83 
84 
85 
86  private:
87 
88  std::vector<TMVA::Reader*> fTMVAReader;
89  std::vector<TMVA::MethodBase*> fTMVAMethod;
94  UInt_t fNMVABins;
95 
96  Float_t fMVAVar_fbrem;
97  Float_t fMVAVar_kfchi2;
98  Float_t fMVAVar_kfhits; //number of layers
99  Float_t fMVAVar_kfhitsall; //number of hits
101 
102  Float_t fMVAVar_deta;
103  Float_t fMVAVar_dphi;
105 
106  Float_t fMVAVar_see;
107  Float_t fMVAVar_spp;
111  Float_t fMVAVar_R9;
112 
113  Float_t fMVAVar_HoE;
114  Float_t fMVAVar_EoP;
117  Float_t fMVAVar_EoPout;
119 
120  Float_t fMVAVar_d0;
121  Float_t fMVAVar_ip3d;
123 
124  Float_t fMVAVar_eta;
125  Float_t fMVAVar_abseta;
126  Float_t fMVAVar_pt;
127  Float_t fMVAVar_rho;
130  Float_t fMVAVar_SCeta;
131 
147 
148 };
149 
150 #endif
type
Definition: HCALResponse.h:21
static AlgebraicMatrix initialize()
std::vector< TMVA::MethodBase * > fTMVAMethod
T eta() const
std::vector< TMVA::Reader * > fTMVAReader
Analysis-level electron class.
Definition: Electron.h:52