CMS 3D CMS Logo

EGammaMvaEleEstimatorCSA14.cc
Go to the documentation of this file.
1 #include <TFile.h>
3 #include <cmath>
4 #include <vector>
5 #include <cstdio>
6 #include <zlib.h>
7 #include "TMVA/MethodBase.h"
9 
10 //--------------------------------------------------------------------------------------------------
12  : fMethodname("BDTG method"), fisInitialized(kFALSE), fMVAType(kTrig), fUseBinnedVersion(kTRUE), fNMVABins(0) {
13  // Constructor.
14 }
15 
16 //--------------------------------------------------------------------------------------------------
18  for (unsigned int i = 0; i < fTMVAReader.size(); ++i) {
19  if (fTMVAReader[i])
20  delete fTMVAReader[i];
21  }
22 }
23 
24 //--------------------------------------------------------------------------------------------------
26  std::string weightsfile,
28  std::vector<std::string> tempWeightFileVector;
29  tempWeightFileVector.push_back(weightsfile);
30  initialize(methodName, type, kFALSE, tempWeightFileVector);
31 }
32 
33 //--------------------------------------------------------------------------------------------------
36  Bool_t useBinnedVersion,
37  std::vector<std::string> weightsfiles) {
38  //clean up first
39  for (unsigned int i = 0; i < fTMVAReader.size(); ++i) {
40  if (fTMVAReader[i])
41  delete fTMVAReader[i];
42  }
43  fTMVAReader.clear();
44  fTMVAMethod.clear();
45  //initialize
46  fisInitialized = kTRUE;
47  fMVAType = type;
48  fMethodname = methodName;
49  fUseBinnedVersion = useBinnedVersion;
50 
51  //Define expected number of bins
52  UInt_t ExpectedNBins = 0;
53  if (type == kTrig) {
54  ExpectedNBins = 2;
55  } else if (type == kNonTrig) {
56  ExpectedNBins = 4;
57  } else if (type == kNonTrigPhys14) {
58  ExpectedNBins = 6;
59  }
60 
61  fNMVABins = ExpectedNBins;
62 
63  //Check number of weight files given
64  if (fNMVABins != weightsfiles.size()) {
65  std::cout << "Error: Expected Number of bins = " << fNMVABins
66  << " does not equal to weightsfiles.size() = " << weightsfiles.size() << std::endl;
67 
68 #ifndef STANDALONE
69  assert(fNMVABins == weightsfiles.size());
70 #endif
71  }
72 
73  //Loop over all bins
74  for (unsigned int i = 0; i < fNMVABins; ++i) {
75  TMVA::Reader *tmpTMVAReader = new TMVA::Reader("!Color:!Silent:Error");
76  tmpTMVAReader->SetVerbose(kTRUE);
77 
78  if (type == kTrig) {
79  // Pure tracking variables
80  // Pure tracking variables
81  tmpTMVAReader->AddVariable("fBrem", &fMVAVar_fbrem);
82  tmpTMVAReader->AddVariable("kfchi2", &fMVAVar_kfchi2);
83  tmpTMVAReader->AddVariable("kfhits", &fMVAVar_kfhits);
84  tmpTMVAReader->AddVariable("gsfChi2", &fMVAVar_gsfchi2);
85 
86  // Geometrical matchings
87  tmpTMVAReader->AddVariable("eledeta", &fMVAVar_deta);
88  tmpTMVAReader->AddVariable("eledphi", &fMVAVar_dphi);
89  tmpTMVAReader->AddVariable("detacalo", &fMVAVar_detacalo);
90 
91  // Pure ECAL -> shower shapes
92  tmpTMVAReader->AddVariable("noZSsee", &fMVAVar_see);
93  tmpTMVAReader->AddVariable("noZSspp", &fMVAVar_spp);
94  tmpTMVAReader->AddVariable("etawidth", &fMVAVar_etawidth);
95  tmpTMVAReader->AddVariable("phiwidth", &fMVAVar_phiwidth);
96  tmpTMVAReader->AddVariable("noZSe1x5e5x5", &fMVAVar_OneMinusE1x5E5x5);
97  tmpTMVAReader->AddVariable("noZSr9", &fMVAVar_R9);
98 
99  // Energy matching
100  tmpTMVAReader->AddVariable("HtoE", &fMVAVar_HoE);
101  tmpTMVAReader->AddVariable("EoP", &fMVAVar_EoP);
102  tmpTMVAReader->AddVariable("IoEmIoP", &fMVAVar_IoEmIoP);
103  tmpTMVAReader->AddVariable("EEleoPout", &fMVAVar_eleEoPout);
104  if (i == 1)
105  tmpTMVAReader->AddVariable("PreShowerOverRaw", &fMVAVar_PreShowerOverRaw);
106 
107  tmpTMVAReader->AddSpectator("pt", &fMVAVar_pt);
108  tmpTMVAReader->AddSpectator("absEta", &fMVAVar_abseta);
109  }
110 
111  if ((type == kNonTrig) || (type == kNonTrigPhys14)) {
112  tmpTMVAReader->AddVariable("ele_kfhits", &fMVAVar_kfhits);
113  // Pure ECAL -> shower shapes
114  tmpTMVAReader->AddVariable("ele_oldsigmaietaieta", &fMVAVar_see);
115  tmpTMVAReader->AddVariable("ele_oldsigmaiphiiphi", &fMVAVar_spp);
116  tmpTMVAReader->AddVariable("ele_oldcircularity", &fMVAVar_OneMinusE1x5E5x5);
117  tmpTMVAReader->AddVariable("ele_oldr9", &fMVAVar_R9);
118  tmpTMVAReader->AddVariable("ele_scletawidth", &fMVAVar_etawidth);
119  tmpTMVAReader->AddVariable("ele_sclphiwidth", &fMVAVar_phiwidth);
120  tmpTMVAReader->AddVariable("ele_he", &fMVAVar_HoE);
121  if ((type == kNonTrig) && (i == 1 || i == 3))
122  tmpTMVAReader->AddVariable("ele_psEoverEraw", &fMVAVar_PreShowerOverRaw);
123  if ((type == kNonTrigPhys14) && (i == 2 || i == 5))
124  tmpTMVAReader->AddVariable("ele_psEoverEraw", &fMVAVar_PreShowerOverRaw);
125 
126  //Pure tracking variables
127  tmpTMVAReader->AddVariable("ele_kfchi2", &fMVAVar_kfchi2);
128  tmpTMVAReader->AddVariable("ele_chi2_hits", &fMVAVar_gsfchi2);
129  // Energy matching
130  tmpTMVAReader->AddVariable("ele_fbrem", &fMVAVar_fbrem);
131  tmpTMVAReader->AddVariable("ele_ep", &fMVAVar_EoP);
132  tmpTMVAReader->AddVariable("ele_eelepout", &fMVAVar_eleEoPout);
133  tmpTMVAReader->AddVariable("ele_IoEmIop", &fMVAVar_IoEmIoP);
134 
135  // Geometrical matchings
136  tmpTMVAReader->AddVariable("ele_deltaetain", &fMVAVar_deta);
137  tmpTMVAReader->AddVariable("ele_deltaphiin", &fMVAVar_dphi);
138  tmpTMVAReader->AddVariable("ele_deltaetaseed", &fMVAVar_detacalo);
139 
140  tmpTMVAReader->AddSpectator("ele_pT", &fMVAVar_pt);
141  tmpTMVAReader->AddSpectator("ele_isbarrel", &fMVAVar_isBarrel);
142  tmpTMVAReader->AddSpectator("ele_isendcap", &fMVAVar_isEndcap);
143  if (type == kNonTrigPhys14)
144  tmpTMVAReader->AddSpectator("scl_eta", &fMVAVar_SCeta);
145  }
146 
147 #ifndef STANDALONE
148  if ((fMethodname.find("BDT") == 0) &&
149  (weightsfiles[i].rfind(".xml.gz") == weightsfiles[i].length() - strlen(".xml.gz"))) {
150  gzFile file = gzopen(weightsfiles[i].c_str(), "rb");
151  if (file == nullptr) {
152  std::cout << "Error opening gzip file associated to " << weightsfiles[i] << std::endl;
153  throw cms::Exception("Configuration", "Error reading zipped XML file");
154  }
155  std::vector<char> data;
156  data.reserve(1024 * 1024 * 10);
157  unsigned int bufflen = 32 * 1024;
158  char *buff = reinterpret_cast<char *>(malloc(bufflen));
159  if (buff == nullptr) {
160  std::cout << "Error creating buffer for " << weightsfiles[i] << std::endl;
161  gzclose(file);
162  throw cms::Exception("Configuration", "Error reading zipped XML file");
163  }
164  int read;
165  while ((read = gzread(file, buff, bufflen)) != 0) {
166  if (read == -1) {
167  std::cout << "Error reading gzip file associated to " << weightsfiles[i] << ": " << gzerror(file, &read)
168  << std::endl;
169  gzclose(file);
170  free(buff);
171  throw cms::Exception("Configuration", "Error reading zipped XML file");
172  }
173  data.insert(data.end(), buff, buff + read);
174  }
175  if (gzclose(file) != Z_OK) {
176  std::cout << "Error closing gzip file associated to " << weightsfiles[i] << std::endl;
177  }
178  free(buff);
179  data.push_back('\0'); // IMPORTANT
180  fTMVAMethod.push_back(dynamic_cast<TMVA::MethodBase *>(tmpTMVAReader->BookMVA(TMVA::Types::kBDT, &data[0])));
181  } else {
182  if (weightsfiles[i].rfind(".xml.gz") == weightsfiles[i].length() - strlen(".xml.gz")) {
183  std::cout << "Error: xml.gz unsupported for method " << fMethodname << ", weight file " << weightsfiles[i]
184  << std::endl;
185  throw cms::Exception("Configuration", "Error reading zipped XML file");
186  }
187  fTMVAMethod.push_back(dynamic_cast<TMVA::MethodBase *>(tmpTMVAReader->BookMVA(fMethodname, weightsfiles[i])));
188  }
189 #else
190  if (weightsfiles[i].rfind(".xml.gz") == weightsfiles[i].length() - strlen(".xml.gz")) {
191  std::cout << "Error: xml.gz unsupported for method " << fMethodname << ", weight file " << weightsfiles[i]
192  << std::endl;
193  abort();
194  }
195  fTMVAMethod.push_back(dynamic_cast<TMVA::MethodBase *>(tmpTMVAReader->BookMVA(fMethodname, weightsfiles[i])));
196 #endif
197  std::cout << "MVABin " << i << " : MethodName = " << fMethodname << " , type == " << type << " , "
198  << "Load weights file : " << weightsfiles[i] << std::endl;
199  fTMVAReader.push_back(tmpTMVAReader);
200  }
201  std::cout << "Electron ID MVA Completed\n";
202 }
203 
204 //--------------------------------------------------------------------------------------------------
205 UInt_t EGammaMvaEleEstimatorCSA14::GetMVABin(double eta, double pt) const {
206  //Default is to return the first bin
207  unsigned int bin = 0;
208 
210  bin = 0;
211  if (pt < 10 && fabs(eta) < 1.479)
212  bin = 0;
213  if (pt < 10 && fabs(eta) >= 1.479)
214  bin = 1;
215  if (pt >= 10 && fabs(eta) < 1.479)
216  bin = 2;
217  if (pt >= 10 && fabs(eta) >= 1.479)
218  bin = 3;
219  }
220 
222  bin = 0;
223  if (pt >= 10 && fabs(eta) < 1.479)
224  bin = 0;
225  if (pt >= 10 && fabs(eta) >= 1.479)
226  bin = 1;
227  }
228 
230  bin = 0;
231  if (pt < 10 && fabs(eta) < 0.8)
232  bin = 0;
233  if (pt < 10 && fabs(eta) >= 0.8 && fabs(eta) < 1.479)
234  bin = 1;
235  if (pt < 10 && fabs(eta) >= 1.479)
236  bin = 2;
237  if (pt >= 10 && fabs(eta) < 0.8)
238  bin = 3;
239  if (pt >= 10 && fabs(eta) >= 0.8 && fabs(eta) < 1.479)
240  bin = 4;
241  if (pt >= 10 && fabs(eta) >= 1.479)
242  bin = 5;
243  }
244 
245  return bin;
246 }
247 
248 //--------------------------------------------------------------------------------------------------
249 
250 // for kTrig and kNonTrig algorithm
252  const reco::Vertex &vertex,
253  const TransientTrackBuilder &transientTrackBuilder,
254  noZS::EcalClusterLazyTools myEcalCluster,
255  bool printDebug) {
256  if (!fisInitialized) {
257  std::cout << "Error: EGammaMvaEleEstimatorCSA14 not properly initialized.\n";
258  return -9999;
259  }
260 
263  std::cout << "Error: This method should be called for kTrig or kNonTrig or kNonTrigPhys14 MVA only" << std::endl;
264  return -9999;
265  }
266 
267  bool validKF = false;
268  reco::TrackRef myTrackRef = ele.closestCtfTrackRef();
269  validKF = (myTrackRef.isAvailable());
270  validKF &= (myTrackRef.isNonnull());
271 
272  // Pure tracking variables
273  fMVAVar_fbrem = ele.fbrem();
274  fMVAVar_kfchi2 = (validKF) ? myTrackRef->normalizedChi2() : 0;
275  fMVAVar_kfhits = (validKF) ? myTrackRef->hitPattern().trackerLayersWithMeasurement() : -1.;
277  (validKF) ? myTrackRef->numberOfValidHits() : -1.; // save also this in your ntuple as possible alternative
278  fMVAVar_gsfchi2 = ele.gsfTrack()->normalizedChi2();
279 
280  // Geometrical matchings
284 
285  // Pure ECAL -> shower shapes
286  const auto &vCov = myEcalCluster.localCovariances(*(ele.superCluster()->seed()));
287  if (edm::isFinite(vCov[0]))
288  fMVAVar_see = sqrt(vCov[0]); //EleSigmaIEtaIEta
289  else
290  fMVAVar_see = 0.;
291  if (edm::isFinite(vCov[2]))
292  fMVAVar_spp = sqrt(vCov[2]); //EleSigmaIPhiIPhi
293  else
294  fMVAVar_spp = 0.;
295 
296  fMVAVar_etawidth = ele.superCluster()->etaWidth();
297  fMVAVar_phiwidth = ele.superCluster()->phiWidth();
299  (ele.e5x5()) != 0.
300  ? 1. - (myEcalCluster.e1x5(*(ele.superCluster()->seed())) / myEcalCluster.e5x5(*(ele.superCluster()->seed())))
301  : -1.;
302  fMVAVar_R9 = myEcalCluster.e3x3(*(ele.superCluster()->seed())) / ele.superCluster()->rawEnergy();
303 
304  // Energy matching
305  fMVAVar_HoE = ele.hadronicOverEm();
307  fMVAVar_IoEmIoP = (1.0 / ele.ecalEnergy()) - (1.0 / ele.p()); // in the future to be changed with ele.gsfTrack()->p()
309  fMVAVar_PreShowerOverRaw = ele.superCluster()->preshowerEnergy() / ele.superCluster()->rawEnergy();
310 
311  // Spectators
312  fMVAVar_eta = ele.superCluster()->eta();
313  fMVAVar_abseta = fabs(ele.superCluster()->eta());
314  fMVAVar_pt = ele.pt();
315  fMVAVar_isBarrel = (ele.superCluster()->eta() < 1.479);
316  fMVAVar_isEndcap = (ele.superCluster()->eta() > 1.479);
317  fMVAVar_SCeta = ele.superCluster()->eta();
318 
319  // for triggering electrons get the impact parameteres
320  if (fMVAType == kTrig) {
321  //d0
322  if (ele.gsfTrack().isNonnull()) {
323  fMVAVar_d0 = (-1.0) * ele.gsfTrack()->dxy(vertex.position());
324  } else if (ele.closestCtfTrackRef().isNonnull()) {
325  fMVAVar_d0 = (-1.0) * ele.closestCtfTrackRef()->dxy(vertex.position());
326  } else {
327  fMVAVar_d0 = -9999.0;
328  }
329 
330  //default values for IP3D
331  fMVAVar_ip3d = -999.0;
332  fMVAVar_ip3dSig = 0.0;
333  if (ele.gsfTrack().isNonnull()) {
334  const double gsfsign = ((-ele.gsfTrack()->dxy(vertex.position())) >= 0) ? 1. : -1.;
335 
336  const reco::TransientTrack &tt = transientTrackBuilder.build(ele.gsfTrack());
337  const std::pair<bool, Measurement1D> &ip3dpv = IPTools::absoluteImpactParameter3D(tt, vertex);
338  if (ip3dpv.first) {
339  double ip3d = gsfsign * ip3dpv.second.value();
340  double ip3derr = ip3dpv.second.error();
341  fMVAVar_ip3d = ip3d;
342  fMVAVar_ip3dSig = ip3d / ip3derr;
343  }
344  }
345  }
346 
347  // evaluate
348  bindVariables();
349  Double_t mva = -9999;
350  if (fUseBinnedVersion) {
352  mva = fTMVAReader[bin]->EvaluateMVA(fTMVAMethod[bin]);
353  } else {
354  mva = fTMVAReader[0]->EvaluateMVA(fTMVAMethod[0]);
355  }
356 
357  if (printDebug) {
358  std::cout << " *** Inside the class fMethodname " << fMethodname << " fMVAType " << fMVAType << std::endl;
359  std::cout << " fbrem " << fMVAVar_fbrem << " kfchi2 " << fMVAVar_kfchi2 << " mykfhits " << fMVAVar_kfhits
360  << " gsfchi2 " << fMVAVar_gsfchi2 << " deta " << fMVAVar_deta << " dphi " << fMVAVar_dphi << " detacalo "
361  << fMVAVar_detacalo << " see " << fMVAVar_see << " spp " << fMVAVar_spp << " etawidth "
362  << fMVAVar_etawidth << " phiwidth " << fMVAVar_phiwidth << " OneMinusE1x5E5x5 "
363  << fMVAVar_OneMinusE1x5E5x5 << " R9 " << fMVAVar_R9 << " HoE " << fMVAVar_HoE << " EoP " << fMVAVar_EoP
364  << " IoEmIoP " << fMVAVar_IoEmIoP << " eleEoPout " << fMVAVar_eleEoPout << " d0 " << fMVAVar_d0
365  << " ip3d " << fMVAVar_ip3d << " eta " << fMVAVar_eta << " pt " << fMVAVar_pt << std::endl;
366  std::cout << " ### MVA " << mva << std::endl;
367  }
368 
369  return mva;
370 }
371 
373  if (!fisInitialized) {
374  std::cout << "Error: EGammaMvaEleEstimatorCSA14 not properly initialized.\n";
375  return -9999;
376  }
377 
380  std::cout << "Error: This method should be called for kTrig or kNonTrig or kNonTrigPhys14 MVA only" << std::endl;
381  return -9999;
382  }
383 
384  bool validKF = false;
385  reco::TrackRef myTrackRef = ele.closestCtfTrackRef();
386  validKF = (myTrackRef.isAvailable());
387  validKF &= (myTrackRef.isNonnull());
388 
389  // Pure tracking variables
390  fMVAVar_fbrem = ele.fbrem();
391  fMVAVar_kfchi2 = (validKF) ? myTrackRef->normalizedChi2() : 0;
392  fMVAVar_kfhits = (validKF) ? myTrackRef->hitPattern().trackerLayersWithMeasurement() : -1.;
394  (validKF) ? myTrackRef->numberOfValidHits() : -1.; // save also this in your ntuple as possible alternative
395  fMVAVar_gsfchi2 = ele.gsfTrack()->normalizedChi2();
396 
397  // Geometrical matchings
401 
402  // Pure ECAL -> shower shapes
403  fMVAVar_see = ele.full5x5_sigmaIetaIeta(); //EleSigmaIEtaIEta
404  fMVAVar_spp = ele.full5x5_sigmaIphiIphi(); //EleSigmaIPhiIPhi
405 
406  fMVAVar_etawidth = ele.superCluster()->etaWidth();
407  fMVAVar_phiwidth = ele.superCluster()->phiWidth();
408  fMVAVar_OneMinusE1x5E5x5 = (ele.full5x5_e5x5()) != 0. ? 1. - (ele.full5x5_e1x5() / ele.full5x5_e5x5()) : -1.;
409  fMVAVar_R9 = ele.full5x5_r9();
410 
411  // Energy matching
412  fMVAVar_HoE = ele.hadronicOverEm();
414  fMVAVar_IoEmIoP = (1.0 / ele.ecalEnergy()) - (1.0 / ele.p()); // in the future to be changed with ele.gsfTrack()->p()
416  fMVAVar_PreShowerOverRaw = ele.superCluster()->preshowerEnergy() / ele.superCluster()->rawEnergy();
417 
418  // Spectators
419  fMVAVar_eta = ele.superCluster()->eta();
420  fMVAVar_abseta = fabs(ele.superCluster()->eta());
421  fMVAVar_pt = ele.pt();
422  fMVAVar_isBarrel = (ele.superCluster()->eta() < 1.479);
423  fMVAVar_isEndcap = (ele.superCluster()->eta() > 1.479);
424  fMVAVar_SCeta = ele.superCluster()->eta();
425 
426  // evaluate
427  bindVariables();
428  Double_t mva = -9999;
429  if (fUseBinnedVersion) {
431  mva = fTMVAReader[bin]->EvaluateMVA(fTMVAMethod[bin]);
432  } else {
433  mva = fTMVAReader[0]->EvaluateMVA(fTMVAMethod[0]);
434  }
435 
436  if (printDebug) {
437  std::cout << " *** Inside the class fMethodname " << fMethodname << " fMVAType " << fMVAType << std::endl;
438  std::cout << " fbrem " << fMVAVar_fbrem << " kfchi2 " << fMVAVar_kfchi2 << " mykfhits " << fMVAVar_kfhits
439  << " gsfchi2 " << fMVAVar_gsfchi2 << " deta " << fMVAVar_deta << " dphi " << fMVAVar_dphi << " detacalo "
440  << fMVAVar_detacalo << " see " << fMVAVar_see << " spp " << fMVAVar_spp << " etawidth "
441  << fMVAVar_etawidth << " phiwidth " << fMVAVar_phiwidth << " OneMinusE1x5E5x5 "
442  << fMVAVar_OneMinusE1x5E5x5 << " R9 " << fMVAVar_R9 << " HoE " << fMVAVar_HoE << " EoP " << fMVAVar_EoP
443  << " IoEmIoP " << fMVAVar_IoEmIoP << " eleEoPout " << fMVAVar_eleEoPout << " eta " << fMVAVar_eta
444  << " pt " << fMVAVar_pt << std::endl;
445  std::cout << " ### MVA " << mva << std::endl;
446  }
447 
448  return mva;
449 }
450 
452  // this binding is needed for variables that sometime diverge.
453 
454  if (fMVAVar_fbrem < -1.)
455  fMVAVar_fbrem = -1.;
456 
457  fMVAVar_deta = fabs(fMVAVar_deta);
458  if (fMVAVar_deta > 0.06)
459  fMVAVar_deta = 0.06;
460 
461  fMVAVar_dphi = fabs(fMVAVar_dphi);
462  if (fMVAVar_dphi > 0.6)
463  fMVAVar_dphi = 0.6;
464 
465  if (fMVAVar_EoP > 20.)
466  fMVAVar_EoP = 20.;
467 
468  if (fMVAVar_eleEoPout > 20.)
469  fMVAVar_eleEoPout = 20.;
470 
472  if (fMVAVar_detacalo > 0.2)
473  fMVAVar_detacalo = 0.2;
474 
475  if (fMVAVar_OneMinusE1x5E5x5 < -1.)
477 
478  if (fMVAVar_OneMinusE1x5E5x5 > 2.)
480 
481  if (fMVAVar_R9 > 5)
482  fMVAVar_R9 = 5;
483 
484  if (fMVAVar_gsfchi2 > 200.)
485  fMVAVar_gsfchi2 = 200;
486 
487  if (fMVAVar_kfchi2 > 10.)
488  fMVAVar_kfchi2 = 10.;
489 
490  // Needed for a bug in CMSSW_420, fixed in more recent CMSSW versions
491 #ifndef STANDALONE
493 #else
494  if (std::isnan(fMVAVar_spp))
495 #endif
496  fMVAVar_spp = 0.;
497 
498  return;
499 }
void initialize(std::string methodName, std::string weightsfile, EGammaMvaEleEstimatorCSA14::MVAType type)
float e3x3(const reco::BasicCluster &cluster) const
def isnan(num)
std::vector< TMVA::MethodBase * > fTMVAMethod
double pt() const final
transverse momentum
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
float full5x5_e1x5() const
Definition: GsfElectron.h:473
reco::TrackRef closestCtfTrackRef() const override
override the reco::GsfElectron::closestCtfTrackRef method, to access the internal storage of the trac...
std::pair< bool, Measurement1D > absoluteImpactParameter3D(const reco::TransientTrack &transientTrack, const reco::Vertex &vertex)
Definition: IPTools.cc:38
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
float e1x5(const reco::BasicCluster &cluster) const
reco::GsfTrackRef gsfTrack() const override
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster ...
reco::SuperClusterRef superCluster() const override
override the reco::GsfElectron::superCluster method, to access the internal storage of the superclust...
UInt_t GetMVABin(double eta, double pt) const
float full5x5_sigmaIphiIphi() const
Definition: GsfElectron.h:472
Double_t mvaValue(const reco::GsfElectron &ele, const reco::Vertex &vertex, const TransientTrackBuilder &transientTrackBuilder, noZS::EcalClusterLazyTools myEcalCluster, bool printDebug=kFALSE)
assert(be >=bs)
constexpr bool isFinite(T x)
float e5x5(const reco::BasicCluster &cluster) const
std::vector< TMVA::Reader * > fTMVAReader
float eSuperClusterOverP() const
Definition: GsfElectron.h:221
float full5x5_e5x5() const
Definition: GsfElectron.h:475
float eEleClusterOverPout() const
Definition: GsfElectron.h:224
reco::TransientTrack build(const reco::Track *p) const
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:156
Definition: TTTypes.h:54
double p() const final
magnitude of momentum vector
float e5x5() const
Definition: GsfElectron.h:423
std::array< float, 3 > localCovariances(const reco::BasicCluster &cluster, float w0=EgammaLocalCovParamDefaults::kRelEnCut, const EcalPFRecHitThresholds *rhthresholds=nullptr, float multEB=0.0, float multEE=0.0) const
T sqrt(T t)
Definition: SSEVec.h:19
bool isAvailable() const
Definition: Ref.h:537
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:228
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:225
float ecalEnergy() const
Definition: GsfElectron.h:896
Analysis-level electron class.
Definition: Electron.h:51
virtual TrackRef closestCtfTrackRef() const
Definition: GsfElectron.h:180
float fbrem() const
Definition: GsfElectron.h:809
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
float full5x5_r9() const
Definition: GsfElectron.h:476
float deltaEtaSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:226
float full5x5_sigmaIetaIeta() const
Definition: GsfElectron.h:471
float hadronicOverEm() const
Definition: GsfElectron.h:500
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155