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 
27 
28 #include "TMVA/Tools.h"
29 #include "TMVA/Reader.h"
30 
32 
33 #include <vector>
34 
36 public:
39 
40  void beginEvent(const edm::Event&, const edm::EventSetup&);
41 
42  double MVAValue(Float_t TauPt,
43  Float_t TauEtaAtEcalEntrance,
44  Float_t TauPhi,
45  Float_t TauLeadChargedPFCandPt,
46  Float_t TauLeadChargedPFCandEtaAtEcalEntrance,
47  Float_t TauEmFraction,
48  Float_t TauLeadPFChargedHadrHoP,
49  Float_t TauLeadPFChargedHadrEoP,
50  Float_t TauVisMassIn,
51  Float_t TaudCrackEta,
52  Float_t TaudCrackPhi,
53  Float_t TauHasGsf,
54  Int_t TauSignalPFGammaCandsIn,
55  Int_t TauSignalPFGammaCandsOut,
56  const std::vector<Float_t>& GammasdEtaInSigCone,
57  const std::vector<Float_t>& GammasdPhiInSigCone,
58  const std::vector<Float_t>& GammasPtInSigCone,
59  const std::vector<Float_t>& GammasdEtaOutSigCone,
60  const std::vector<Float_t>& GammasdPhiOutSigCone,
61  const std::vector<Float_t>& GammasPtOutSigCone,
62  Float_t ElecEta,
63  Float_t ElecPhi,
64  Float_t ElecEtotOverPin,
65  Float_t ElecChi2NormGSF,
66  Float_t ElecChi2NormKF,
67  Float_t ElecGSFNumHits,
68  Float_t ElecKFNumHits,
69  Float_t ElecGSFTrackResol,
70  Float_t ElecGSFTracklnPt,
71  Float_t ElecPin,
72  Float_t ElecPout,
73  Float_t ElecEecal,
74  Float_t ElecDeltaEta,
75  Float_t ElecDeltaPhi,
76  Float_t ElecMvaInSigmaEtaEta,
77  Float_t ElecMvaInHadEnergy,
78  Float_t ElecMvaInDeltaEta);
79 
80  double MVAValue(Float_t TauPt,
81  Float_t TauEtaAtEcalEntrance,
82  Float_t TauPhi,
83  Float_t TauLeadChargedPFCandPt,
84  Float_t TauLeadChargedPFCandEtaAtEcalEntrance,
85  Float_t TauEmFraction,
86  Float_t TauLeadPFChargedHadrHoP,
87  Float_t TauLeadPFChargedHadrEoP,
88  Float_t TauVisMassIn,
89  Float_t TaudCrackEta,
90  Float_t TaudCrackPhi,
91  Float_t TauHasGsf,
92  Int_t TauSignalPFGammaCandsIn,
93  Int_t TauSignalPFGammaCandsOut,
94  Float_t TauGammaEtaMomIn,
95  Float_t TauGammaEtaMomOut,
96  Float_t TauGammaPhiMomIn,
97  Float_t TauGammaPhiMomOut,
98  Float_t TauGammaEnFracIn,
99  Float_t TauGammaEnFracOut,
100  Float_t ElecEta,
101  Float_t ElecPhi,
102  Float_t ElecEtotOverPin,
103  Float_t ElecChi2NormGSF,
104  Float_t ElecChi2NormKF,
105  Float_t ElecGSFNumHits,
106  Float_t ElecKFNumHits,
107  Float_t ElecGSFTrackResol,
108  Float_t ElecGSFTracklnPt,
109  Float_t ElecPin,
110  Float_t ElecPout,
111  Float_t ElecEecal,
112  Float_t ElecDeltaEta,
113  Float_t ElecDeltaPhi,
114  Float_t ElecMvaInSigmaEtaEta,
115  Float_t ElecMvaInHadEnergy,
116  Float_t ElecMvaInDeltaEta);
117 
118  // this function can be called for all categories
119  double MVAValue(const reco::PFTau& thePFTau, const reco::GsfElectron& theGsfEle);
120  // this function can be called for category 1 only !!
121  double MVAValue(const reco::PFTau& thePFTau);
122 
123  // this function can be called for all categories
124  double MVAValue(const pat::Tau& theTau, const pat::Electron& theEle);
125  // this function can be called for category 1 only !!
126  double MVAValue(const pat::Tau& theTau);
127  // track extrapolation to ECAL entrance (used to re-calculate variables that might not be available on miniAOD)
129 
130 private:
131  double dCrackEta(double eta);
132  double minimum(double a, double b);
133  double dCrackPhi(double phi, double eta);
134 
138 
147 
149 
158 
167 
168  std::vector<TFile*> inputFilesToDelete_;
169 
171 
173 };
174 
175 #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 &)
PositionAtECalEntranceComputer positionAtECalEntrance_
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:55
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_