CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
23 
24 #include "TMVA/Tools.h"
25 #include "TMVA/Reader.h"
26 
28 
29 #include <vector>
30 
32 {
33  public:
34 
37 
38  void beginEvent(const edm::Event&, const edm::EventSetup&);
39 
40  double MVAValue(Float_t TauPt,
41  Float_t TauEtaAtEcalEntrance,
42  Float_t TauPhi,
43  Float_t TauLeadChargedPFCandPt,
44  Float_t TauLeadChargedPFCandEtaAtEcalEntrance,
45  Float_t TauEmFraction,
46  Float_t TauLeadPFChargedHadrHoP,
47  Float_t TauLeadPFChargedHadrEoP,
48  Float_t TauVisMassIn,
49  Float_t TaudCrackEta,
50  Float_t TaudCrackPhi,
51  Float_t TauHasGsf,
52  Int_t TauSignalPFGammaCandsIn,
53  Int_t TauSignalPFGammaCandsOut,
54  const std::vector<Float_t>& GammasdEtaInSigCone,
55  const std::vector<Float_t>& GammasdPhiInSigCone,
56  const std::vector<Float_t>& GammasPtInSigCone,
57  const std::vector<Float_t>& GammasdEtaOutSigCone,
58  const std::vector<Float_t>& GammasdPhiOutSigCone,
59  const std::vector<Float_t>& GammasPtOutSigCone,
60  Float_t ElecEta,
61  Float_t ElecPhi,
62  Float_t ElecEtotOverPin,
63  Float_t ElecChi2NormGSF,
64  Float_t ElecChi2NormKF,
65  Float_t ElecGSFNumHits,
66  Float_t ElecKFNumHits,
67  Float_t ElecGSFTrackResol,
68  Float_t ElecGSFTracklnPt,
69  Float_t ElecPin,
70  Float_t ElecPout,
71  Float_t ElecEecal,
72  Float_t ElecDeltaEta,
73  Float_t ElecDeltaPhi,
74  Float_t ElecMvaInSigmaEtaEta,
75  Float_t ElecMvaInHadEnergy,
76  Float_t ElecMvaInDeltaEta
77  );
78 
79  double MVAValue(Float_t TauPt,
80  Float_t TauEtaAtEcalEntrance,
81  Float_t TauPhi,
82  Float_t TauLeadChargedPFCandPt,
83  Float_t TauLeadChargedPFCandEtaAtEcalEntrance,
84  Float_t TauEmFraction,
85  Float_t TauLeadPFChargedHadrHoP,
86  Float_t TauLeadPFChargedHadrEoP,
87  Float_t TauVisMassIn,
88  Float_t TaudCrackEta,
89  Float_t TaudCrackPhi,
90  Float_t TauHasGsf,
91  Int_t TauSignalPFGammaCandsIn,
92  Int_t TauSignalPFGammaCandsOut,
93  Float_t TauGammaEtaMomIn,
94  Float_t TauGammaEtaMomOut,
95  Float_t TauGammaPhiMomIn,
96  Float_t TauGammaPhiMomOut,
97  Float_t TauGammaEnFracIn,
98  Float_t TauGammaEnFracOut,
99  Float_t ElecEta,
100  Float_t ElecPhi,
101  Float_t ElecEtotOverPin,
102  Float_t ElecChi2NormGSF,
103  Float_t ElecChi2NormKF,
104  Float_t ElecGSFNumHits,
105  Float_t ElecKFNumHits,
106  Float_t ElecGSFTrackResol,
107  Float_t ElecGSFTracklnPt,
108  Float_t ElecPin,
109  Float_t ElecPout,
110  Float_t ElecEecal,
111  Float_t ElecDeltaEta,
112  Float_t ElecDeltaPhi,
113  Float_t ElecMvaInSigmaEtaEta,
114  Float_t ElecMvaInHadEnergy,
115  Float_t ElecMvaInDeltaEta
116  );
117 
118  // CV: this function can be called for all categories
119  double MVAValue(const reco::PFTau& thePFTau,
120  const reco::GsfElectron& theGsfEle);
121  // CV: this function can be called for category 1 only !!
122  double MVAValue(const reco::PFTau& thePFTau);
123 
124  private:
125 
126  double dCrackEta(double eta);
127  double minimum(double a,double b);
128  double dCrackPhi(double phi, double eta);
129 
133 
142 
151 
160 
161  std::vector<TFile*> inputFilesToDelete_;
162 
164 };
165 
166 #endif
double minimum(double a, double b)
std::string mvaName_woGwGSF_BL_
std::string mvaName_NoEleMatch_woGwoGSF_BL_
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_
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)
Float_t * Var_NoEleMatch_wGwoGSF_Endcap_
double b
Definition: hdecay.h:120
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_