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 
38 
40 
42  public:
45 
46  enum MVAType {
47  kTrig = 0, // MVA for triggering electrons
48  kNonTrig = 1, // MVA for non-triggering electrons
49  kNonTrigPhys14 = 2, // MVA for non-triggering electrons in Phys14
50  };
51 
52  void initialize( std::string methodName,
53  std::string weightsfile,
55  void initialize( std::string methodName,
57  Bool_t useBinnedVersion,
58  std::vector<std::string> weightsfiles );
59 
60  Bool_t isInitialized() const { return fisInitialized; }
61  UInt_t GetMVABin(double eta,double pt ) const;
62 
63  void bindVariables();
64 
65  // for kTrig and kNonTrig algorithm
66  Double_t mvaValue(const reco::GsfElectron& ele,
67  const reco::Vertex& vertex,
68  const TransientTrackBuilder& transientTrackBuilder,
69  noZS::EcalClusterLazyTools myEcalCluster,
70  bool printDebug = kFALSE);
71 
72 
73  Double_t mvaValue(const pat::Electron& ele,
74  bool printDebug);
75 
76 
77 
78 
79 
80 
81 
82  private:
83 
84  std::vector<TMVA::Reader*> fTMVAReader;
85  std::vector<TMVA::MethodBase*> fTMVAMethod;
90  UInt_t fNMVABins;
91 
92  Float_t fMVAVar_fbrem;
93  Float_t fMVAVar_kfchi2;
94  Float_t fMVAVar_kfhits; //number of layers
95  Float_t fMVAVar_kfhitsall; //number of hits
96  Float_t fMVAVar_gsfchi2;
97 
98  Float_t fMVAVar_deta;
99  Float_t fMVAVar_dphi;
101 
102  Float_t fMVAVar_see;
103  Float_t fMVAVar_spp;
107  Float_t fMVAVar_R9;
108 
109  Float_t fMVAVar_HoE;
110  Float_t fMVAVar_EoP;
113  Float_t fMVAVar_EoPout;
115 
116  Float_t fMVAVar_d0;
117  Float_t fMVAVar_ip3d;
119 
120  Float_t fMVAVar_eta;
121  Float_t fMVAVar_abseta;
122  Float_t fMVAVar_pt;
123  Float_t fMVAVar_rho;
126  Float_t fMVAVar_SCeta;
127 
143 
144 };
145 
146 #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