CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AntiElectronIDMVA3.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------------------------------
2 // $Id $
3 //
4 // AntiElectronIDMVA3
5 //
6 // Helper Class for applying MVA anti-electron discrimination
7 //
8 // Authors: I.Naranjo
9 //--------------------------------------------------------------------------------------------------
10 
11 #ifndef RECOTAUTAG_RECOTAU_AntiElectronIDMVA3_H
12 #define RECOTAUTAG_RECOTAU_AntiElectronIDMVA3_H
13 
19 
20 #include "TMVA/Tools.h"
21 #include "TMVA/Reader.h"
22 
24 
25 #include <vector>
26 
28 {
29  public:
30 
33 
34  void Initialize_from_file(const std::string& methodName,
35  const std::string& oneProngNoEleMatch0Pi0woGSF_BL,
36  const std::string& oneProngNoEleMatch0Pi0wGSF_BL,
37  const std::string& oneProngNoEleMatch1Pi0woGSF_BL,
38  const std::string& oneProngNoEleMatch1Pi0wGSF_BL,
39  const std::string& oneProng0Pi0woGSF_BL,
40  const std::string& oneProng0Pi0wGSF_BL,
41  const std::string& oneProng1Pi0woGSF_BL,
42  const std::string& oneProng1Pi0wGSF_BL,
43  const std::string& oneProngNoEleMatch0Pi0woGSF_EC,
44  const std::string& oneProngNoEleMatch0Pi0wGSF_EC,
45  const std::string& oneProngNoEleMatch1Pi0woGSF_EC,
46  const std::string& oneProngNoEleMatch1Pi0wGSF_EC,
47  const std::string& oneProng0Pi0woGSF_EC,
48  const std::string& oneProng0Pi0wGSF_EC,
49  const std::string& oneProng1Pi0woGSF_EC,
50  const std::string& oneProng1Pi0wGSF_EC);
51 
52  void Initialize_from_string(const std::string& methodName,
53  const std::string& oneProngNoEleMatch0Pi0woGSF_BL,
54  const std::string& oneProngNoEleMatch0Pi0wGSF_BL,
55  const std::string& oneProngNoEleMatch1Pi0woGSF_BL,
56  const std::string& oneProngNoEleMatch1Pi0wGSF_BL,
57  const std::string& oneProng0Pi0woGSF_BL,
58  const std::string& oneProng0Pi0wGSF_BL,
59  const std::string& oneProng1Pi0woGSF_BL,
60  const std::string& oneProng1Pi0wGSF_BL,
61  const std::string& oneProngNoEleMatch0Pi0woGSF_EC,
62  const std::string& oneProngNoEleMatch0Pi0wGSF_EC,
63  const std::string& oneProngNoEleMatch1Pi0woGSF_EC,
64  const std::string& oneProngNoEleMatch1Pi0wGSF_EC,
65  const std::string& oneProng0Pi0woGSF_EC,
66  const std::string& oneProng0Pi0wGSF_EC,
67  const std::string& oneProng1Pi0woGSF_EC,
68  const std::string& oneProng1Pi0wGSF_EC);
69 
70  double MVAValue(Float_t TauEtaAtEcalEntrance,
71  Float_t TauPt,
72  Float_t TaudCrackEta,
73  Float_t TaudCrackPhi,
74  Float_t TauEmFraction,
75  Float_t TauSignalPFGammaCands,
76  Float_t TauLeadPFChargedHadrHoP,
77  Float_t TauLeadPFChargedHadrEoP,
78  Float_t TauVisMass,
79  Float_t TauHadrMva,
80  const std::vector<Float_t>& GammasdEta,
81  const std::vector<Float_t>& GammasdPhi,
82  const std::vector<Float_t>& GammasPt,
83  Float_t TauKFNumHits,
84  Float_t TauGSFNumHits,
85  Float_t TauGSFChi2,
86  Float_t TauGSFTrackResol,
87  Float_t TauGSFTracklnPt,
88  Float_t TauGSFTrackEta,
89  Float_t TauPhi,
90  Float_t TauSignalPFChargedCands,
91  Float_t TauHasGsf,
92  Float_t ElecEta,
93  Float_t ElecPhi,
94  Float_t ElecPt,
95  Float_t ElecEe,
96  Float_t ElecEgamma,
97  Float_t ElecPin,
98  Float_t ElecPout,
99  Float_t ElecFbrem,
100  Float_t ElecChi2GSF,
101  Float_t ElecGSFNumHits,
102  Float_t ElecGSFTrackResol,
103  Float_t ElecGSFTracklnPt,
104  Float_t ElecGSFTrackEta);
105 
106  double MVAValue(Float_t TauEtaAtEcalEntrance,
107  Float_t TauPt,
108  Float_t TaudCrackEta,
109  Float_t TaudCrackPhi,
110  Float_t TauEmFraction,
111  Float_t TauSignalPFGammaCands,
112  Float_t TauLeadPFChargedHadrHoP,
113  Float_t TauLeadPFChargedHadrEoP,
114  Float_t TauVisMass,
115  Float_t TauHadrMva,
116  Float_t TauGammaEtaMom,
117  Float_t TauGammaPhiMom,
118  Float_t TauGammaEnFrac,
119  Float_t TauKFNumHits,
120  Float_t TauGSFNumHits,
121  Float_t TauGSFChi2,
122  Float_t TauGSFTrackResol,
123  Float_t TauGSFTracklnPt,
124  Float_t TauGSFTrackEta,
125  Float_t TauPhi,
126  Float_t TauSignalPFChargedCands,
127  Float_t TauHasGsf,
128  Float_t ElecEta,
129  Float_t ElecPhi,
130  Float_t ElecPt,
131  Float_t ElecEe,
132  Float_t ElecEgamma,
133  Float_t ElecPin,
134  Float_t ElecPout,
135  Float_t ElecFbrem,
136  Float_t ElecChi2GSF,
137  Float_t ElecGSFNumHits,
138  Float_t ElecGSFTrackResol,
139  Float_t ElecGSFTracklnPt,
140  Float_t ElecGSFTrackEta);
141 
142  // CV: this function can be called for all categories
143  double MVAValue(const reco::PFTau& thePFTau,
144  const reco::GsfElectron& theGsfEle);
145  // CV: this function can be called for category 1 only !!
146  double MVAValue(const reco::PFTau& thePFTau);
147 
148  private:
149 
150  void bookMVAs();
151  double dCrackEta(double eta);
152  double minimum(double a,double b);
153  double dCrackPhi(double phi, double eta);
155  std::string methodName_;
156  TMVA::Reader* fTMVAReader_[16];
157 
158  Float_t GammadEta_;
159  Float_t GammadPhi_;
160  Float_t GammadPt_;
161 
163  Float_t Tau_Pt_;
164  Float_t Tau_dCrackEta_;
165  Float_t Tau_dCrackPhi_;
166  Float_t Tau_EmFraction_;
168  Float_t Tau_HadrHoP_;
169  Float_t Tau_HadrEoP_;
170  Float_t Tau_VisMass_;
171  Float_t Tau_HadrMva_;
175  Float_t Tau_GSFChi2_;
180 
183  Float_t Elec_Fbrem_;
184  Float_t Elec_Chi2GSF_;
189 
191 };
192 
193 #endif
T eta() const
void Initialize_from_file(const std::string &methodName, const std::string &oneProngNoEleMatch0Pi0woGSF_BL, const std::string &oneProngNoEleMatch0Pi0wGSF_BL, const std::string &oneProngNoEleMatch1Pi0woGSF_BL, const std::string &oneProngNoEleMatch1Pi0wGSF_BL, const std::string &oneProng0Pi0woGSF_BL, const std::string &oneProng0Pi0wGSF_BL, const std::string &oneProng1Pi0woGSF_BL, const std::string &oneProng1Pi0wGSF_BL, const std::string &oneProngNoEleMatch0Pi0woGSF_EC, const std::string &oneProngNoEleMatch0Pi0wGSF_EC, const std::string &oneProngNoEleMatch1Pi0woGSF_EC, const std::string &oneProngNoEleMatch1Pi0wGSF_EC, const std::string &oneProng0Pi0woGSF_EC, const std::string &oneProng0Pi0wGSF_EC, const std::string &oneProng1Pi0woGSF_EC, const std::string &oneProng1Pi0wGSF_EC)
double dCrackEta(double eta)
double dCrackPhi(double phi, double eta)
TMVA::Reader * fTMVAReader_[16]
double b
Definition: hdecay.h:120
double minimum(double a, double b)
double a
Definition: hdecay.h:121
void Initialize_from_string(const std::string &methodName, const std::string &oneProngNoEleMatch0Pi0woGSF_BL, const std::string &oneProngNoEleMatch0Pi0wGSF_BL, const std::string &oneProngNoEleMatch1Pi0woGSF_BL, const std::string &oneProngNoEleMatch1Pi0wGSF_BL, const std::string &oneProng0Pi0woGSF_BL, const std::string &oneProng0Pi0wGSF_BL, const std::string &oneProng1Pi0woGSF_BL, const std::string &oneProng1Pi0wGSF_BL, const std::string &oneProngNoEleMatch0Pi0woGSF_EC, const std::string &oneProngNoEleMatch0Pi0wGSF_EC, const std::string &oneProngNoEleMatch1Pi0woGSF_EC, const std::string &oneProngNoEleMatch1Pi0wGSF_EC, const std::string &oneProng0Pi0woGSF_EC, const std::string &oneProng0Pi0wGSF_EC, const std::string &oneProng1Pi0woGSF_EC, const std::string &oneProng1Pi0wGSF_EC)
double MVAValue(Float_t TauEtaAtEcalEntrance, Float_t TauPt, Float_t TaudCrackEta, Float_t TaudCrackPhi, Float_t TauEmFraction, Float_t TauSignalPFGammaCands, Float_t TauLeadPFChargedHadrHoP, Float_t TauLeadPFChargedHadrEoP, Float_t TauVisMass, Float_t TauHadrMva, const std::vector< Float_t > &GammasdEta, const std::vector< Float_t > &GammasdPhi, const std::vector< Float_t > &GammasPt, Float_t TauKFNumHits, Float_t TauGSFNumHits, Float_t TauGSFChi2, Float_t TauGSFTrackResol, Float_t TauGSFTracklnPt, Float_t TauGSFTrackEta, Float_t TauPhi, Float_t TauSignalPFChargedCands, Float_t TauHasGsf, Float_t ElecEta, Float_t ElecPhi, Float_t ElecPt, Float_t ElecEe, Float_t ElecEgamma, Float_t ElecPin, Float_t ElecPout, Float_t ElecFbrem, Float_t ElecChi2GSF, Float_t ElecGSFNumHits, Float_t ElecGSFTrackResol, Float_t ElecGSFTracklnPt, Float_t ElecGSFTrackEta)
Definition: DDAxes.h:10