CMS 3D CMS Logo

AntiElectronIDMVA6.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------------------------------
2 // AntiElectronIDMVA6
3 //
4 // Helper Class for applying MVA anti-electron discrimination
5 //
6 // Authors: F.Colombo, C.Veelken
7 //--------------------------------------------------------------------------------------------------
8 
9 #ifndef RECOTAUTAG_RECOTAU_AntiElectronIDMVA6_H
10 #define RECOTAUTAG_RECOTAU_AntiElectronIDMVA6_H
11 
16 
25 
28 
29 #include "TMVA/Tools.h"
30 #include "TMVA/Reader.h"
31 
33 
34 #include <vector>
35 
37 {
38  public:
39 
42 
43  void beginEvent(const edm::Event&, const edm::EventSetup&);
44 
45  double MVAValue(Float_t TauPt,
46  Float_t TauEtaAtEcalEntrance,
47  Float_t TauPhi,
48  Float_t TauLeadChargedPFCandPt,
49  Float_t TauLeadChargedPFCandEtaAtEcalEntrance,
50  Float_t TauEmFraction,
51  Float_t TauLeadPFChargedHadrHoP,
52  Float_t TauLeadPFChargedHadrEoP,
53  Float_t TauVisMassIn,
54  Float_t TaudCrackEta,
55  Float_t TaudCrackPhi,
56  Float_t TauHasGsf,
57  Int_t TauSignalPFGammaCandsIn,
58  Int_t TauSignalPFGammaCandsOut,
59  const std::vector<Float_t>& GammasdEtaInSigCone,
60  const std::vector<Float_t>& GammasdPhiInSigCone,
61  const std::vector<Float_t>& GammasPtInSigCone,
62  const std::vector<Float_t>& GammasdEtaOutSigCone,
63  const std::vector<Float_t>& GammasdPhiOutSigCone,
64  const std::vector<Float_t>& GammasPtOutSigCone,
65  Float_t ElecEta,
66  Float_t ElecPhi,
67  Float_t ElecEtotOverPin,
68  Float_t ElecChi2NormGSF,
69  Float_t ElecChi2NormKF,
70  Float_t ElecGSFNumHits,
71  Float_t ElecKFNumHits,
72  Float_t ElecGSFTrackResol,
73  Float_t ElecGSFTracklnPt,
74  Float_t ElecPin,
75  Float_t ElecPout,
76  Float_t ElecEecal,
77  Float_t ElecDeltaEta,
78  Float_t ElecDeltaPhi,
79  Float_t ElecMvaInSigmaEtaEta,
80  Float_t ElecMvaInHadEnergy,
81  Float_t ElecMvaInDeltaEta
82  );
83 
84  double MVAValue(Float_t TauPt,
85  Float_t TauEtaAtEcalEntrance,
86  Float_t TauPhi,
87  Float_t TauLeadChargedPFCandPt,
88  Float_t TauLeadChargedPFCandEtaAtEcalEntrance,
89  Float_t TauEmFraction,
90  Float_t TauLeadPFChargedHadrHoP,
91  Float_t TauLeadPFChargedHadrEoP,
92  Float_t TauVisMassIn,
93  Float_t TaudCrackEta,
94  Float_t TaudCrackPhi,
95  Float_t TauHasGsf,
96  Int_t TauSignalPFGammaCandsIn,
97  Int_t TauSignalPFGammaCandsOut,
98  Float_t TauGammaEtaMomIn,
99  Float_t TauGammaEtaMomOut,
100  Float_t TauGammaPhiMomIn,
101  Float_t TauGammaPhiMomOut,
102  Float_t TauGammaEnFracIn,
103  Float_t TauGammaEnFracOut,
104  Float_t ElecEta,
105  Float_t ElecPhi,
106  Float_t ElecEtotOverPin,
107  Float_t ElecChi2NormGSF,
108  Float_t ElecChi2NormKF,
109  Float_t ElecGSFNumHits,
110  Float_t ElecKFNumHits,
111  Float_t ElecGSFTrackResol,
112  Float_t ElecGSFTracklnPt,
113  Float_t ElecPin,
114  Float_t ElecPout,
115  Float_t ElecEecal,
116  Float_t ElecDeltaEta,
117  Float_t ElecDeltaPhi,
118  Float_t ElecMvaInSigmaEtaEta,
119  Float_t ElecMvaInHadEnergy,
120  Float_t ElecMvaInDeltaEta
121  );
122 
123  // this function can be called for all categories
124  double MVAValue(const reco::PFTau& thePFTau,
125  const reco::GsfElectron& theGsfEle);
126  // this function can be called for category 1 only !!
127  double MVAValue(const reco::PFTau& thePFTau);
128 
129  // this function can be called for all categories
130  double MVAValue(const pat::Tau& theTau,
131  const pat::Electron& theEle);
132  // this function can be called for category 1 only !!
133  double MVAValue(const pat::Tau& theTau);
134  // track extrapolation to ECAL entrance (used to re-calculate varibales that might not be available on miniAOD)
136 
137  private:
138 
139  double dCrackEta(double eta);
140  double minimum(double a,double b);
141  double dCrackPhi(double phi, double eta);
142 
146 
155 
157 
166 
175 
176  std::vector<TFile*> inputFilesToDelete_;
177 
178  double bField_;
180 };
181 
182 #endif
double minimum(double a, double b)
std::string mvaName_woGwGSF_BL_
std::string mvaName_NoEleMatch_woGwoGSF_BL_
bool atECalEntrance(const reco::Candidate *part, math::XYZPoint &pos)
std::string mvaName_NoEleMatch_woGwoGSF_EC_
edm::FileInPath inputFileName_
AntiElectronIDMVA6(const edm::ParameterSet &)
const GBRForest * mva_wGwGSF_EC_
Float_t * Var_NoEleMatch_wGwoGSF_Barrel_
double dCrackPhi(double phi, double eta)
const GBRForest * mva_NoEleMatch_woGwoGSF_EC_
std::string mvaName_NoEleMatch_wGwoGSF_EC_
void beginEvent(const edm::Event &, const edm::EventSetup &)
const GBRForest * mva_NoEleMatch_wGwoGSF_BL_
Float_t * Var_NoEleMatch_woGwoGSF_Endcap_
std::vector< TFile * > inputFilesToDelete_
const GBRForest * mva_woGwGSF_EC_
Analysis-level tau class.
Definition: Tau.h:56
std::string mvaName_wGwGSF_EC_
double MVAValue(Float_t TauPt, Float_t TauEtaAtEcalEntrance, Float_t TauPhi, Float_t TauLeadChargedPFCandPt, Float_t TauLeadChargedPFCandEtaAtEcalEntrance, Float_t TauEmFraction, Float_t TauLeadPFChargedHadrHoP, Float_t TauLeadPFChargedHadrEoP, Float_t TauVisMassIn, Float_t TaudCrackEta, Float_t TaudCrackPhi, Float_t TauHasGsf, Int_t TauSignalPFGammaCandsIn, Int_t TauSignalPFGammaCandsOut, const std::vector< Float_t > &GammasdEtaInSigCone, const std::vector< Float_t > &GammasdPhiInSigCone, const std::vector< Float_t > &GammasPtInSigCone, const std::vector< Float_t > &GammasdEtaOutSigCone, const std::vector< Float_t > &GammasdPhiOutSigCone, const std::vector< Float_t > &GammasPtOutSigCone, Float_t ElecEta, Float_t ElecPhi, Float_t ElecEtotOverPin, Float_t ElecChi2NormGSF, Float_t ElecChi2NormKF, Float_t ElecGSFNumHits, Float_t ElecKFNumHits, Float_t ElecGSFTrackResol, Float_t ElecGSFTracklnPt, Float_t ElecPin, Float_t ElecPout, Float_t ElecEecal, Float_t ElecDeltaEta, Float_t ElecDeltaPhi, Float_t ElecMvaInSigmaEtaEta, Float_t ElecMvaInHadEnergy, Float_t ElecMvaInDeltaEta)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
part
Definition: HCALResponse.h:20
Float_t * Var_NoEleMatch_wGwoGSF_Endcap_
double b
Definition: hdecay.h:120
Analysis-level electron class.
Definition: Electron.h:52
const GBRForest * mva_wGwGSF_BL_
const GBRForest * mva_woGwGSF_BL_
const GBRForest * mva_NoEleMatch_wGwoGSF_EC_
double a
Definition: hdecay.h:121
std::string mvaName_wGwGSF_BL_
std::string mvaName_NoEleMatch_wGwoGSF_BL_
double dCrackEta(double eta)
const GBRForest * mva_NoEleMatch_woGwoGSF_BL_
std::string mvaName_woGwGSF_EC_
Float_t * Var_NoEleMatch_woGwoGSF_Barrel_