CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
EGammaMvaEleEstimatorCSA14 Class Reference

#include <EGammaMvaEleEstimatorCSA14.h>

Public Types

enum  MVAType { kTrig = 0, kNonTrig = 1, kNonTrigPhys14 = 2 }
 

Public Member Functions

void bindVariables ()
 
 EGammaMvaEleEstimatorCSA14 ()
 
UInt_t GetMVABin (double eta, double pt) const
 
void initialize (std::string methodName, EGammaMvaEleEstimatorCSA14::MVAType type, Bool_t useBinnedVersion, std::vector< std::string > weightsfiles)
 
void initialize (std::string methodName, std::string weightsfile, EGammaMvaEleEstimatorCSA14::MVAType type)
 
Bool_t isInitialized () const
 
Double_t mvaValue (const pat::Electron &ele, bool printDebug)
 
Double_t mvaValue (const reco::GsfElectron &ele, const reco::Vertex &vertex, const TransientTrackBuilder &transientTrackBuilder, noZS::EcalClusterLazyTools myEcalCluster, bool printDebug=kFALSE)
 
 ~EGammaMvaEleEstimatorCSA14 ()
 

Private Attributes

Bool_t fisInitialized
 
std::string fMethodname
 
MVAType fMVAType
 
Float_t fMVAVar_abseta
 
Float_t fMVAVar_ChargedIso_DR0p0To0p1
 
Float_t fMVAVar_ChargedIso_DR0p1To0p2
 
Float_t fMVAVar_ChargedIso_DR0p2To0p3
 
Float_t fMVAVar_ChargedIso_DR0p3To0p4
 
Float_t fMVAVar_ChargedIso_DR0p4To0p5
 
Float_t fMVAVar_d0
 
Float_t fMVAVar_deta
 
Float_t fMVAVar_detacalo
 
Float_t fMVAVar_dphi
 
Float_t fMVAVar_eleEoPout
 
Float_t fMVAVar_EoP
 
Float_t fMVAVar_EoPout
 
Float_t fMVAVar_eta
 
Float_t fMVAVar_etawidth
 
Float_t fMVAVar_fbrem
 
Float_t fMVAVar_GammaIso_DR0p0To0p1
 
Float_t fMVAVar_GammaIso_DR0p1To0p2
 
Float_t fMVAVar_GammaIso_DR0p2To0p3
 
Float_t fMVAVar_GammaIso_DR0p3To0p4
 
Float_t fMVAVar_GammaIso_DR0p4To0p5
 
Float_t fMVAVar_gsfchi2
 
Float_t fMVAVar_HoE
 
Float_t fMVAVar_IoEmIoP
 
Float_t fMVAVar_ip3d
 
Float_t fMVAVar_ip3dSig
 
Float_t fMVAVar_isBarrel
 
Float_t fMVAVar_isEndcap
 
Float_t fMVAVar_kfchi2
 
Float_t fMVAVar_kfhits
 
Float_t fMVAVar_kfhitsall
 
Float_t fMVAVar_NeutralHadronIso_DR0p0To0p1
 
Float_t fMVAVar_NeutralHadronIso_DR0p1To0p2
 
Float_t fMVAVar_NeutralHadronIso_DR0p2To0p3
 
Float_t fMVAVar_NeutralHadronIso_DR0p3To0p4
 
Float_t fMVAVar_NeutralHadronIso_DR0p4To0p5
 
Float_t fMVAVar_OneMinusE1x5E5x5
 
Float_t fMVAVar_phiwidth
 
Float_t fMVAVar_PreShowerOverRaw
 
Float_t fMVAVar_pt
 
Float_t fMVAVar_R9
 
Float_t fMVAVar_rho
 
Float_t fMVAVar_SCeta
 
Float_t fMVAVar_see
 
Float_t fMVAVar_spp
 
UInt_t fNMVABins
 
std::vector< TMVA::MethodBase * > fTMVAMethod
 
std::vector< TMVA::Reader * > fTMVAReader
 
Bool_t fUseBinnedVersion
 

Detailed Description

Definition at line 38 of file EGammaMvaEleEstimatorCSA14.h.

Member Enumeration Documentation

◆ MVAType

Enumerator
kTrig 
kNonTrig 
kNonTrigPhys14 

Definition at line 43 of file EGammaMvaEleEstimatorCSA14.h.

43  {
44  kTrig = 0, // MVA for triggering electrons
45  kNonTrig = 1, // MVA for non-triggering electrons
46  kNonTrigPhys14 = 2, // MVA for non-triggering electrons in Phys14
47  };

Constructor & Destructor Documentation

◆ EGammaMvaEleEstimatorCSA14()

EGammaMvaEleEstimatorCSA14::EGammaMvaEleEstimatorCSA14 ( )

Definition at line 11 of file EGammaMvaEleEstimatorCSA14.cc.

12  : fMethodname("BDTG method"), fisInitialized(kFALSE), fMVAType(kTrig), fUseBinnedVersion(kTRUE), fNMVABins(0) {
13  // Constructor.
14 }

◆ ~EGammaMvaEleEstimatorCSA14()

EGammaMvaEleEstimatorCSA14::~EGammaMvaEleEstimatorCSA14 ( )

Definition at line 17 of file EGammaMvaEleEstimatorCSA14.cc.

17  {
18  for (unsigned int i = 0; i < fTMVAReader.size(); ++i) {
19  if (fTMVAReader[i])
20  delete fTMVAReader[i];
21  }
22 }

References fTMVAReader, and mps_fire::i.

Member Function Documentation

◆ bindVariables()

void EGammaMvaEleEstimatorCSA14::bindVariables ( )

Definition at line 451 of file EGammaMvaEleEstimatorCSA14.cc.

451  {
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 }

References fMVAVar_deta, fMVAVar_detacalo, fMVAVar_dphi, fMVAVar_eleEoPout, fMVAVar_EoP, fMVAVar_fbrem, fMVAVar_gsfchi2, fMVAVar_kfchi2, fMVAVar_OneMinusE1x5E5x5, fMVAVar_R9, fMVAVar_spp, CommonMethods::isnan(), and edm::isNotFinite().

Referenced by mvaValue().

◆ GetMVABin()

UInt_t EGammaMvaEleEstimatorCSA14::GetMVABin ( double  eta,
double  pt 
) const

Definition at line 205 of file EGammaMvaEleEstimatorCSA14.cc.

205  {
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 }

References newFWLiteAna::bin, PVValHelper::eta, fMVAType, kNonTrig, kNonTrigPhys14, kTrig, and DiDispStaMuonMonitor_cfi::pt.

Referenced by mvaValue().

◆ initialize() [1/2]

void EGammaMvaEleEstimatorCSA14::initialize ( std::string  methodName,
EGammaMvaEleEstimatorCSA14::MVAType  type,
Bool_t  useBinnedVersion,
std::vector< std::string >  weightsfiles 
)

Definition at line 34 of file EGammaMvaEleEstimatorCSA14.cc.

37  {
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 }

References cms::cuda::assert(), gather_cfg::cout, data, Exception, FrontierConditions_GlobalTag_cff::file, fisInitialized, fMethodname, fMVAType, fMVAVar_abseta, fMVAVar_deta, fMVAVar_detacalo, fMVAVar_dphi, fMVAVar_eleEoPout, fMVAVar_EoP, fMVAVar_etawidth, fMVAVar_fbrem, fMVAVar_gsfchi2, fMVAVar_HoE, fMVAVar_IoEmIoP, fMVAVar_isBarrel, fMVAVar_isEndcap, fMVAVar_kfchi2, fMVAVar_kfhits, fMVAVar_OneMinusE1x5E5x5, fMVAVar_phiwidth, fMVAVar_PreShowerOverRaw, fMVAVar_pt, fMVAVar_R9, fMVAVar_SCeta, fMVAVar_see, fMVAVar_spp, fNMVABins, fTMVAMethod, fTMVAReader, fUseBinnedVersion, mps_fire::i, kNonTrig, kNonTrigPhys14, kTrig, and readEcalDQMStatus::read.

◆ initialize() [2/2]

void EGammaMvaEleEstimatorCSA14::initialize ( std::string  methodName,
std::string  weightsfile,
EGammaMvaEleEstimatorCSA14::MVAType  type 
)

Definition at line 25 of file EGammaMvaEleEstimatorCSA14.cc.

27  {
28  std::vector<std::string> tempWeightFileVector;
29  tempWeightFileVector.push_back(weightsfile);
30  initialize(methodName, type, kFALSE, tempWeightFileVector);
31 }

Referenced by heppy::EGammaMvaEleEstimatorFWLite::initialize().

◆ isInitialized()

Bool_t EGammaMvaEleEstimatorCSA14::isInitialized ( ) const
inline

Definition at line 55 of file EGammaMvaEleEstimatorCSA14.h.

55 { return fisInitialized; }

References fisInitialized.

◆ mvaValue() [1/2]

Double_t EGammaMvaEleEstimatorCSA14::mvaValue ( const pat::Electron ele,
bool  printDebug 
)

Definition at line 372 of file EGammaMvaEleEstimatorCSA14.cc.

372  {
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 }

References newFWLiteAna::bin, bindVariables(), pat::Electron::closestCtfTrackRef(), gather_cfg::cout, reco::GsfElectron::deltaEtaSeedClusterTrackAtCalo(), reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), reco::GsfElectron::ecalEnergy(), reco::GsfElectron::eEleClusterOverPout(), reco::GsfElectron::eSuperClusterOverP(), reco::GsfElectron::fbrem(), fisInitialized, fMethodname, fMVAType, fMVAVar_abseta, fMVAVar_deta, fMVAVar_detacalo, fMVAVar_dphi, fMVAVar_eleEoPout, fMVAVar_EoP, fMVAVar_eta, fMVAVar_etawidth, fMVAVar_fbrem, fMVAVar_gsfchi2, fMVAVar_HoE, fMVAVar_IoEmIoP, fMVAVar_isBarrel, fMVAVar_isEndcap, fMVAVar_kfchi2, fMVAVar_kfhits, fMVAVar_kfhitsall, fMVAVar_OneMinusE1x5E5x5, fMVAVar_phiwidth, fMVAVar_PreShowerOverRaw, fMVAVar_pt, fMVAVar_R9, fMVAVar_SCeta, fMVAVar_see, fMVAVar_spp, fTMVAMethod, fTMVAReader, reco::GsfElectron::full5x5_e1x5(), reco::GsfElectron::full5x5_e5x5(), reco::GsfElectron::full5x5_r9(), reco::GsfElectron::full5x5_sigmaIetaIeta(), reco::GsfElectron::full5x5_sigmaIphiIphi(), fUseBinnedVersion, GetMVABin(), pat::Electron::gsfTrack(), reco::GsfElectron::hadronicOverEm(), edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), kNonTrig, kNonTrigPhys14, kTrig, beam_dqm_sourceclient-live_cfg::mva, reco::LeafCandidate::p(), HLT_FULL_cff::printDebug, reco::LeafCandidate::pt(), and pat::Electron::superCluster().

◆ mvaValue() [2/2]

Double_t EGammaMvaEleEstimatorCSA14::mvaValue ( const reco::GsfElectron ele,
const reco::Vertex vertex,
const TransientTrackBuilder transientTrackBuilder,
noZS::EcalClusterLazyTools  myEcalCluster,
bool  printDebug = kFALSE 
)

Definition at line 251 of file EGammaMvaEleEstimatorCSA14.cc.

255  {
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 }

References IPTools::absoluteImpactParameter3D(), newFWLiteAna::bin, bindVariables(), TransientTrackBuilder::build(), reco::GsfElectron::closestCtfTrackRef(), gather_cfg::cout, reco::GsfElectron::deltaEtaSeedClusterTrackAtCalo(), reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), EcalClusterLazyToolsT< ClusterTools >::e1x5(), EcalClusterLazyToolsT< ClusterTools >::e3x3(), EcalClusterLazyToolsT< ClusterTools >::e5x5(), reco::GsfElectron::e5x5(), reco::GsfElectron::ecalEnergy(), reco::GsfElectron::eEleClusterOverPout(), reco::GsfElectron::eSuperClusterOverP(), reco::GsfElectron::fbrem(), fisInitialized, fMethodname, fMVAType, fMVAVar_abseta, fMVAVar_d0, fMVAVar_deta, fMVAVar_detacalo, fMVAVar_dphi, fMVAVar_eleEoPout, fMVAVar_EoP, fMVAVar_eta, fMVAVar_etawidth, fMVAVar_fbrem, fMVAVar_gsfchi2, fMVAVar_HoE, fMVAVar_IoEmIoP, fMVAVar_ip3d, fMVAVar_ip3dSig, fMVAVar_isBarrel, fMVAVar_isEndcap, fMVAVar_kfchi2, fMVAVar_kfhits, fMVAVar_kfhitsall, fMVAVar_OneMinusE1x5E5x5, fMVAVar_phiwidth, fMVAVar_PreShowerOverRaw, fMVAVar_pt, fMVAVar_R9, fMVAVar_SCeta, fMVAVar_see, fMVAVar_spp, fTMVAMethod, fTMVAReader, fUseBinnedVersion, GetMVABin(), reco::GsfElectron::gsfTrack(), reco::GsfElectron::hadronicOverEm(), electrons_cff::ip3d, edm::Ref< C, T, F >::isAvailable(), edm::isFinite(), edm::Ref< C, T, F >::isNonnull(), kNonTrig, kNonTrigPhys14, kTrig, EcalClusterLazyToolsT< ClusterTools >::localCovariances(), beam_dqm_sourceclient-live_cfg::mva, reco::LeafCandidate::p(), HLT_FULL_cff::printDebug, reco::LeafCandidate::pt(), mathSSE::sqrt(), reco::GsfElectron::superCluster(), groupFilesInBlocks::tt, and bphysicsOniaDQM_cfi::vertex.

Referenced by heppy::EGammaMvaEleEstimatorFWLite::mvaValue().

Member Data Documentation

◆ fisInitialized

Bool_t EGammaMvaEleEstimatorCSA14::fisInitialized
private

Definition at line 73 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), isInitialized(), and mvaValue().

◆ fMethodname

std::string EGammaMvaEleEstimatorCSA14::fMethodname
private

Definition at line 72 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAType

MVAType EGammaMvaEleEstimatorCSA14::fMVAType
private

Definition at line 74 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by GetMVABin(), initialize(), and mvaValue().

◆ fMVAVar_abseta

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_abseta
private

Definition at line 107 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_ChargedIso_DR0p0To0p1

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_ChargedIso_DR0p0To0p1
private

Definition at line 114 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_ChargedIso_DR0p1To0p2

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_ChargedIso_DR0p1To0p2
private

Definition at line 115 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_ChargedIso_DR0p2To0p3

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_ChargedIso_DR0p2To0p3
private

Definition at line 116 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_ChargedIso_DR0p3To0p4

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_ChargedIso_DR0p3To0p4
private

Definition at line 117 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_ChargedIso_DR0p4To0p5

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_ChargedIso_DR0p4To0p5
private

Definition at line 118 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_d0

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_d0
private

Definition at line 102 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by mvaValue().

◆ fMVAVar_deta

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_deta
private

Definition at line 84 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by bindVariables(), initialize(), and mvaValue().

◆ fMVAVar_detacalo

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_detacalo
private

Definition at line 86 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by bindVariables(), initialize(), and mvaValue().

◆ fMVAVar_dphi

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_dphi
private

Definition at line 85 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by bindVariables(), initialize(), and mvaValue().

◆ fMVAVar_eleEoPout

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_eleEoPout
private

Definition at line 98 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by bindVariables(), initialize(), and mvaValue().

◆ fMVAVar_EoP

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_EoP
private

Definition at line 96 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by bindVariables(), initialize(), and mvaValue().

◆ fMVAVar_EoPout

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_EoPout
private

Definition at line 99 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_eta

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_eta
private

Definition at line 106 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by mvaValue().

◆ fMVAVar_etawidth

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_etawidth
private

Definition at line 90 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_fbrem

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_fbrem
private

Definition at line 78 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by bindVariables(), initialize(), and mvaValue().

◆ fMVAVar_GammaIso_DR0p0To0p1

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_GammaIso_DR0p0To0p1
private

Definition at line 119 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_GammaIso_DR0p1To0p2

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_GammaIso_DR0p1To0p2
private

Definition at line 120 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_GammaIso_DR0p2To0p3

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_GammaIso_DR0p2To0p3
private

Definition at line 121 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_GammaIso_DR0p3To0p4

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_GammaIso_DR0p3To0p4
private

Definition at line 122 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_GammaIso_DR0p4To0p5

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_GammaIso_DR0p4To0p5
private

Definition at line 123 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_gsfchi2

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_gsfchi2
private

Definition at line 82 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by bindVariables(), initialize(), and mvaValue().

◆ fMVAVar_HoE

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_HoE
private

Definition at line 95 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_IoEmIoP

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_IoEmIoP
private

Definition at line 97 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_ip3d

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_ip3d
private

Definition at line 103 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by mvaValue().

◆ fMVAVar_ip3dSig

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_ip3dSig
private

Definition at line 104 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by mvaValue().

◆ fMVAVar_isBarrel

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_isBarrel
private

Definition at line 110 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_isEndcap

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_isEndcap
private

Definition at line 111 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_kfchi2

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_kfchi2
private

Definition at line 79 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by bindVariables(), initialize(), and mvaValue().

◆ fMVAVar_kfhits

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_kfhits
private

Definition at line 80 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_kfhitsall

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_kfhitsall
private

Definition at line 81 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by mvaValue().

◆ fMVAVar_NeutralHadronIso_DR0p0To0p1

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_NeutralHadronIso_DR0p0To0p1
private

Definition at line 124 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_NeutralHadronIso_DR0p1To0p2

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_NeutralHadronIso_DR0p1To0p2
private

Definition at line 125 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_NeutralHadronIso_DR0p2To0p3

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_NeutralHadronIso_DR0p2To0p3
private

Definition at line 126 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_NeutralHadronIso_DR0p3To0p4

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_NeutralHadronIso_DR0p3To0p4
private

Definition at line 127 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_NeutralHadronIso_DR0p4To0p5

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_NeutralHadronIso_DR0p4To0p5
private

Definition at line 128 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_OneMinusE1x5E5x5

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_OneMinusE1x5E5x5
private

Definition at line 92 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by bindVariables(), initialize(), and mvaValue().

◆ fMVAVar_phiwidth

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_phiwidth
private

Definition at line 91 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_PreShowerOverRaw

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_PreShowerOverRaw
private

Definition at line 100 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_pt

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_pt
private

Definition at line 108 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_R9

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_R9
private

Definition at line 93 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by bindVariables(), initialize(), and mvaValue().

◆ fMVAVar_rho

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_rho
private

Definition at line 109 of file EGammaMvaEleEstimatorCSA14.h.

◆ fMVAVar_SCeta

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_SCeta
private

Definition at line 112 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_see

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_see
private

Definition at line 88 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fMVAVar_spp

Float_t EGammaMvaEleEstimatorCSA14::fMVAVar_spp
private

Definition at line 89 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by bindVariables(), initialize(), and mvaValue().

◆ fNMVABins

UInt_t EGammaMvaEleEstimatorCSA14::fNMVABins
private

Definition at line 76 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize().

◆ fTMVAMethod

std::vector<TMVA::MethodBase*> EGammaMvaEleEstimatorCSA14::fTMVAMethod
private

Definition at line 71 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

◆ fTMVAReader

std::vector<TMVA::Reader*> EGammaMvaEleEstimatorCSA14::fTMVAReader
private

Definition at line 70 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), mvaValue(), and ~EGammaMvaEleEstimatorCSA14().

◆ fUseBinnedVersion

Bool_t EGammaMvaEleEstimatorCSA14::fUseBinnedVersion
private

Definition at line 75 of file EGammaMvaEleEstimatorCSA14.h.

Referenced by initialize(), and mvaValue().

reco::GsfElectron::deltaEtaSeedClusterTrackAtCalo
float deltaEtaSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:233
EGammaMvaEleEstimatorCSA14::fTMVAReader
std::vector< TMVA::Reader * > fTMVAReader
Definition: EGammaMvaEleEstimatorCSA14.h:70
HLT_FULL_cff.printDebug
printDebug
Definition: HLT_FULL_cff.py:35515
mps_fire.i
i
Definition: mps_fire.py:428
reco::GsfElectron::gsfTrack
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:163
EGammaMvaEleEstimatorCSA14::fMVAVar_isBarrel
Float_t fMVAVar_isBarrel
Definition: EGammaMvaEleEstimatorCSA14.h:110
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:235
edm::isNotFinite
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
edm::Ref::isAvailable
bool isAvailable() const
Definition: Ref.h:537
IPTools::absoluteImpactParameter3D
std::pair< bool, Measurement1D > absoluteImpactParameter3D(const reco::TransientTrack &transientTrack, const reco::Vertex &vertex)
Definition: IPTools.cc:38
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EGammaMvaEleEstimatorCSA14::fisInitialized
Bool_t fisInitialized
Definition: EGammaMvaEleEstimatorCSA14.h:73
EGammaMvaEleEstimatorCSA14::kNonTrigPhys14
Definition: EGammaMvaEleEstimatorCSA14.h:46
EGammaMvaEleEstimatorCSA14::fMVAVar_IoEmIoP
Float_t fMVAVar_IoEmIoP
Definition: EGammaMvaEleEstimatorCSA14.h:97
pat::Electron::gsfTrack
reco::GsfTrackRef gsfTrack() const override
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster
EcalClusterLazyToolsT::e5x5
float e5x5(const reco::BasicCluster &cluster) const
Definition: EcalClusterLazyTools.h:201
EGammaMvaEleEstimatorCSA14::fNMVABins
UInt_t fNMVABins
Definition: EGammaMvaEleEstimatorCSA14.h:76
EGammaMvaEleEstimatorCSA14::initialize
void initialize(std::string methodName, std::string weightsfile, EGammaMvaEleEstimatorCSA14::MVAType type)
Definition: EGammaMvaEleEstimatorCSA14.cc:25
cms::cuda::assert
assert(be >=bs)
EGammaMvaEleEstimatorCSA14::fMVAVar_see
Float_t fMVAVar_see
Definition: EGammaMvaEleEstimatorCSA14.h:88
EGammaMvaEleEstimatorCSA14::fMVAVar_isEndcap
Float_t fMVAVar_isEndcap
Definition: EGammaMvaEleEstimatorCSA14.h:111
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
pat::Electron::closestCtfTrackRef
reco::TrackRef closestCtfTrackRef() const override
override the reco::GsfElectron::closestCtfTrackRef method, to access the internal storage of the trac...
beam_dqm_sourceclient-live_cfg.mva
mva
Definition: beam_dqm_sourceclient-live_cfg.py:124
EGammaMvaEleEstimatorCSA14::fMVAVar_eta
Float_t fMVAVar_eta
Definition: EGammaMvaEleEstimatorCSA14.h:106
reco::GsfElectron::hadronicOverEm
float hadronicOverEm() const
Definition: GsfElectron.h:475
EGammaMvaEleEstimatorCSA14::fMVAVar_kfhitsall
Float_t fMVAVar_kfhitsall
Definition: EGammaMvaEleEstimatorCSA14.h:81
reco::GsfElectron::fbrem
float fbrem() const
Definition: GsfElectron.h:732
EGammaMvaEleEstimatorCSA14::fMVAVar_eleEoPout
Float_t fMVAVar_eleEoPout
Definition: EGammaMvaEleEstimatorCSA14.h:98
EGammaMvaEleEstimatorCSA14::bindVariables
void bindVariables()
Definition: EGammaMvaEleEstimatorCSA14.cc:451
edm::Ref< TrackCollection >
EGammaMvaEleEstimatorCSA14::fMVAVar_EoP
Float_t fMVAVar_EoP
Definition: EGammaMvaEleEstimatorCSA14.h:96
EGammaMvaEleEstimatorCSA14::fMVAVar_kfchi2
Float_t fMVAVar_kfchi2
Definition: EGammaMvaEleEstimatorCSA14.h:79
EGammaMvaEleEstimatorCSA14::fMVAVar_PreShowerOverRaw
Float_t fMVAVar_PreShowerOverRaw
Definition: EGammaMvaEleEstimatorCSA14.h:100
EGammaMvaEleEstimatorCSA14::fMVAVar_etawidth
Float_t fMVAVar_etawidth
Definition: EGammaMvaEleEstimatorCSA14.h:90
EcalClusterLazyToolsT::localCovariances
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
Definition: EcalClusterLazyTools.h:284
EcalClusterLazyToolsT::e3x3
float e3x3(const reco::BasicCluster &cluster) const
Definition: EcalClusterLazyTools.h:195
EcalClusterLazyToolsT::e1x5
float e1x5(const reco::BasicCluster &cluster) const
Definition: EcalClusterLazyTools.h:183
PVValHelper::eta
Definition: PVValidationHelpers.h:70
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
CommonMethods.isnan
def isnan(num)
Definition: CommonMethods.py:98
EGammaMvaEleEstimatorCSA14::GetMVABin
UInt_t GetMVABin(double eta, double pt) const
Definition: EGammaMvaEleEstimatorCSA14.cc:205
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
reco::GsfElectron::full5x5_r9
float full5x5_r9() const
Definition: GsfElectron.h:447
reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:232
EGammaMvaEleEstimatorCSA14::fMVAVar_deta
Float_t fMVAVar_deta
Definition: EGammaMvaEleEstimatorCSA14.h:84
EGammaMvaEleEstimatorCSA14::fMVAVar_d0
Float_t fMVAVar_d0
Definition: EGammaMvaEleEstimatorCSA14.h:102
reco::GsfElectron::full5x5_sigmaIetaIeta
float full5x5_sigmaIetaIeta() const
Definition: GsfElectron.h:442
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
EGammaMvaEleEstimatorCSA14::fMVAVar_ip3d
Float_t fMVAVar_ip3d
Definition: EGammaMvaEleEstimatorCSA14.h:103
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
EGammaMvaEleEstimatorCSA14::fMVAVar_pt
Float_t fMVAVar_pt
Definition: EGammaMvaEleEstimatorCSA14.h:108
electrons_cff.ip3d
ip3d
Definition: electrons_cff.py:357
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
reco::GsfElectron::full5x5_e1x5
float full5x5_e1x5() const
Definition: GsfElectron.h:444
reco::GsfElectron::closestCtfTrackRef
virtual TrackRef closestCtfTrackRef() const
Definition: GsfElectron.h:187
EGammaMvaEleEstimatorCSA14::fMVAVar_abseta
Float_t fMVAVar_abseta
Definition: EGammaMvaEleEstimatorCSA14.h:107
reco::GsfElectron::full5x5_e5x5
float full5x5_e5x5() const
Definition: GsfElectron.h:446
EGammaMvaEleEstimatorCSA14::fMVAVar_kfhits
Float_t fMVAVar_kfhits
Definition: EGammaMvaEleEstimatorCSA14.h:80
EGammaMvaEleEstimatorCSA14::fMVAVar_R9
Float_t fMVAVar_R9
Definition: EGammaMvaEleEstimatorCSA14.h:93
EGammaMvaEleEstimatorCSA14::fMVAType
MVAType fMVAType
Definition: EGammaMvaEleEstimatorCSA14.h:74
readEcalDQMStatus.read
read
Definition: readEcalDQMStatus.py:38
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
EGammaMvaEleEstimatorCSA14::kNonTrig
Definition: EGammaMvaEleEstimatorCSA14.h:45
EGammaMvaEleEstimatorCSA14::fMVAVar_fbrem
Float_t fMVAVar_fbrem
Definition: EGammaMvaEleEstimatorCSA14.h:78
EGammaMvaEleEstimatorCSA14::fMethodname
std::string fMethodname
Definition: EGammaMvaEleEstimatorCSA14.h:72
reco::TransientTrack
Definition: TransientTrack.h:19
pat::Electron::superCluster
reco::SuperClusterRef superCluster() const override
override the reco::GsfElectron::superCluster method, to access the internal storage of the superclust...
reco::GsfElectron::e5x5
float e5x5() const
Definition: GsfElectron.h:422
EGammaMvaEleEstimatorCSA14::fMVAVar_spp
Float_t fMVAVar_spp
Definition: EGammaMvaEleEstimatorCSA14.h:89
Exception
Definition: hltDiff.cc:245
reco::LeafCandidate::p
double p() const final
magnitude of momentum vector
Definition: LeafCandidate.h:123
reco::GsfElectron::eSuperClusterOverP
float eSuperClusterOverP() const
Definition: GsfElectron.h:228
EGammaMvaEleEstimatorCSA14::fMVAVar_OneMinusE1x5E5x5
Float_t fMVAVar_OneMinusE1x5E5x5
Definition: EGammaMvaEleEstimatorCSA14.h:92
reco::GsfElectron::eEleClusterOverPout
float eEleClusterOverPout() const
Definition: GsfElectron.h:231
EGammaMvaEleEstimatorCSA14::fMVAVar_ip3dSig
Float_t fMVAVar_ip3dSig
Definition: EGammaMvaEleEstimatorCSA14.h:104
reco::GsfElectron::superCluster
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:162
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
EGammaMvaEleEstimatorCSA14::fMVAVar_HoE
Float_t fMVAVar_HoE
Definition: EGammaMvaEleEstimatorCSA14.h:95
TransientTrackBuilder::build
reco::TransientTrack build(const reco::Track *p) const
Definition: TransientTrackBuilder.cc:20
EGammaMvaEleEstimatorCSA14::fTMVAMethod
std::vector< TMVA::MethodBase * > fTMVAMethod
Definition: EGammaMvaEleEstimatorCSA14.h:71
edm::isFinite
constexpr bool isFinite(T x)
EGammaMvaEleEstimatorCSA14::fUseBinnedVersion
Bool_t fUseBinnedVersion
Definition: EGammaMvaEleEstimatorCSA14.h:75
EGammaMvaEleEstimatorCSA14::fMVAVar_SCeta
Float_t fMVAVar_SCeta
Definition: EGammaMvaEleEstimatorCSA14.h:112
EGammaMvaEleEstimatorCSA14::fMVAVar_detacalo
Float_t fMVAVar_detacalo
Definition: EGammaMvaEleEstimatorCSA14.h:86
EGammaMvaEleEstimatorCSA14::kTrig
Definition: EGammaMvaEleEstimatorCSA14.h:44
reco::GsfElectron::full5x5_sigmaIphiIphi
float full5x5_sigmaIphiIphi() const
Definition: GsfElectron.h:443
EGammaMvaEleEstimatorCSA14::fMVAVar_phiwidth
Float_t fMVAVar_phiwidth
Definition: EGammaMvaEleEstimatorCSA14.h:91
EGammaMvaEleEstimatorCSA14::fMVAVar_gsfchi2
Float_t fMVAVar_gsfchi2
Definition: EGammaMvaEleEstimatorCSA14.h:82
EGammaMvaEleEstimatorCSA14::fMVAVar_dphi
Float_t fMVAVar_dphi
Definition: EGammaMvaEleEstimatorCSA14.h:85
reco::GsfElectron::ecalEnergy
float ecalEnergy() const
Definition: GsfElectron.h:818