CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonMVAEstimator.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------------------------------
2 // $Id $
3 //
4 // MuonMVAEstimator
5 //
6 // Helper Class for applying MVA electron ID selection
7 //
8 // Authors: S.Xie
9 //--------------------------------------------------------------------------------------------------
10 
11 
16 
17 #ifndef MuonMVAEstimator_H
18 #define MuonMVAEstimator_H
19 
20 #include "MuonEffectiveArea.h"
21 #include <vector>
22 #include <TROOT.h>
23 #include "TMVA/Factory.h"
24 #include "TMVA/Tools.h"
25 #include "TMVA/Reader.h"
27 
29  public:
32 
33  enum MVAType {
38  };
39 
40  void initialize( std::string methodName,
41  std::string weightsfile,
43  void initialize( std::string methodName,
45  Bool_t useBinnedVersion,
46  std::vector<std::string> weightsfiles );
47 
48  Bool_t isInitialized() const { return fisInitialized; }
49  UInt_t GetMVABin( double eta, double pt,
50  Bool_t isGlobal, Bool_t isTrackerMuon) const;
51 
52  void SetPrintMVADebug(bool b) { fPrintMVADebug = b; }
53 
54  void bindVariables();
55 
56  Double_t mvaValue_Iso(
57  Double_t Pt,
58  Double_t Eta,
59  Bool_t isGlobalMuon,
60  Bool_t isTrackerMuon,
61  Double_t Rho,
63  Double_t ChargedIso_DR0p0To0p1,
64  Double_t ChargedIso_DR0p1To0p2,
65  Double_t ChargedIso_DR0p2To0p3,
66  Double_t ChargedIso_DR0p3To0p4,
67  Double_t ChargedIso_DR0p4To0p5,
68  Double_t GammaIso_DR0p0To0p1,
69  Double_t GammaIso_DR0p1To0p2,
70  Double_t GammaIso_DR0p2To0p3,
71  Double_t GammaIso_DR0p3To0p4,
72  Double_t GammaIso_DR0p4To0p5,
73  Double_t NeutralHadronIso_DR0p0To0p1,
74  Double_t NeutralHadronIso_DR0p1To0p2,
75  Double_t NeutralHadronIso_DR0p2To0p3,
76  Double_t NeutralHadronIso_DR0p3To0p4,
77  Double_t NeutralHadronIso_DR0p4To0p5,
78  Bool_t printDebug = kFALSE );
79 
80  Double_t mvaValueIso(HWW&, Int_t imu, Double_t rho, MuonEffectiveArea::MuonEffectiveAreaTarget EATarget,
81  std::vector<Int_t> IdentifiedEle, std::vector<Int_t> IdentifiedMu, Bool_t printDebug );
82 
83 
84  private:
85  std::vector<TMVA::Reader*> fTMVAReader;
91  UInt_t fNMVABins;
92 
93  // spectator categorization variables
94  Float_t fMVAVar_MuEta;
95  Float_t fMVAVar_MuPt;
97 
98  //ID variables
105  Float_t fMVAVar_MuD0;
106  Float_t fMVAVar_MuIP3d;
115 
116  //isolation
132 
133 
134  // isolation variables II
141 
142 };
143 
144 #endif
type
Definition: HCALResponse.h:21
Float_t fMVAVar_MuNPixelHits
Float_t fMVAVar_MuNValidHits
Float_t fMVAVar_MuCaloCompatibility
Float_t fMVAVar_ChargedIso_DR0p2To0p3
std::vector< TMVA::Reader * > fTMVAReader
Float_t fMVAVar_NeutralHadronIso_DR0p1To0p2
Float_t fMVAVar_ChargedIso_DR0p3To0p4
Definition: DDAxes.h:10
Float_t fMVAVar_ChargedIso_DR0p1To0p2
Float_t fMVAVar_GammaIso_DR0p4To0p5
Float_t fMVAVar_GammaIso_DR0p3To0p4
std::string fMethodname
void SetPrintMVADebug(bool b)
Float_t fMVAVar_GammaIso_DR0p1To0p2
T eta() const
Float_t fMVAVar_MuSegmentCompatibility
UInt_t GetMVABin(double eta, double pt, Bool_t isGlobal, Bool_t isTrackerMuon) const
Float_t fMVAVar_ChargedIso_DR0p0To0p1
Double_t mvaValue_Iso(Double_t Pt, Double_t Eta, Bool_t isGlobalMuon, Bool_t isTrackerMuon, Double_t Rho, MuonEffectiveArea::MuonEffectiveAreaTarget EATarget, Double_t ChargedIso_DR0p0To0p1, Double_t ChargedIso_DR0p1To0p2, Double_t ChargedIso_DR0p2To0p3, Double_t ChargedIso_DR0p3To0p4, Double_t ChargedIso_DR0p4To0p5, Double_t GammaIso_DR0p0To0p1, Double_t GammaIso_DR0p1To0p2, Double_t GammaIso_DR0p2To0p3, Double_t GammaIso_DR0p3To0p4, Double_t GammaIso_DR0p4To0p5, Double_t NeutralHadronIso_DR0p0To0p1, Double_t NeutralHadronIso_DR0p1To0p2, Double_t NeutralHadronIso_DR0p2To0p3, Double_t NeutralHadronIso_DR0p3To0p4, Double_t NeutralHadronIso_DR0p4To0p5, Bool_t printDebug=kFALSE)
Double_t mvaValueIso(HWW &, Int_t imu, Double_t rho, MuonEffectiveArea::MuonEffectiveAreaTarget EATarget, std::vector< Int_t > IdentifiedEle, std::vector< Int_t > IdentifiedMu, Bool_t printDebug)
Float_t fMVAVar_ChargedIso_DR0p4To0p5
Bool_t isInitialized() const
Float_t fMVAVar_NeutralHadronIso_DR0p3To0p4
Float_t fMVAVar_NeutralHadronIso_DR0p2To0p3
Definition: HWW.h:12
Float_t fMVAVar_MuHadS9Energy
void initialize(std::string methodName, std::string weightsfile, MuonMVAEstimator::MVAType type)
double b
Definition: hdecay.h:120
Float_t fMVAVar_MuDeltaRMean
Float_t fMVAVar_MuTypeBits
Float_t fMVAVar_GammaIso_DR0p0To0p1
Float_t fMVAVar_MuRelIsoPFCharged
Float_t fMVAVar_NeutralHadronIso_DR0p0To0p1
Float_t fMVAVar_NeutralHadronIso_DR0p4To0p5
Float_t fMVAVar_MuGlobalNchi2
Float_t fMVAVar_MuRelIsoPFNeutral
Float_t fMVAVar_GammaIso_DR0p2To0p3
Float_t fMVAVar_MuRelIsoPFPhotons
Float_t fMVAVar_MuEmS9Energy
Float_t fMVAVar_MuNTrackerHits