CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AntiElectronIDMVA5.cc
Go to the documentation of this file.
2 
4 
10 
13 
14 #include <TFile.h>
15 
17  : isInitialized_(false),
18  mva_NoEleMatch_woGwoGSF_BL_(0),
19  mva_NoEleMatch_woGwGSF_BL_(0),
20  mva_NoEleMatch_wGwoGSF_BL_(0),
21  mva_NoEleMatch_wGwGSF_BL_(0),
22  mva_woGwoGSF_BL_(0),
23  mva_woGwGSF_BL_(0),
24  mva_wGwoGSF_BL_(0),
25  mva_wGwGSF_BL_(0),
26  mva_NoEleMatch_woGwoGSF_EC_(0),
27  mva_NoEleMatch_woGwGSF_EC_(0),
28  mva_NoEleMatch_wGwoGSF_EC_(0),
29  mva_NoEleMatch_wGwGSF_EC_(0),
30  mva_woGwoGSF_EC_(0),
31  mva_woGwGSF_EC_(0),
32  mva_wGwoGSF_EC_(0),
33  mva_wGwGSF_EC_(0)
34 {
35  loadMVAfromDB_ = cfg.exists("loadMVAfromDB") ? cfg.getParameter<bool>("loadMVAfromDB"): false;
36  if ( !loadMVAfromDB_ ) {
37  if(cfg.exists("inputFileName")){
38  inputFileName_ = cfg.getParameter<edm::FileInPath>("inputFileName");
39  }else throw cms::Exception("MVA input not defined") << "Requested to load tau MVA input from ROOT file but no file provided in cfg file";
40 
41  }
42  mvaName_NoEleMatch_woGwoGSF_BL_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_woGwoGSF_BL");
43  mvaName_NoEleMatch_woGwGSF_BL_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_woGwGSF_BL");
44  mvaName_NoEleMatch_wGwoGSF_BL_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_wGwoGSF_BL");
45  mvaName_NoEleMatch_wGwGSF_BL_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_wGwGSF_BL");
46  mvaName_woGwoGSF_BL_ = cfg.getParameter<std::string>("mvaName_woGwoGSF_BL");
47  mvaName_woGwGSF_BL_ = cfg.getParameter<std::string>("mvaName_woGwGSF_BL");
48  mvaName_wGwoGSF_BL_ = cfg.getParameter<std::string>("mvaName_wGwoGSF_BL");
49  mvaName_wGwGSF_BL_ = cfg.getParameter<std::string>("mvaName_wGwGSF_BL");
50  mvaName_NoEleMatch_woGwoGSF_EC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_woGwoGSF_EC");
51  mvaName_NoEleMatch_woGwGSF_EC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_woGwGSF_EC");
52  mvaName_NoEleMatch_wGwoGSF_EC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_wGwoGSF_EC");
53  mvaName_NoEleMatch_wGwGSF_EC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_wGwGSF_EC");
54  mvaName_woGwoGSF_EC_ = cfg.getParameter<std::string>("mvaName_woGwoGSF_EC");
55  mvaName_woGwGSF_EC_ = cfg.getParameter<std::string>("mvaName_woGwGSF_EC");
56  mvaName_wGwoGSF_EC_ = cfg.getParameter<std::string>("mvaName_wGwoGSF_EC");
57  mvaName_wGwGSF_EC_ = cfg.getParameter<std::string>("mvaName_wGwGSF_EC");
58 
59  Var_NoEleMatch_woGwoGSF_Barrel_ = new Float_t[10];
60  Var_NoEleMatch_woGwGSF_Barrel_ = new Float_t[16];
61  Var_NoEleMatch_wGwoGSF_Barrel_ = new Float_t[14];
62  Var_NoEleMatch_wGwGSF_Barrel_ = new Float_t[20];
63  Var_woGwoGSF_Barrel_ = new Float_t[18];
64  Var_woGwGSF_Barrel_ = new Float_t[24];
65  Var_wGwoGSF_Barrel_ = new Float_t[22];
66  Var_wGwGSF_Barrel_ = new Float_t[28];
67  Var_NoEleMatch_woGwoGSF_Endcap_ = new Float_t[9];
68  Var_NoEleMatch_woGwGSF_Endcap_ = new Float_t[15];
69  Var_NoEleMatch_wGwoGSF_Endcap_ = new Float_t[13];
70  Var_NoEleMatch_wGwGSF_Endcap_ = new Float_t[19];
71  Var_woGwoGSF_Endcap_ = new Float_t[17];
72  Var_woGwGSF_Endcap_ = new Float_t[23];
73  Var_wGwoGSF_Endcap_ = new Float_t[21];
74  Var_wGwGSF_Endcap_ = new Float_t[27];
75 
76  verbosity_ = 0;
77 }
78 
80 {
85  delete [] Var_woGwoGSF_Barrel_;
86  delete [] Var_woGwGSF_Barrel_;
87  delete [] Var_wGwoGSF_Barrel_;
88  delete [] Var_wGwGSF_Barrel_;
93  delete [] Var_woGwoGSF_Endcap_;
94  delete [] Var_woGwGSF_Endcap_;
95  delete [] Var_wGwoGSF_Endcap_;
96  delete [] Var_wGwGSF_Endcap_;
97  if ( !loadMVAfromDB_ ){
102  delete mva_woGwoGSF_BL_;
103  delete mva_woGwGSF_BL_;
104  delete mva_wGwoGSF_BL_;
105  delete mva_wGwGSF_BL_;
110  delete mva_woGwoGSF_EC_;
111  delete mva_woGwGSF_EC_;
112  delete mva_wGwoGSF_EC_;
113  delete mva_wGwGSF_EC_;
114  }
115  for ( std::vector<TFile*>::iterator it = inputFilesToDelete_.begin();
116  it != inputFilesToDelete_.end(); ++it ) {
117  delete (*it);
118  }
119 }
120 
121 namespace
122 {
123  const GBRForest* loadMVAfromFile(TFile* inputFile, const std::string& mvaName)
124  {
125 
126  //const GBRForest* mva = dynamic_cast<GBRForest*>(inputFile->Get(mvaName.data())); // CV: dynamic_cast<GBRForest*> fails for some reason ?!
127  const GBRForest* mva = (GBRForest*)inputFile->Get(mvaName.data());
128  if ( !mva )
129  throw cms::Exception("PFRecoTauDiscriminationAgainstMuonMVA::loadMVA")
130  << " Failed to load MVA = " << mvaName.data() << " from file " << " !!\n";
131 
132  return mva;
133  }
134 
135  const GBRForest* loadMVAfromDB(const edm::EventSetup& es, const std::string& mvaName)
136  {
138  es.get<GBRWrapperRcd>().get(mvaName, mva);
139  return mva.product();
140  }
141 }
142 
144 {
145  if ( !isInitialized_ ) {
146  if ( loadMVAfromDB_ ) {
163  } else {
164  if ( inputFileName_.location() == edm::FileInPath::Unknown ) throw cms::Exception("PFRecoTauDiscriminationAgainstMuonMVA::loadMVA")
165  << " Failed to find File = " << inputFileName_ << " !!\n";
166  TFile* inputFile = new TFile(inputFileName_.fullPath().data());
167 
168  mva_NoEleMatch_woGwoGSF_BL_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_woGwoGSF_BL_);
169  mva_NoEleMatch_woGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_woGwGSF_BL_);
170  mva_NoEleMatch_wGwoGSF_BL_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_wGwoGSF_BL_);
171  mva_NoEleMatch_wGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_wGwGSF_BL_);
172  mva_woGwoGSF_BL_ = loadMVAfromFile(inputFile, mvaName_woGwoGSF_BL_);
173  mva_woGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_woGwGSF_BL_);
174  mva_wGwoGSF_BL_ = loadMVAfromFile(inputFile, mvaName_wGwoGSF_BL_);
175  mva_wGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_wGwGSF_BL_);
176  mva_NoEleMatch_woGwoGSF_EC_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_woGwoGSF_EC_);
177  mva_NoEleMatch_woGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_woGwGSF_EC_);
178  mva_NoEleMatch_wGwoGSF_EC_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_wGwoGSF_EC_);
179  mva_NoEleMatch_wGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_wGwGSF_EC_);
180  mva_woGwoGSF_EC_ = loadMVAfromFile(inputFile, mvaName_woGwoGSF_EC_);
181  mva_woGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_woGwGSF_EC_);
182  mva_wGwoGSF_EC_ = loadMVAfromFile(inputFile, mvaName_wGwoGSF_EC_);
183  mva_wGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_wGwGSF_EC_);
184  inputFilesToDelete_.push_back(inputFile);
185  }
186  isInitialized_ = true;
187  }
188 }
189 
190 double AntiElectronIDMVA5::MVAValue(Float_t TauEtaAtEcalEntrance,
191  Float_t TauPt,
192  Float_t TauLeadChargedPFCandEtaAtEcalEntrance,
193  Float_t TauLeadChargedPFCandPt,
194  Float_t TaudCrackEta,
195  Float_t TaudCrackPhi,
196  Float_t TauEmFraction,
197  Float_t TauSignalPFGammaCands,
198  Float_t TauLeadPFChargedHadrHoP,
199  Float_t TauLeadPFChargedHadrEoP,
200  Float_t TauVisMass,
201  Float_t TauHadrMva,
202  const std::vector<Float_t>& GammasdEta,
203  const std::vector<Float_t>& GammasdPhi,
204  const std::vector<Float_t>& GammasPt,
205  Float_t TauKFNumHits,
206  Float_t TauGSFNumHits,
207  Float_t TauGSFChi2,
208  Float_t TauGSFTrackResol,
209  Float_t TauGSFTracklnPt,
210  Float_t TauGSFTrackEta,
211  Float_t TauPhi,
212  Float_t TauSignalPFChargedCands,
213  Float_t TauHasGsf,
214  Float_t ElecEta,
215  Float_t ElecPhi,
216  Float_t ElecPt,
217  Float_t ElecEe,
218  Float_t ElecEgamma,
219  Float_t ElecPin,
220  Float_t ElecPout,
221  Float_t ElecFbrem,
222  Float_t ElecChi2GSF,
223  Float_t ElecGSFNumHits,
224  Float_t ElecGSFTrackResol,
225  Float_t ElecGSFTracklnPt,
226  Float_t ElecGSFTrackEta)
227 {
228  double sumPt = 0.;
229  double dEta = 0.;
230  double dEta2 = 0.;
231  double dPhi = 0.;
232  double dPhi2 = 0.;
233  double sumPt2 = 0.;
234  for ( unsigned int i = 0 ; i < GammasPt.size() ; ++i ) {
235  double pt_i = GammasPt[i];
236  double phi_i = GammasdPhi[i];
237  if ( GammasdPhi[i] > M_PI ) phi_i = GammasdPhi[i] - 2*M_PI;
238  else if ( GammasdPhi[i] < -M_PI ) phi_i = GammasdPhi[i] + 2*M_PI;
239  double eta_i = GammasdEta[i];
240  sumPt += pt_i;
241  sumPt2 += (pt_i*pt_i);
242  dEta += (pt_i*eta_i);
243  dEta2 += (pt_i*eta_i*eta_i);
244  dPhi += (pt_i*phi_i);
245  dPhi2 += (pt_i*phi_i*phi_i);
246  }
247 
248  Float_t TauGammaEnFrac = sumPt/TauPt;
249 
250  if ( sumPt > 0. ) {
251  dEta /= sumPt;
252  dPhi /= sumPt;
253  dEta2 /= sumPt;
254  dPhi2 /= sumPt;
255  }
256 
257  Float_t TauGammaEtaMom = std::sqrt(dEta2)*std::sqrt(TauGammaEnFrac)*TauPt;
258  Float_t TauGammaPhiMom = std::sqrt(dPhi2)*std::sqrt(TauGammaEnFrac)*TauPt;
259 
260  return MVAValue(TauEtaAtEcalEntrance,
261  TauPt,
262  TauLeadChargedPFCandEtaAtEcalEntrance,
263  TauLeadChargedPFCandPt,
264  TaudCrackEta,
265  TaudCrackPhi,
266  TauEmFraction,
267  TauSignalPFGammaCands,
268  TauLeadPFChargedHadrHoP,
269  TauLeadPFChargedHadrEoP,
270  TauVisMass,
271  TauHadrMva,
272  TauGammaEtaMom,
273  TauGammaPhiMom,
274  TauGammaEnFrac,
275  TauKFNumHits,
276  TauGSFNumHits,
277  TauGSFChi2,
278  TauGSFTrackResol,
279  TauGSFTracklnPt,
280  TauGSFTrackEta,
281  TauPhi,
282  TauSignalPFChargedCands,
283  TauHasGsf,
284  ElecEta,
285  ElecPhi,
286  ElecPt,
287  ElecEe,
288  ElecEgamma,
289  ElecPin,
290  ElecPout,
291  ElecFbrem,
292  ElecChi2GSF,
293  ElecGSFNumHits,
294  ElecGSFTrackResol,
295  ElecGSFTracklnPt,
296  ElecGSFTrackEta);
297 }
298 
299 double AntiElectronIDMVA5::MVAValue(Float_t TauEtaAtEcalEntrance,
300  Float_t TauPt,
301  Float_t TauLeadChargedPFCandEtaAtEcalEntrance,
302  Float_t TauLeadChargedPFCandPt,
303  Float_t TaudCrackEta,
304  Float_t TaudCrackPhi,
305  Float_t TauEmFract,
306  Float_t TauSignalPFGammaCands,
307  Float_t TauLeadPFChargedHadrHoP,
308  Float_t TauLeadPFChargedHadrEoP,
309  Float_t TauVisMass,
310  Float_t TauHadrMva,
311  Float_t TauGammaEtaMom,
312  Float_t TauGammaPhiMom,
313  Float_t TauGammaEnFrac,
314  Float_t TauKFNumHits,
315  Float_t TauGSFNumHits,
316  Float_t TauGSFChi2,
317  Float_t TauGSFTrackResol,
318  Float_t TauGSFTracklnPt,
319  Float_t TauGSFTrackEta,
320  Float_t TauPhi,
321  Float_t TauSignalPFChargedCands,
322  Float_t TauHasGsf,
323  Float_t ElecEta,
324  Float_t ElecPhi,
325  Float_t ElecPt,
326  Float_t ElecEe,
327  Float_t ElecEgamma,
328  Float_t ElecPin,
329  Float_t ElecPout,
330  Float_t ElecFbrem,
331  Float_t ElecChi2GSF,
332  Float_t ElecGSFNumHits,
333  Float_t ElecGSFTrackResol,
334  Float_t ElecGSFTracklnPt,
335  Float_t ElecGSFTrackEta)
336 {
337  if ( !isInitialized_ ) {
338  throw cms::Exception("ClassNotInitialized")
339  << " AntiElectronMVA not properly initialized !!\n";
340  }
341 
342  Float_t TauEmFraction = std::max(TauEmFract, float(0.));
343  Float_t TauNumHitsVariable = (TauGSFNumHits - TauKFNumHits)/(TauGSFNumHits + TauKFNumHits);
344  Float_t ElecEtotOverPin = (ElecEe + ElecEgamma)/ElecPin;
345  Float_t ElecEgammaOverPdif = ElecEgamma/(ElecPin - ElecPout);
346 
347  double mvaValue = -99.;
348  if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands == 0 && TauHasGsf < 0.5) {
349  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ){
350  Var_NoEleMatch_woGwoGSF_Barrel_[0] = TauEtaAtEcalEntrance;
351  Var_NoEleMatch_woGwoGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
352  Var_NoEleMatch_woGwoGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
353  Var_NoEleMatch_woGwoGSF_Barrel_[3] = std::log(std::max(float(1.), TauPt));
354  Var_NoEleMatch_woGwoGSF_Barrel_[4] = TauEmFraction;
355  Var_NoEleMatch_woGwoGSF_Barrel_[5] = TauLeadPFChargedHadrHoP;
356  Var_NoEleMatch_woGwoGSF_Barrel_[6] = TauLeadPFChargedHadrEoP;
357  Var_NoEleMatch_woGwoGSF_Barrel_[7] = TauVisMass;
358  Var_NoEleMatch_woGwoGSF_Barrel_[8] = TaudCrackEta;
359  Var_NoEleMatch_woGwoGSF_Barrel_[9] = TaudCrackPhi;
361  } else {
362  Var_NoEleMatch_woGwoGSF_Endcap_[0] = TauEtaAtEcalEntrance;
363  Var_NoEleMatch_woGwoGSF_Endcap_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
364  Var_NoEleMatch_woGwoGSF_Endcap_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
365  Var_NoEleMatch_woGwoGSF_Endcap_[3] = std::log(std::max(float(1.), TauPt));
366  Var_NoEleMatch_woGwoGSF_Endcap_[4] = TauEmFraction;
367  Var_NoEleMatch_woGwoGSF_Endcap_[5] = TauLeadPFChargedHadrHoP;
368  Var_NoEleMatch_woGwoGSF_Endcap_[6] = TauLeadPFChargedHadrEoP;
369  Var_NoEleMatch_woGwoGSF_Endcap_[7] = TauVisMass;
370  Var_NoEleMatch_woGwoGSF_Endcap_[8] = TaudCrackEta;
372  }
373  } else if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands == 0 && TauHasGsf > 0.5) {
374  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ){
375  Var_NoEleMatch_woGwGSF_Barrel_[0] = TauEtaAtEcalEntrance;
376  Var_NoEleMatch_woGwGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
377  Var_NoEleMatch_woGwGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
378  Var_NoEleMatch_woGwGSF_Barrel_[3] = std::log(std::max(float(1.), TauPt));
379  Var_NoEleMatch_woGwGSF_Barrel_[4] = TauEmFraction;
380  Var_NoEleMatch_woGwGSF_Barrel_[5] = TauLeadPFChargedHadrHoP;
381  Var_NoEleMatch_woGwGSF_Barrel_[6] = TauLeadPFChargedHadrEoP;
382  Var_NoEleMatch_woGwGSF_Barrel_[7] = TauVisMass;
383  Var_NoEleMatch_woGwGSF_Barrel_[8] = TauHadrMva;
384  Var_NoEleMatch_woGwGSF_Barrel_[9] = TauGSFChi2;
385  Var_NoEleMatch_woGwGSF_Barrel_[10] = TauNumHitsVariable;
386  Var_NoEleMatch_woGwGSF_Barrel_[11] = TauGSFTrackResol;
387  Var_NoEleMatch_woGwGSF_Barrel_[12] = TauGSFTracklnPt;
388  Var_NoEleMatch_woGwGSF_Barrel_[13] = TauGSFTrackEta;
389  Var_NoEleMatch_woGwGSF_Barrel_[14] = TaudCrackEta;
390  Var_NoEleMatch_woGwGSF_Barrel_[15] = TaudCrackPhi;
392  } else {
393  Var_NoEleMatch_woGwGSF_Endcap_[0] = TauEtaAtEcalEntrance;
394  Var_NoEleMatch_woGwGSF_Endcap_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
395  Var_NoEleMatch_woGwGSF_Endcap_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
396  Var_NoEleMatch_woGwGSF_Endcap_[3] = std::log(std::max(float(1.), TauPt));
397  Var_NoEleMatch_woGwGSF_Endcap_[4] = TauEmFraction;
398  Var_NoEleMatch_woGwGSF_Endcap_[5] = TauLeadPFChargedHadrHoP;
399  Var_NoEleMatch_woGwGSF_Endcap_[6] = TauLeadPFChargedHadrEoP;
400  Var_NoEleMatch_woGwGSF_Endcap_[7] = TauVisMass;
401  Var_NoEleMatch_woGwGSF_Endcap_[8] = TauHadrMva;
402  Var_NoEleMatch_woGwGSF_Endcap_[9] = TauGSFChi2;
403  Var_NoEleMatch_woGwGSF_Endcap_[10] = TauNumHitsVariable;
404  Var_NoEleMatch_woGwGSF_Endcap_[11] = TauGSFTrackResol;
405  Var_NoEleMatch_woGwGSF_Endcap_[12] = TauGSFTracklnPt;
406  Var_NoEleMatch_woGwGSF_Endcap_[13] = TauGSFTrackEta;
407  Var_NoEleMatch_woGwGSF_Endcap_[14] = TaudCrackEta;
409  }
410  } else if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands > 0 && TauHasGsf < 0.5 ) {
411  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ){
412  Var_NoEleMatch_wGwoGSF_Barrel_[0] = TauEtaAtEcalEntrance;
413  Var_NoEleMatch_wGwoGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
414  Var_NoEleMatch_wGwoGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
415  Var_NoEleMatch_wGwoGSF_Barrel_[3] = std::log(std::max(float(1.), TauPt));
416  Var_NoEleMatch_wGwoGSF_Barrel_[4] = TauEmFraction;
417  Var_NoEleMatch_wGwoGSF_Barrel_[5] = TauSignalPFGammaCands;
418  Var_NoEleMatch_wGwoGSF_Barrel_[6] = TauLeadPFChargedHadrHoP;
419  Var_NoEleMatch_wGwoGSF_Barrel_[7] = TauLeadPFChargedHadrEoP;
420  Var_NoEleMatch_wGwoGSF_Barrel_[8] = TauVisMass;
421  Var_NoEleMatch_wGwoGSF_Barrel_[9] = TauGammaEtaMom;
422  Var_NoEleMatch_wGwoGSF_Barrel_[10] = TauGammaPhiMom;
423  Var_NoEleMatch_wGwoGSF_Barrel_[11] = TauGammaEnFrac;
424  Var_NoEleMatch_wGwoGSF_Barrel_[12] = TaudCrackEta;
425  Var_NoEleMatch_wGwoGSF_Barrel_[13] = TaudCrackPhi;
427  } else {
428  Var_NoEleMatch_wGwoGSF_Endcap_[0] = TauEtaAtEcalEntrance;
429  Var_NoEleMatch_wGwoGSF_Endcap_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
430  Var_NoEleMatch_wGwoGSF_Endcap_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
431  Var_NoEleMatch_wGwoGSF_Endcap_[3] = std::log(std::max(float(1.), TauPt));
432  Var_NoEleMatch_wGwoGSF_Endcap_[4] = TauEmFraction;
433  Var_NoEleMatch_wGwoGSF_Endcap_[5] = TauSignalPFGammaCands;
434  Var_NoEleMatch_wGwoGSF_Endcap_[6] = TauLeadPFChargedHadrHoP;
435  Var_NoEleMatch_wGwoGSF_Endcap_[7] = TauLeadPFChargedHadrEoP;
436  Var_NoEleMatch_wGwoGSF_Endcap_[8] = TauVisMass;
437  Var_NoEleMatch_wGwoGSF_Endcap_[9] = TauGammaEtaMom;
438  Var_NoEleMatch_wGwoGSF_Endcap_[10] = TauGammaPhiMom;
439  Var_NoEleMatch_wGwoGSF_Endcap_[11] = TauGammaEnFrac;
440  Var_NoEleMatch_wGwoGSF_Endcap_[12] = TaudCrackEta;
442  }
443  }
444  else if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands > 0 && TauHasGsf > 0.5 ) {
445  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) {
446  Var_NoEleMatch_wGwGSF_Barrel_[0] = TauEtaAtEcalEntrance;
447  Var_NoEleMatch_wGwGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
448  Var_NoEleMatch_wGwGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
449  Var_NoEleMatch_wGwGSF_Barrel_[3] = std::log(std::max(float(1.), TauPt));
450  Var_NoEleMatch_wGwGSF_Barrel_[4] = TauEmFraction;
451  Var_NoEleMatch_wGwGSF_Barrel_[5] = TauSignalPFGammaCands;
452  Var_NoEleMatch_wGwGSF_Barrel_[6] = TauLeadPFChargedHadrHoP;
453  Var_NoEleMatch_wGwGSF_Barrel_[7] = TauLeadPFChargedHadrEoP;
454  Var_NoEleMatch_wGwGSF_Barrel_[8] = TauVisMass;
455  Var_NoEleMatch_wGwGSF_Barrel_[9] = TauHadrMva;
456  Var_NoEleMatch_wGwGSF_Barrel_[10] = TauGammaEtaMom;
457  Var_NoEleMatch_wGwGSF_Barrel_[11] = TauGammaPhiMom;
458  Var_NoEleMatch_wGwGSF_Barrel_[12] = TauGammaEnFrac;
459  Var_NoEleMatch_wGwGSF_Barrel_[13] = TauGSFChi2;
460  Var_NoEleMatch_wGwGSF_Barrel_[14] = TauNumHitsVariable;
461  Var_NoEleMatch_wGwGSF_Barrel_[15] = TauGSFTrackResol;
462  Var_NoEleMatch_wGwGSF_Barrel_[16] = TauGSFTracklnPt;
463  Var_NoEleMatch_wGwGSF_Barrel_[17] = TauGSFTrackEta;
464  Var_NoEleMatch_wGwGSF_Barrel_[18] = TaudCrackEta;
465  Var_NoEleMatch_wGwGSF_Barrel_[19] = TaudCrackPhi;
467  } else {
468  Var_NoEleMatch_wGwGSF_Endcap_[0] = TauEtaAtEcalEntrance;
469  Var_NoEleMatch_wGwGSF_Endcap_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
470  Var_NoEleMatch_wGwGSF_Endcap_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
471  Var_NoEleMatch_wGwGSF_Endcap_[3] = std::log(std::max(float(1.), TauPt));
472  Var_NoEleMatch_wGwGSF_Endcap_[4] = TauEmFraction;
473  Var_NoEleMatch_wGwGSF_Endcap_[5] = TauSignalPFGammaCands;
474  Var_NoEleMatch_wGwGSF_Endcap_[6] = TauLeadPFChargedHadrHoP;
475  Var_NoEleMatch_wGwGSF_Endcap_[7] = TauLeadPFChargedHadrEoP;
476  Var_NoEleMatch_wGwGSF_Endcap_[8] = TauVisMass;
477  Var_NoEleMatch_wGwGSF_Endcap_[9] = TauHadrMva;
478  Var_NoEleMatch_wGwGSF_Endcap_[10] = TauGammaEtaMom;
479  Var_NoEleMatch_wGwGSF_Endcap_[11] = TauGammaPhiMom;
480  Var_NoEleMatch_wGwGSF_Endcap_[12] = TauGammaEnFrac;
481  Var_NoEleMatch_wGwGSF_Endcap_[13] = TauGSFChi2;
482  Var_NoEleMatch_wGwGSF_Endcap_[14] = TauNumHitsVariable;
483  Var_NoEleMatch_wGwGSF_Endcap_[15] = TauGSFTrackResol;
484  Var_NoEleMatch_wGwGSF_Endcap_[16] = TauGSFTracklnPt;
485  Var_NoEleMatch_wGwGSF_Endcap_[17] = TauGSFTrackEta;
486  Var_NoEleMatch_wGwGSF_Endcap_[18] = TaudCrackEta;
488  }
489  } else if ( TauSignalPFGammaCands == 0 && TauHasGsf < 0.5 ) {
490  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) {
491  Var_woGwoGSF_Barrel_[0] = ElecEtotOverPin;
492  Var_woGwoGSF_Barrel_[1] = ElecEgammaOverPdif;
493  Var_woGwoGSF_Barrel_[2] = ElecFbrem;
494  Var_woGwoGSF_Barrel_[3] = ElecChi2GSF;
495  Var_woGwoGSF_Barrel_[4] = ElecGSFNumHits;
496  Var_woGwoGSF_Barrel_[5] = ElecGSFTrackResol;
497  Var_woGwoGSF_Barrel_[6] = ElecGSFTracklnPt;
498  Var_woGwoGSF_Barrel_[7] = ElecGSFTrackEta;
499  Var_woGwoGSF_Barrel_[8] = TauEtaAtEcalEntrance;
500  Var_woGwoGSF_Barrel_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
501  Var_woGwoGSF_Barrel_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
502  Var_woGwoGSF_Barrel_[11] = std::log(std::max(float(1.), TauPt));
503  Var_woGwoGSF_Barrel_[12] = TauEmFraction;
504  Var_woGwoGSF_Barrel_[13] = TauLeadPFChargedHadrHoP;
505  Var_woGwoGSF_Barrel_[14] = TauLeadPFChargedHadrEoP;
506  Var_woGwoGSF_Barrel_[15] = TauVisMass;
507  Var_woGwoGSF_Barrel_[16] = TaudCrackEta;
508  Var_woGwoGSF_Barrel_[17] = TaudCrackPhi;
510  } else {
511  Var_woGwoGSF_Endcap_[0] = ElecEtotOverPin;
512  Var_woGwoGSF_Endcap_[1] = ElecEgammaOverPdif;
513  Var_woGwoGSF_Endcap_[2] = ElecFbrem;
514  Var_woGwoGSF_Endcap_[3] = ElecChi2GSF;
515  Var_woGwoGSF_Endcap_[4] = ElecGSFNumHits;
516  Var_woGwoGSF_Endcap_[5] = ElecGSFTrackResol;
517  Var_woGwoGSF_Endcap_[6] = ElecGSFTracklnPt;
518  Var_woGwoGSF_Endcap_[7] = ElecGSFTrackEta;
519  Var_woGwoGSF_Endcap_[8] = TauEtaAtEcalEntrance;
520  Var_woGwoGSF_Endcap_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
521  Var_woGwoGSF_Endcap_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
522  Var_woGwoGSF_Endcap_[11] = std::log(std::max(float(1.), TauPt));
523  Var_woGwoGSF_Endcap_[12] = TauEmFraction;
524  Var_woGwoGSF_Endcap_[13] = TauLeadPFChargedHadrHoP;
525  Var_woGwoGSF_Endcap_[14] = TauLeadPFChargedHadrEoP;
526  Var_woGwoGSF_Endcap_[15] = TauVisMass;
527  Var_woGwoGSF_Endcap_[16] = TaudCrackEta;
529  }
530  } else if ( TauSignalPFGammaCands == 0 && TauHasGsf > 0.5 ) {
531  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) {
532  Var_woGwGSF_Barrel_[0] = ElecEtotOverPin;
533  Var_woGwGSF_Barrel_[1] = ElecEgammaOverPdif;
534  Var_woGwGSF_Barrel_[2] = ElecFbrem;
535  Var_woGwGSF_Barrel_[3] = ElecChi2GSF;
536  Var_woGwGSF_Barrel_[4] = ElecGSFNumHits;
537  Var_woGwGSF_Barrel_[5] = ElecGSFTrackResol;
538  Var_woGwGSF_Barrel_[6] = ElecGSFTracklnPt;
539  Var_woGwGSF_Barrel_[7] = ElecGSFTrackEta;
540  Var_woGwGSF_Barrel_[8] = TauEtaAtEcalEntrance;
541  Var_woGwGSF_Barrel_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
542  Var_woGwGSF_Barrel_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
543  Var_woGwGSF_Barrel_[11] = std::log(std::max(float(1.), TauPt));
544  Var_woGwGSF_Barrel_[12] = TauEmFraction;
545  Var_woGwGSF_Barrel_[13] = TauLeadPFChargedHadrHoP;
546  Var_woGwGSF_Barrel_[14] = TauLeadPFChargedHadrEoP;
547  Var_woGwGSF_Barrel_[15] = TauVisMass;
548  Var_woGwGSF_Barrel_[16] = TauHadrMva;
549  Var_woGwGSF_Barrel_[17] = TauGSFChi2;
550  Var_woGwGSF_Barrel_[18] = TauNumHitsVariable;
551  Var_woGwGSF_Barrel_[19] = TauGSFTrackResol;
552  Var_woGwGSF_Barrel_[20] = TauGSFTracklnPt;
553  Var_woGwGSF_Barrel_[21] = TauGSFTrackEta;
554  Var_woGwGSF_Barrel_[22] = TaudCrackEta;
555  Var_woGwGSF_Barrel_[23] = TaudCrackPhi;
557  } else {
558  Var_woGwGSF_Endcap_[0] = ElecEtotOverPin;
559  Var_woGwGSF_Endcap_[1] = ElecEgammaOverPdif;
560  Var_woGwGSF_Endcap_[2] = ElecFbrem;
561  Var_woGwGSF_Endcap_[3] = ElecChi2GSF;
562  Var_woGwGSF_Endcap_[4] = ElecGSFNumHits;
563  Var_woGwGSF_Endcap_[5] = ElecGSFTrackResol;
564  Var_woGwGSF_Endcap_[6] = ElecGSFTracklnPt;
565  Var_woGwGSF_Endcap_[7] = ElecGSFTrackEta;
566  Var_woGwGSF_Endcap_[8] = TauEtaAtEcalEntrance;
567  Var_woGwGSF_Endcap_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
568  Var_woGwGSF_Endcap_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
569  Var_woGwGSF_Endcap_[11] = std::log(std::max(float(1.), TauPt));
570  Var_woGwGSF_Endcap_[12] = TauEmFraction;
571  Var_woGwGSF_Endcap_[13] = TauLeadPFChargedHadrHoP;
572  Var_woGwGSF_Endcap_[14] = TauLeadPFChargedHadrEoP;
573  Var_woGwGSF_Endcap_[15] = TauVisMass;
574  Var_woGwGSF_Endcap_[16] = TauHadrMva;
575  Var_woGwGSF_Endcap_[17] = TauGSFChi2;
576  Var_woGwGSF_Endcap_[18] = TauNumHitsVariable;
577  Var_woGwGSF_Endcap_[19] = TauGSFTrackResol;
578  Var_woGwGSF_Endcap_[20] = TauGSFTracklnPt;
579  Var_woGwGSF_Endcap_[21] = TauGSFTrackEta;
580  Var_woGwGSF_Endcap_[22] = TaudCrackEta;
582  }
583  } else if ( TauSignalPFGammaCands > 0 && TauHasGsf < 0.5 ) {
584  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) {
585  Var_wGwoGSF_Barrel_[0] = ElecEtotOverPin;
586  Var_wGwoGSF_Barrel_[1] = ElecEgammaOverPdif;
587  Var_wGwoGSF_Barrel_[2] = ElecFbrem;
588  Var_wGwoGSF_Barrel_[3] = ElecChi2GSF;
589  Var_wGwoGSF_Barrel_[4] = ElecGSFNumHits;
590  Var_wGwoGSF_Barrel_[5] = ElecGSFTrackResol;
591  Var_wGwoGSF_Barrel_[6] = ElecGSFTracklnPt;
592  Var_wGwoGSF_Barrel_[7] = ElecGSFTrackEta;
593  Var_wGwoGSF_Barrel_[8] = TauEtaAtEcalEntrance;
594  Var_wGwoGSF_Barrel_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
595  Var_wGwoGSF_Barrel_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
596  Var_wGwoGSF_Barrel_[11] = std::log(std::max(float(1.), TauPt));
597  Var_wGwoGSF_Barrel_[12] = TauEmFraction;
598  Var_wGwoGSF_Barrel_[13] = TauSignalPFGammaCands;
599  Var_wGwoGSF_Barrel_[14] = TauLeadPFChargedHadrHoP;
600  Var_wGwoGSF_Barrel_[15] = TauLeadPFChargedHadrEoP;
601  Var_wGwoGSF_Barrel_[16] = TauVisMass;
602  Var_wGwoGSF_Barrel_[17] = TauGammaEtaMom;
603  Var_wGwoGSF_Barrel_[18] = TauGammaPhiMom;
604  Var_wGwoGSF_Barrel_[19] = TauGammaEnFrac;
605  Var_wGwoGSF_Barrel_[20] = TaudCrackEta;
606  Var_wGwoGSF_Barrel_[21] = TaudCrackPhi;
608  } else {
609  Var_wGwoGSF_Endcap_[0] = ElecEtotOverPin;
610  Var_wGwoGSF_Endcap_[1] = ElecEgammaOverPdif;
611  Var_wGwoGSF_Endcap_[2] = ElecFbrem;
612  Var_wGwoGSF_Endcap_[3] = ElecChi2GSF;
613  Var_wGwoGSF_Endcap_[4] = ElecGSFNumHits;
614  Var_wGwoGSF_Endcap_[5] = ElecGSFTrackResol;
615  Var_wGwoGSF_Endcap_[6] = ElecGSFTracklnPt;
616  Var_wGwoGSF_Endcap_[7] = ElecGSFTrackEta;
617  Var_wGwoGSF_Endcap_[8] = TauEtaAtEcalEntrance;
618  Var_wGwoGSF_Endcap_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
619  Var_wGwoGSF_Endcap_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
620  Var_wGwoGSF_Endcap_[11] = std::log(std::max(float(1.), TauPt));
621  Var_wGwoGSF_Endcap_[12] = TauEmFraction;
622  Var_wGwoGSF_Endcap_[13] = TauSignalPFGammaCands;
623  Var_wGwoGSF_Endcap_[14] = TauLeadPFChargedHadrHoP;
624  Var_wGwoGSF_Endcap_[15] = TauLeadPFChargedHadrEoP;
625  Var_wGwoGSF_Endcap_[16] = TauVisMass;
626  Var_wGwoGSF_Endcap_[17] = TauGammaEtaMom;
627  Var_wGwoGSF_Endcap_[18] = TauGammaPhiMom;
628  Var_wGwoGSF_Endcap_[19] = TauGammaEnFrac;
629  Var_wGwoGSF_Endcap_[20] = TaudCrackEta;
631  }
632  } else if ( TauSignalPFGammaCands > 0 && TauHasGsf > 0.5 ) {
633  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) {
634  Var_wGwGSF_Barrel_[0] = ElecEtotOverPin;
635  Var_wGwGSF_Barrel_[1] = ElecEgammaOverPdif;
636  Var_wGwGSF_Barrel_[2] = ElecFbrem;
637  Var_wGwGSF_Barrel_[3] = ElecChi2GSF;
638  Var_wGwGSF_Barrel_[4] = ElecGSFNumHits;
639  Var_wGwGSF_Barrel_[5] = ElecGSFTrackResol;
640  Var_wGwGSF_Barrel_[6] = ElecGSFTracklnPt;
641  Var_wGwGSF_Barrel_[7] = ElecGSFTrackEta;
642  Var_wGwGSF_Barrel_[8] = TauEtaAtEcalEntrance;
643  Var_wGwGSF_Barrel_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
644  Var_wGwGSF_Barrel_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
645  Var_wGwGSF_Barrel_[11] = std::log(std::max(float(1.), TauPt));
646  Var_wGwGSF_Barrel_[12] = TauEmFraction;
647  Var_wGwGSF_Barrel_[13] = TauSignalPFGammaCands;
648  Var_wGwGSF_Barrel_[14] = TauLeadPFChargedHadrHoP;
649  Var_wGwGSF_Barrel_[15] = TauLeadPFChargedHadrEoP;
650  Var_wGwGSF_Barrel_[16] = TauVisMass;
651  Var_wGwGSF_Barrel_[17] = TauHadrMva;
652  Var_wGwGSF_Barrel_[18] = TauGammaEtaMom;
653  Var_wGwGSF_Barrel_[19] = TauGammaPhiMom;
654  Var_wGwGSF_Barrel_[20] = TauGammaEnFrac;
655  Var_wGwGSF_Barrel_[21] = TauGSFChi2;
656  Var_wGwGSF_Barrel_[22] = TauNumHitsVariable;
657  Var_wGwGSF_Barrel_[23] = TauGSFTrackResol;
658  Var_wGwGSF_Barrel_[24] = TauGSFTracklnPt;
659  Var_wGwGSF_Barrel_[25] = TauGSFTrackEta;
660  Var_wGwGSF_Barrel_[26] = TaudCrackEta;
661  Var_wGwGSF_Barrel_[27] = TaudCrackPhi;
663  } else {
664  Var_wGwGSF_Endcap_[0] = ElecEtotOverPin;
665  Var_wGwGSF_Endcap_[1] = ElecEgammaOverPdif;
666  Var_wGwGSF_Endcap_[2] = ElecFbrem;
667  Var_wGwGSF_Endcap_[3] = ElecChi2GSF;
668  Var_wGwGSF_Endcap_[4] = ElecGSFNumHits;
669  Var_wGwGSF_Endcap_[5] = ElecGSFTrackResol;
670  Var_wGwGSF_Endcap_[6] = ElecGSFTracklnPt;
671  Var_wGwGSF_Endcap_[7] = ElecGSFTrackEta;
672  Var_wGwGSF_Endcap_[8] = TauEtaAtEcalEntrance;
673  Var_wGwGSF_Endcap_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
674  Var_wGwGSF_Endcap_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
675  Var_wGwGSF_Endcap_[11] = std::log(std::max(float(1.), TauPt));
676  Var_wGwGSF_Endcap_[12] = TauEmFraction;
677  Var_wGwGSF_Endcap_[13] = TauSignalPFGammaCands;
678  Var_wGwGSF_Endcap_[14] = TauLeadPFChargedHadrHoP;
679  Var_wGwGSF_Endcap_[15] = TauLeadPFChargedHadrEoP;
680  Var_wGwGSF_Endcap_[16] = TauVisMass;
681  Var_wGwGSF_Endcap_[17] = TauHadrMva;
682  Var_wGwGSF_Endcap_[18] = TauGammaEtaMom;
683  Var_wGwGSF_Endcap_[19] = TauGammaPhiMom;
684  Var_wGwGSF_Endcap_[20] = TauGammaEnFrac;
685  Var_wGwGSF_Endcap_[21] = TauGSFChi2;
686  Var_wGwGSF_Endcap_[22] = TauNumHitsVariable;
687  Var_wGwGSF_Endcap_[23] = TauGSFTrackResol;
688  Var_wGwGSF_Endcap_[24] = TauGSFTracklnPt;
689  Var_wGwGSF_Endcap_[25] = TauGSFTrackEta;
690  Var_wGwGSF_Endcap_[26] = TaudCrackEta;
692  }
693  }
694  return mvaValue;
695 }
696 
698  const reco::GsfElectron& theGsfEle)
699 
700 {
701  Float_t TauEtaAtEcalEntrance = -99.;
702  float sumEtaTimesEnergy = 0.;
703  float sumEnergy = 0.;
704  const std::vector<reco::PFCandidatePtr>& signalPFCands = thePFTau.signalPFCands();
705  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
706  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
707  sumEtaTimesEnergy += (*pfCandidate)->positionAtECALEntrance().eta()*(*pfCandidate)->energy();
708  sumEnergy += (*pfCandidate)->energy();
709  }
710  if ( sumEnergy > 0. ) {
711  TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
712  }
713 
714  float TauLeadChargedPFCandEtaAtEcalEntrance = -99.;
715  float TauLeadChargedPFCandPt = -99.;
716  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
717  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
718  const reco::Track* track = 0;
719  if ( (*pfCandidate)->trackRef().isNonnull() ) track = (*pfCandidate)->trackRef().get();
720  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->innerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->innerTrack().get();
721  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->globalTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->globalTrack().get();
722  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->outerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->outerTrack().get();
723  else if ( (*pfCandidate)->gsfTrackRef().isNonnull() ) track = (*pfCandidate)->gsfTrackRef().get();
724  if ( track ) {
725  if ( track->pt() > TauLeadChargedPFCandPt ) {
726  TauLeadChargedPFCandEtaAtEcalEntrance = (*pfCandidate)->positionAtECALEntrance().eta();
727  TauLeadChargedPFCandPt = track->pt();
728  }
729  }
730  }
731 
732  Float_t TauPt = thePFTau.pt();
733  Float_t TauEmFraction = std::max(thePFTau.emFraction(), (Float_t)0.);
734  Float_t TauSignalPFGammaCands = thePFTau.signalPFGammaCands().size();
735  Float_t TauLeadPFChargedHadrHoP = 0.;
736  Float_t TauLeadPFChargedHadrEoP = 0.;
737  if ( thePFTau.leadPFChargedHadrCand()->p() > 0. ) {
738  TauLeadPFChargedHadrHoP = thePFTau.leadPFChargedHadrCand()->hcalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
739  TauLeadPFChargedHadrEoP = thePFTau.leadPFChargedHadrCand()->ecalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
740  }
741  Float_t TauVisMass = thePFTau.mass();
742  Float_t TauHadrMva = std::max(thePFTau.electronPreIDOutput(), float(-1.0));
743  std::vector<Float_t> GammasdEta;
744  std::vector<Float_t> GammasdPhi;
745  std::vector<Float_t> GammasPt;
746  for ( unsigned i = 0 ; i < thePFTau.signalPFGammaCands().size(); ++i ) {
747  reco::PFCandidatePtr gamma = thePFTau.signalPFGammaCands().at(i);
748  if ( thePFTau.leadPFChargedHadrCand().isNonnull() ) {
749  GammasdEta.push_back(gamma->eta() - thePFTau.leadPFChargedHadrCand()->eta());
750  GammasdPhi.push_back(gamma->phi() - thePFTau.leadPFChargedHadrCand()->phi());
751  } else {
752  GammasdEta.push_back(gamma->eta() - thePFTau.eta());
753  GammasdPhi.push_back(gamma->phi() - thePFTau.phi());
754  }
755  GammasPt.push_back(gamma->pt());
756  }
757  Float_t TauKFNumHits = -99.;
758  if ( (thePFTau.leadPFChargedHadrCand()->trackRef()).isNonnull() ) {
759  TauKFNumHits = thePFTau.leadPFChargedHadrCand()->trackRef()->numberOfValidHits();
760  }
761  Float_t TauGSFNumHits = -99.;
762  Float_t TauGSFChi2 = -99.;
763  Float_t TauGSFTrackResol = -99.;
764  Float_t TauGSFTracklnPt = -99.;
765  Float_t TauGSFTrackEta = -99.;
766  if ( (thePFTau.leadPFChargedHadrCand()->gsfTrackRef()).isNonnull() ) {
767  TauGSFChi2 = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->normalizedChi2();
768  TauGSFNumHits = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->numberOfValidHits();
769  if ( thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt() > 0. ) {
770  TauGSFTrackResol = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->ptError()/thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt();
771  TauGSFTracklnPt = log(thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt())*M_LN10;
772  }
773  TauGSFTrackEta = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->eta();
774  }
775  Float_t TauPhi = thePFTau.phi();
776  float sumPhiTimesEnergy = 0.;
777  float sumEnergyPhi = 0.;
778  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
779  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
780  sumPhiTimesEnergy += (*pfCandidate)->positionAtECALEntrance().phi()*(*pfCandidate)->energy();
781  sumEnergyPhi += (*pfCandidate)->energy();
782  }
783  if ( sumEnergyPhi > 0. ) {
784  TauPhi = sumPhiTimesEnergy/sumEnergyPhi;
785  }
786  Float_t TaudCrackPhi = dCrackPhi(TauPhi, TauEtaAtEcalEntrance);
787  Float_t TaudCrackEta = dCrackEta(TauEtaAtEcalEntrance);
788  Float_t TauSignalPFChargedCands = thePFTau.signalPFChargedHadrCands().size();
789  Float_t TauHasGsf = thePFTau.leadPFChargedHadrCand()->gsfTrackRef().isNonnull();
790 
791  Float_t ElecEta = theGsfEle.eta();
792  Float_t ElecPhi = theGsfEle.phi();
793  Float_t ElecPt = theGsfEle.pt();
794  //Variables related to the electron Cluster
795  Float_t ElecEe = 0.;
796  Float_t ElecEgamma = 0.;
797  reco::SuperClusterRef pfSuperCluster = theGsfEle.parentSuperCluster();
798  if ( pfSuperCluster.isNonnull() && pfSuperCluster.isAvailable() ) {
799  for ( reco::CaloCluster_iterator pfCluster = pfSuperCluster->clustersBegin();
800  pfCluster != pfSuperCluster->clustersEnd(); ++pfCluster ) {
801  double pfClusterEn = (*pfCluster)->energy();
802  if ( pfCluster == pfSuperCluster->clustersBegin() ) ElecEe += pfClusterEn;
803  else ElecEgamma += pfClusterEn;
804  }
805  }
806  Float_t ElecPin = std::sqrt(theGsfEle.trackMomentumAtVtx().Mag2());
807  Float_t ElecPout = std::sqrt(theGsfEle.trackMomentumOut().Mag2());
808  Float_t ElecFbrem = theGsfEle.fbrem();
809  //Variables related to the GsfTrack
810  Float_t ElecChi2GSF = -99.;
811  Float_t ElecGSFNumHits = -99.;
812  Float_t ElecGSFTrackResol = -99.;
813  Float_t ElecGSFTracklnPt = -99.;
814  Float_t ElecGSFTrackEta = -99.;
815  if ( theGsfEle.gsfTrack().isNonnull() ) {
816  ElecChi2GSF = (theGsfEle).gsfTrack()->normalizedChi2();
817  ElecGSFNumHits = (theGsfEle).gsfTrack()->numberOfValidHits();
818  if ( theGsfEle.gsfTrack()->pt() > 0. ) {
819  ElecGSFTrackResol = theGsfEle.gsfTrack()->ptError()/theGsfEle.gsfTrack()->pt();
820  ElecGSFTracklnPt = log(theGsfEle.gsfTrack()->pt())*M_LN10;
821  }
822  ElecGSFTrackEta = theGsfEle.gsfTrack()->eta();
823  }
824 
825  return MVAValue(TauEtaAtEcalEntrance,
826  TauPt,
827  TauLeadChargedPFCandEtaAtEcalEntrance,
828  TauLeadChargedPFCandPt,
829  TaudCrackEta,
830  TaudCrackPhi,
831  TauEmFraction,
832  TauSignalPFGammaCands,
833  TauLeadPFChargedHadrHoP,
834  TauLeadPFChargedHadrEoP,
835  TauVisMass,
836  TauHadrMva,
837  GammasdEta,
838  GammasdPhi,
839  GammasPt,
840  TauKFNumHits,
841  TauGSFNumHits,
842  TauGSFChi2,
843  TauGSFTrackResol,
844  TauGSFTracklnPt,
845  TauGSFTrackEta,
846  TauPhi,
847  TauSignalPFChargedCands,
848  TauHasGsf,
849  ElecEta,
850  ElecPhi,
851  ElecPt,
852  ElecEe,
853  ElecEgamma,
854  ElecPin,
855  ElecPout,
856  ElecFbrem,
857  ElecChi2GSF,
858  ElecGSFNumHits,
859  ElecGSFTrackResol,
860  ElecGSFTracklnPt,
861  ElecGSFTrackEta);
862 }
863 
865 {
866  Float_t TauEtaAtEcalEntrance = -99.;
867  float sumEtaTimesEnergy = 0.;
868  float sumEnergy = 0.;
869  const std::vector<reco::PFCandidatePtr>& signalPFCands = thePFTau.signalPFCands();
870  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
871  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
872  sumEtaTimesEnergy += (*pfCandidate)->positionAtECALEntrance().eta()*(*pfCandidate)->energy();
873  sumEnergy += (*pfCandidate)->energy();
874  }
875  if ( sumEnergy > 0. ) {
876  TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
877  }
878 
879  float TauLeadChargedPFCandEtaAtEcalEntrance = -99.;
880  float TauLeadChargedPFCandPt = -99.;
881  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
882  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
883  const reco::Track* track = 0;
884  if ( (*pfCandidate)->trackRef().isNonnull() ) track = (*pfCandidate)->trackRef().get();
885  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->innerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->innerTrack().get();
886  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->globalTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->globalTrack().get();
887  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->outerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->outerTrack().get();
888  else if ( (*pfCandidate)->gsfTrackRef().isNonnull() ) track = (*pfCandidate)->gsfTrackRef().get();
889  if ( track ) {
890  if ( track->pt() > TauLeadChargedPFCandPt ) {
891  TauLeadChargedPFCandEtaAtEcalEntrance = (*pfCandidate)->positionAtECALEntrance().eta();
892  TauLeadChargedPFCandPt = track->pt();
893  }
894  }
895  }
896 
897  Float_t TauPt = thePFTau.pt();
898  Float_t TauEmFraction = std::max(thePFTau.emFraction(), (Float_t)0.);
899  Float_t TauSignalPFGammaCands = thePFTau.signalPFGammaCands().size();
900  Float_t TauLeadPFChargedHadrHoP = 0.;
901  Float_t TauLeadPFChargedHadrEoP = 0.;
902  if ( thePFTau.leadPFChargedHadrCand()->p() > 0. ) {
903  TauLeadPFChargedHadrHoP = thePFTau.leadPFChargedHadrCand()->hcalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
904  TauLeadPFChargedHadrEoP = thePFTau.leadPFChargedHadrCand()->ecalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
905  }
906  Float_t TauVisMass = thePFTau.mass();
907  Float_t TauHadrMva = std::max(thePFTau.electronPreIDOutput(),float(-1.0));
908  std::vector<Float_t> GammasdEta;
909  std::vector<Float_t> GammasdPhi;
910  std::vector<Float_t> GammasPt;
911  for ( unsigned i = 0 ; i < thePFTau.signalPFGammaCands().size(); ++i ) {
912  reco::PFCandidatePtr gamma = thePFTau.signalPFGammaCands().at(i);
913  if ( thePFTau.leadPFChargedHadrCand().isNonnull() ) {
914  GammasdEta.push_back(gamma->eta() - thePFTau.leadPFChargedHadrCand()->eta());
915  GammasdPhi.push_back(gamma->phi() - thePFTau.leadPFChargedHadrCand()->phi());
916  } else {
917  GammasdEta.push_back(gamma->eta() - thePFTau.eta());
918  GammasdPhi.push_back(gamma->phi() - thePFTau.phi());
919  }
920  GammasPt.push_back(gamma->pt());
921  }
922  Float_t TauKFNumHits = -99.;
923  if ( (thePFTau.leadPFChargedHadrCand()->trackRef()).isNonnull() ) {
924  TauKFNumHits = thePFTau.leadPFChargedHadrCand()->trackRef()->numberOfValidHits();
925  }
926  Float_t TauGSFNumHits = -99.;
927  Float_t TauGSFChi2 = -99.;
928  Float_t TauGSFTrackResol = -99.;
929  Float_t TauGSFTracklnPt = -99.;
930  Float_t TauGSFTrackEta = -99.;
931  if ( (thePFTau.leadPFChargedHadrCand()->gsfTrackRef()).isNonnull() ) {
932  TauGSFChi2 = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->normalizedChi2();
933  TauGSFNumHits = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->numberOfValidHits();
934  if ( thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt() > 0. ) {
935  TauGSFTrackResol = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->ptError()/thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt();
936  TauGSFTracklnPt = log(thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt())*M_LN10;
937  }
938  TauGSFTrackEta = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->eta();
939  }
940  Float_t TauPhi = thePFTau.phi();
941  float sumPhiTimesEnergy = 0.;
942  float sumEnergyPhi = 0.;
943  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
944  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
945  sumPhiTimesEnergy += (*pfCandidate)->positionAtECALEntrance().phi()*(*pfCandidate)->energy();
946  sumEnergyPhi += (*pfCandidate)->energy();
947  }
948  if ( sumEnergyPhi > 0. ) {
949  TauPhi = sumPhiTimesEnergy/sumEnergyPhi;
950  }
951  Float_t TaudCrackPhi = dCrackPhi(TauPhi,TauEtaAtEcalEntrance) ;
952  Float_t TaudCrackEta = dCrackEta(TauEtaAtEcalEntrance) ;
953  Float_t TauSignalPFChargedCands = thePFTau.signalPFChargedHadrCands().size();
954  Float_t TauHasGsf = thePFTau.leadPFChargedHadrCand()->gsfTrackRef().isNonnull();
955 
956  Float_t dummyElecEta = 9.9;
957 
958  return MVAValue(TauEtaAtEcalEntrance,
959  TauPt,
960  TauLeadChargedPFCandEtaAtEcalEntrance,
961  TauLeadChargedPFCandPt,
962  TaudCrackEta,
963  TaudCrackPhi,
964  TauEmFraction,
965  TauSignalPFGammaCands,
966  TauLeadPFChargedHadrHoP,
967  TauLeadPFChargedHadrEoP,
968  TauVisMass,
969  TauHadrMva,
970  GammasdEta,
971  GammasdPhi,
972  GammasPt,
973  TauKFNumHits,
974  TauGSFNumHits,
975  TauGSFChi2,
976  TauGSFTrackResol,
977  TauGSFTracklnPt,
978  TauGSFTrackEta,
979  TauPhi,
980  TauSignalPFChargedCands,
981  TauHasGsf,
982  dummyElecEta,
983  0.,
984  0.,
985  0.,
986  0.,
987  0.,
988  0.,
989  0.,
990  0.,
991  0.,
992  0.,
993  0.,
994  0.);
995 }
996 
997 double AntiElectronIDMVA5::minimum(double a, double b)
998 {
999  if ( std::abs(b) < std::abs(a) ) return b;
1000  else return a;
1001 }
1002 
1003 
1004 #include<array>
1005 namespace {
1006 
1007  // IN: define locations of the 18 phi-cracks
1008  std::array<double,18> fill_cPhi() {
1009  constexpr double pi = M_PI; // 3.14159265358979323846;
1010  std::array<double,18> cPhi;
1011  // IN: define locations of the 18 phi-cracks
1012  cPhi[0] = 2.97025;
1013  for ( unsigned iCrack = 1; iCrack <= 17; ++iCrack )
1014  cPhi[iCrack] = cPhi[0] - 2.*iCrack*pi/18;
1015  return cPhi;
1016  }
1017 
1018  static const std::array<double,18> cPhi = fill_cPhi();
1019 
1020 }
1021 
1022 
1023 
1024 double AntiElectronIDMVA5::dCrackPhi(double phi, double eta)
1025 {
1026 //--- compute the (unsigned) distance to the closest phi-crack in the ECAL barrel
1027 
1028  constexpr double pi = M_PI; // 3.14159265358979323846;
1029 
1030  // IN: shift of this location if eta < 0
1031  constexpr double delta_cPhi = 0.00638;
1032 
1033  double retVal = 99.;
1034 
1035  if ( eta >= -1.47464 && eta <= 1.47464 ) {
1036 
1037  // the location is shifted
1038  if ( eta < 0. ) phi += delta_cPhi;
1039 
1040  // CV: need to bring-back phi into interval [-pi,+pi]
1041  if ( phi > pi ) phi -= 2.*pi;
1042  if ( phi < -pi ) phi += 2.*pi;
1043 
1044  if ( phi >= -pi && phi <= pi ) {
1045 
1046  // the problem of the extrema:
1047  if ( phi < cPhi[17] || phi >= cPhi[0] ) {
1048  if ( phi < 0. ) phi += 2.*pi;
1049  retVal = minimum(phi - cPhi[0], phi - cPhi[17] - 2.*pi);
1050  } else {
1051  // between these extrema...
1052  bool OK = false;
1053  unsigned iCrack = 16;
1054  while( !OK ) {
1055  if ( phi < cPhi[iCrack] ) {
1056  retVal = minimum(phi - cPhi[iCrack + 1], phi - cPhi[iCrack]);
1057  OK = true;
1058  } else {
1059  iCrack -= 1;
1060  }
1061  }
1062  }
1063  } else {
1064  retVal = 0.; // IN: if there is a problem, we assume that we are in a crack
1065  }
1066  } else {
1067  return -99.;
1068  }
1069 
1070  return std::abs(retVal);
1071 }
1072 
1074 {
1075 //--- compute the (unsigned) distance to the closest eta-crack in the ECAL barrel
1076 
1077  // IN: define locations of the eta-cracks
1078  double cracks[5] = { 0., 4.44747e-01, 7.92824e-01, 1.14090e+00, 1.47464e+00 };
1079 
1080  double retVal = 99.;
1081 
1082  for ( int iCrack = 0; iCrack < 5 ; ++iCrack ) {
1083  double d = minimum(eta - cracks[iCrack], eta + cracks[iCrack]);
1084  if ( std::abs(d) < std::abs(retVal) ) {
1085  retVal = d;
1086  }
1087  }
1088 
1089  return std::abs(retVal);
1090 }
const GBRForest * mva_woGwGSF_BL_
bool isAvailable() const
Definition: Ref.h:614
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
Float_t * Var_NoEleMatch_woGwoGSF_Endcap_
Float_t * Var_NoEleMatch_wGwoGSF_Barrel_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
tuple cfg
Definition: looper.py:259
SuperClusterRef parentSuperCluster() const
Definition: GsfElectron.h:188
const PFCandidatePtr & leadPFChargedHadrCand() const
Definition: PFTau.cc:63
const GBRForest * mva_woGwoGSF_BL_
double minimum(double a, double b)
edm::FileInPath inputFileName_
const GBRForest * mva_wGwoGSF_EC_
std::string mvaName_woGwoGSF_BL_
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:289
const std::vector< reco::PFCandidatePtr > & signalPFGammaCands() const
Gamma candidates in signal region.
Definition: PFTau.cc:80
const GBRForest * mva_NoEleMatch_woGwGSF_EC_
std::string mvaName_NoEleMatch_woGwoGSF_EC_
bool exists(std::string const &parameterName) const
checks if a parameter exists
float emFraction() const
Definition: PFTau.cc:209
float fbrem() const
Definition: GsfElectron.h:684
Float_t * Var_NoEleMatch_woGwoGSF_Barrel_
T eta() const
std::string mvaName_NoEleMatch_woGwGSF_BL_
const GBRForest * mva_NoEleMatch_wGwGSF_EC_
const std::vector< reco::PFCandidatePtr > & signalPFCands() const
PFCandidates in signal region.
Definition: PFTau.cc:74
virtual double eta() const
momentum pseudorapidity
virtual double pt() const
transverse momentum
#define constexpr
const Double_t pi
tuple d
Definition: ztail.py:151
std::string mvaName_woGwoGSF_EC_
std::string mvaName_NoEleMatch_woGwGSF_EC_
virtual double mass() const
mass
std::string mvaName_wGwoGSF_EC_
const GBRForest * mva_NoEleMatch_woGwoGSF_EC_
void beginEvent(const edm::Event &, const edm::EventSetup &)
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:604
const GBRForest * mva_woGwoGSF_EC_
const GBRForest * mva_NoEleMatch_wGwGSF_BL_
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
const GBRForest * mva_NoEleMatch_woGwoGSF_BL_
T sqrt(T t)
Definition: SSEVec.h:48
std::string mvaName_wGwoGSF_BL_
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:291
double pt() const
track transverse momentum
Definition: TrackBase.h:574
std::string mvaName_woGwGSF_EC_
std::string mvaName_woGwGSF_BL_
const GBRForest * mva_woGwGSF_EC_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::string mvaName_wGwGSF_EC_
std::string mvaName_NoEleMatch_wGwoGSF_BL_
Float_t * Var_NoEleMatch_woGwGSF_Endcap_
T min(T a, T b)
Definition: MathUtil.h:58
std::vector< TFile * > inputFilesToDelete_
std::string mvaName_NoEleMatch_woGwoGSF_BL_
#define M_PI
double dCrackEta(double eta)
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:152
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
const GBRForest * mva_wGwoGSF_BL_
std::string mvaName_wGwGSF_BL_
std::pair< int, edm::FunctionWithDict > OK
Definition: findMethod.cc:136
LocationCode location() const
Where was the file found?
Definition: FileInPath.cc:159
double MVAValue(Float_t TauEtaAtEcalEntrance, Float_t TauPt, Float_t TauLeadChargedPFCandEtaAtEcalEntrance, Float_t TauLeadChargedPFCandPt, 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)
const GBRForest * mva_NoEleMatch_woGwGSF_BL_
const T & get() const
Definition: EventSetup.h:55
const GBRForest * mva_NoEleMatch_wGwoGSF_BL_
std::string mvaName_NoEleMatch_wGwGSF_BL_
T const * product() const
Definition: ESHandle.h:86
Float_t * Var_NoEleMatch_woGwGSF_Barrel_
const GBRForest * mva_wGwGSF_BL_
double b
Definition: hdecay.h:120
Float_t * Var_NoEleMatch_wGwGSF_Endcap_
const GBRForest * mva_NoEleMatch_wGwoGSF_EC_
const GBRForest * mva_wGwGSF_EC_
double a
Definition: hdecay.h:121
double dCrackPhi(double phi, double eta)
std::string mvaName_NoEleMatch_wGwoGSF_EC_
std::string mvaName_NoEleMatch_wGwGSF_EC_
Float_t * Var_NoEleMatch_wGwGSF_Barrel_
volatile std::atomic< bool > shutdown_flag false
std::string fullPath() const
Definition: FileInPath.cc:165
AntiElectronIDMVA5(const edm::ParameterSet &)
double GetClassifier(const float *vector) const
Definition: GBRForest.h:64
float electronPreIDOutput() const
Definition: PFTau.cc:216
virtual double phi() const
momentum azimuthal angle
Float_t * Var_NoEleMatch_wGwoGSF_Endcap_
const std::vector< reco::PFCandidatePtr > & signalPFChargedHadrCands() const
Charged hadrons in signal region.
Definition: PFTau.cc:76
tuple loadMVAfromDB
Definition: mvaPFMET_cff.py:86
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:183
tuple log
Definition: cmsBatch.py:347
Definition: DDAxes.h:10