CMS 3D CMS Logo

ElectronMVAEstimatorRun2Spring16HZZ.cc
Go to the documentation of this file.
2 
5 
7 
9 
10 #include "TMath.h"
11 #include "TMVA/MethodBDT.h"
12 
15  tag_(conf.getParameter<std::string>("mvaTag")),
16  MethodName_("BDTG method"),
17  beamSpotLabel_(conf.getParameter<edm::InputTag>("beamSpot")),
18  conversionsLabelAOD_(conf.getParameter<edm::InputTag>("conversionsAOD")),
19  conversionsLabelMiniAOD_(conf.getParameter<edm::InputTag>("conversionsMiniAOD")) {
20 
21  const std::vector <std::string> weightFileNames
22  = conf.getParameter<std::vector<std::string> >("weightFileNames");
23  init(weightFileNames);
24 }
25 
26 void ElectronMVAEstimatorRun2Spring16HZZ::init(const std::vector <std::string> weightFileNames) {
27  if( (int)(weightFileNames.size()) != nCategories )
28  throw cms::Exception("MVA config failure: ")
29  << "wrong number of weightfiles" << std::endl;
30 
31  gbrForest_s.clear();
32  // Create a TMVA reader object for each category
33  for(int i=0; i<nCategories; i++){
34 
35  // Use unique_ptr so that all readers are properly cleaned up
36  // when the vector clear() is called in the destructor
37 
38  edm::FileInPath weightFile( weightFileNames[i] );
39  gbrForest_s.push_back( createSingleReader(i, weightFile ) );
40 
41  }
42 
43 }
44 
47 
50  tag_(mvaTag),
51  MethodName_("BDTG method"),
52  beamSpotLabel_(edm::InputTag(beamspotTag)),
53  conversionsLabelAOD_(edm::InputTag(conversionsTag)),
55  }
56 
57 
58 
61 }
62 
63 
65 
66  // All tokens for event content needed by this MVA
67 
68  // Beam spot (same for AOD and miniAOD)
69  cc.consumes<reco::BeamSpot>(beamSpotLabel_);
70 
71  // Conversions collection (different names in AOD and miniAOD)
74 
75 
76 }
77 
79 mvaValue( const edm::Ptr<reco::Candidate>& particle, const edm::Event& iEvent) const {
80 
81  const int iCategory = findCategory( particle );
82  const std::vector<float> vars = std::move( fillMVAVariables( particle, iEvent ) );
83  return mvaValue(iCategory, vars);
84 }
85 
87 mvaValue( const reco::GsfElectron * particle, const edm::EventBase & iEvent) const {
90  iEvent.getByLabel(conversionsLabelAOD_, conversions);
91  iEvent.getByLabel(beamSpotLabel_, beamSpot);
92  const int iCategory = findCategory( particle );
93  const std::vector<float> vars = std::move( fillMVAVariables( particle, conversions, beamSpot.product() ) );
94  return mvaValue(iCategory, vars);
95 }
96 
98 mvaValue( const int iCategory, const std::vector<float> & vars) const {
99  const float result = gbrForest_s.at(iCategory)->GetClassifier(vars.data());
100 
101  const bool debug = false;
102  if(debug) {
103  std::cout << " *** Inside the class MethodName_ " << MethodName_ << std::endl;
104  std::cout << " bin " << iCategory
105  << " fbrem " << vars[11]
106  << " kfchi2 " << vars[9]
107  << " mykfhits " << vars[8]
108  << " gsfchi2 " << vars[10]
109  << " deta " << vars[18]
110  << " dphi " << vars[19]
111  << " detacalo " << vars[20]
112  << " see " << vars[0]
113  << " spp " << vars[1]
114  << " etawidth " << vars[4]
115  << " phiwidth " << vars[5]
116  << " OneMinusE1x5E5x5 " << vars[2]
117  << " R9 " << vars[3]
118  << " HoE " << vars[6]
119  << " EoP " << vars[15]
120  << " IoEmIoP " << vars[17]
121  << " eleEoPout " << vars[16]
122  << " eta " << vars[24]
123  << " pt " << vars[21] << std::endl;
124  std::cout << " ### MVA " << result << std::endl;
125  }
126 
127  return result;
128 }
129 
131 
132  // Try to cast the particle into a reco particle.
133  // This should work for both reco and pat.
134  const edm::Ptr<reco::GsfElectron> eleRecoPtr = ( edm::Ptr<reco::GsfElectron> )particle;
135  if( eleRecoPtr.get() == NULL )
136  throw cms::Exception("MVA failure: ")
137  << " given particle is expected to be reco::GsfElectron or pat::Electron," << std::endl
138  << " but appears to be neither" << std::endl;
139  return findCategory(eleRecoPtr.get());
140 }
141 
143  float pt = eleRecoPtr->pt();
144  float eta = eleRecoPtr->superCluster()->eta();
145 
146  //
147  // Determine the category
148  //
149  int iCategory = UNDEFINED;
150  const float ptSplit = 10; // we have above and below 10 GeV categories
151  const float ebSplit = 0.800;// barrel is split into two regions
152  const float ebeeSplit = 1.479; // division between barrel and endcap
153 
154  if (pt < ptSplit && std::abs(eta) < ebSplit)
155  iCategory = CAT_EB1_PT5to10;
156 
157  if (pt < ptSplit && std::abs(eta) >= ebSplit && std::abs(eta) < ebeeSplit)
158  iCategory = CAT_EB2_PT5to10;
159 
160  if (pt < ptSplit && std::abs(eta) >= ebeeSplit)
161  iCategory = CAT_EE_PT5to10;
162 
163  if (pt >= ptSplit && std::abs(eta) < ebSplit)
164  iCategory = CAT_EB1_PT10plus;
165 
166  if (pt >= ptSplit && std::abs(eta) >= ebSplit && std::abs(eta) < ebeeSplit)
167  iCategory = CAT_EB2_PT10plus;
168 
169  if (pt >= ptSplit && std::abs(eta) >= ebeeSplit)
170  iCategory = CAT_EE_PT10plus;
171 
172  return iCategory;
173 }
174 
177 
178  bool isEndcap = false;
179  if( category == CAT_EE_PT5to10 || category == CAT_EE_PT10plus )
180  isEndcap = true;
181 
182  return isEndcap;
183 }
184 
185 
186 std::unique_ptr<const GBRForest> ElectronMVAEstimatorRun2Spring16HZZ::
187 createSingleReader(const int iCategory, const edm::FileInPath &weightFile){
188 
189  //
190  // Create the reader
191  //
192  TMVA::Reader tmpTMVAReader( "!Color:Silent:!Error" );
193 
194  //
195  // Configure all variables and spectators. Note: the order and names
196  // must match what is found in the xml weights file!
197  //
198 
199 
200  // Pure ECAL -> shower shapes
201  tmpTMVAReader.AddVariable("ele_oldsigmaietaieta", &allMVAVars_.see);
202  tmpTMVAReader.AddVariable("ele_oldsigmaiphiiphi", &allMVAVars_.spp);
203  tmpTMVAReader.AddVariable("ele_oldcircularity", &allMVAVars_.OneMinusE1x5E5x5);
204  tmpTMVAReader.AddVariable("ele_oldr9", &allMVAVars_.R9);
205  tmpTMVAReader.AddVariable("ele_scletawidth", &allMVAVars_.etawidth);
206  tmpTMVAReader.AddVariable("ele_sclphiwidth", &allMVAVars_.phiwidth);
207  tmpTMVAReader.AddVariable("ele_oldhe", &allMVAVars_.HoE);
208 
209  //Pure tracking variables
210  tmpTMVAReader.AddVariable("ele_kfhits", &allMVAVars_.kfhits);
211  tmpTMVAReader.AddVariable("ele_kfchi2", &allMVAVars_.kfchi2);
212  tmpTMVAReader.AddVariable("ele_gsfchi2", &allMVAVars_.gsfchi2);
213 
214  // Energy matching
215  tmpTMVAReader.AddVariable("ele_fbrem", &allMVAVars_.fbrem);
216 
217  tmpTMVAReader.AddVariable("ele_gsfhits", &allMVAVars_.gsfhits);
218  tmpTMVAReader.AddVariable("ele_expected_inner_hits", &allMVAVars_.expectedMissingInnerHits);
219  tmpTMVAReader.AddVariable("ele_conversionVertexFitProbability", &allMVAVars_.convVtxFitProbability);
220 
221  tmpTMVAReader.AddVariable("ele_ep", &allMVAVars_.EoP);
222  tmpTMVAReader.AddVariable("ele_eelepout", &allMVAVars_.eleEoPout);
223  tmpTMVAReader.AddVariable("ele_IoEmIop", &allMVAVars_.IoEmIoP);
224 
225  // Geometrical matchings
226  tmpTMVAReader.AddVariable("ele_deltaetain", &allMVAVars_.deta);
227  tmpTMVAReader.AddVariable("ele_deltaphiin", &allMVAVars_.dphi);
228  tmpTMVAReader.AddVariable("ele_deltaetaseed", &allMVAVars_.detacalo);
229 
230  // Endcap only variables
231  if( isEndcapCategory(iCategory) )
232  tmpTMVAReader.AddVariable("ele_psEoverEraw", &allMVAVars_.PreShowerOverRaw);
233 
234 
235  // Spectator variables
236  tmpTMVAReader.AddSpectator("ele_pt", &allMVAVars_.pt);
237  tmpTMVAReader.AddSpectator("ele_isEE", &allMVAVars_.isBarrel);
238  tmpTMVAReader.AddSpectator("ele_isEB", &allMVAVars_.isEndcap);
239  tmpTMVAReader.AddSpectator("ele_isEBEtaGap", &allMVAVars_.isEndcap);
240  tmpTMVAReader.AddSpectator("ele_isEBPhiGap", &allMVAVars_.isEndcap);
241  tmpTMVAReader.AddSpectator("ele_isEBEEGap", &allMVAVars_.isEndcap);
242  tmpTMVAReader.AddSpectator("ele_isEERingGap", &allMVAVars_.isEndcap);
243  tmpTMVAReader.AddSpectator("ele_isEEDeeGap", &allMVAVars_.isEndcap);
244  tmpTMVAReader.AddSpectator("ele_isEE", &allMVAVars_.SCeta);
245  tmpTMVAReader.AddSpectator("scl_eta", &allMVAVars_.SCeta);
246  tmpTMVAReader.AddSpectator("ele_eClass", &allMVAVars_.eClass);
247  tmpTMVAReader.AddSpectator("mc_ele_matchedFromCB", &allMVAVars_.mcCBmatchingCategory);
248 
249  //
250  // Book the method and set up the weights file
251  //
252  tmpTMVAReader.BookMVA(MethodName_ , weightFile.fullPath());
253 
254  return std::unique_ptr<const GBRForest> ( new GBRForest( dynamic_cast<TMVA::MethodBDT*>( tmpTMVAReader.FindMVA(MethodName_) ) ) );
255 }
256 
257 // A function that should work on both pat and reco objects
258 std::vector<float> ElectronMVAEstimatorRun2Spring16HZZ::
260  const edm::Event& iEvent ) const {
261 
262  //
263  // Declare all value maps corresponding to the products we defined earlier
264  //
265  edm::Handle<reco::BeamSpot> theBeamSpot;
267 
268  // Get data needed for conversion rejection
269  iEvent.getByLabel(beamSpotLabel_, theBeamSpot);
270 
271  // Conversions in miniAOD and AOD have different names,
272  // but the same type, so we use the same handle with different tokens.
273  iEvent.getByLabel(conversionsLabelAOD_, conversions);
274  if( !conversions.isValid() )
275  iEvent.getByLabel(conversionsLabelMiniAOD_, conversions);
276 
277  // Make sure everything is retrieved successfully
278  if(! (theBeamSpot.isValid()
279  && conversions.isValid() )
280  )
281  throw cms::Exception("MVA failure: ")
282  << "Failed to retrieve event content needed for this MVA"
283  << std::endl
284  << "Check python MVA configuration file."
285  << std::endl;
286 
287  // Try to cast the particle into a reco particle.
288  // This should work for both reco and pat.
289  const edm::Ptr<reco::GsfElectron> eleRecoPtr = ( edm::Ptr<reco::GsfElectron> )particle;
290  if( eleRecoPtr.get() == NULL )
291  throw cms::Exception("MVA failure: ")
292  << " given particle is expected to be reco::GsfElectron or pat::Electron," << std::endl
293  << " but appears to be neither" << std::endl;
294  return fillMVAVariables(eleRecoPtr.get(), conversions, theBeamSpot.product());
295 }
296 
297 // A function that should work on both pat and reco objects
298 std::vector<float> ElectronMVAEstimatorRun2Spring16HZZ::
300  const edm::Handle<reco::ConversionCollection> conversions, const reco::BeamSpot *theBeamSpot ) const {
301 
302 
303  // Both pat and reco particles have exactly the same accessors, so we use a reco ptr
304  // throughout the code, with a single exception as of this writing, handled separately below.
305  auto superCluster = eleRecoPtr->superCluster();
306 
307  AllVariables allMVAVars;
308 
309  // Pure ECAL -> shower shapes
310  allMVAVars.see = eleRecoPtr->full5x5_sigmaIetaIeta();
311  allMVAVars.spp = eleRecoPtr->full5x5_sigmaIphiIphi();
312  allMVAVars.OneMinusE1x5E5x5 = 1. - eleRecoPtr->full5x5_e1x5() / eleRecoPtr->full5x5_e5x5();
313  allMVAVars.R9 = eleRecoPtr->full5x5_r9();
314  allMVAVars.etawidth = superCluster->etaWidth();
315  allMVAVars.phiwidth = superCluster->phiWidth();
316  allMVAVars.HoE = eleRecoPtr->full5x5_hcalOverEcal(); //hadronicOverEm();
317  // Endcap only variables
318  allMVAVars.PreShowerOverRaw = superCluster->preshowerEnergy() / superCluster->rawEnergy();
319 
320  // To get to CTF track information in pat::Electron, we have to have the pointer
321  // to pat::Electron, it is not accessible from the pointer to reco::GsfElectron.
322  // This behavior is reported and is expected to change in the future (post-7.4.5 some time).
323  bool validKF= false;
324  reco::TrackRef myTrackRef = eleRecoPtr->closestCtfTrackRef();
325  const pat::Electron * elePatPtr = dynamic_cast<const pat::Electron *>(eleRecoPtr);
326  // Check if this is really a pat::Electron, and if yes, get the track ref from this new
327  // pointer instead
328  if( elePatPtr != NULL )
329  myTrackRef = elePatPtr->closestCtfTrackRef();
330  validKF = (myTrackRef.isAvailable() && (myTrackRef.isNonnull()) );
331 
332  //Pure tracking variables
333  allMVAVars.kfhits = (validKF) ? myTrackRef->hitPattern().trackerLayersWithMeasurement() : -1. ;
334  allMVAVars.kfchi2 = (validKF) ? myTrackRef->normalizedChi2() : 0;
335  allMVAVars.gsfchi2 = eleRecoPtr->gsfTrack()->normalizedChi2();
336 
337  // Energy matching
338  allMVAVars.fbrem = eleRecoPtr->fbrem();
339 
340  allMVAVars.gsfhits = eleRecoPtr->gsfTrack()->hitPattern().trackerLayersWithMeasurement();
341  allMVAVars.expectedMissingInnerHits = eleRecoPtr->gsfTrack()
342  ->hitPattern().numberOfHits(reco::HitPattern::MISSING_INNER_HITS);
343 
345  conversions,
346  theBeamSpot->position());
347  double vertexFitProbability = -1.;
348  if(!conv_ref.isNull()) {
349  const reco::Vertex &vtx = conv_ref.get()->conversionVertex(); if (vtx.isValid()) {
350  vertexFitProbability = TMath::Prob( vtx.chi2(), vtx.ndof());
351  }
352  }
353  allMVAVars.convVtxFitProbability = vertexFitProbability;
354 
355  allMVAVars.EoP = eleRecoPtr->eSuperClusterOverP();
356  allMVAVars.eleEoPout = eleRecoPtr->eEleClusterOverPout();
357  float pAtVertex = eleRecoPtr->trackMomentumAtVtx().R();
358  allMVAVars.IoEmIoP = (1.0/eleRecoPtr->ecalEnergy()) - (1.0 / pAtVertex );
359 
360  // Geometrical matchings
361  allMVAVars.deta = eleRecoPtr->deltaEtaSuperClusterTrackAtVtx();
362  allMVAVars.dphi = eleRecoPtr->deltaPhiSuperClusterTrackAtVtx();
363  allMVAVars.detacalo = eleRecoPtr->deltaEtaSeedClusterTrackAtCalo();
364 
365  // Spectator variables
366  allMVAVars.pt = eleRecoPtr->pt();
367  float scEta = superCluster->eta();
368  constexpr float ebeeSplit = 1.479;
369  allMVAVars.isBarrel = ( std::abs(scEta) < ebeeSplit );
370  allMVAVars.isEndcap = ( std::abs(scEta) >= ebeeSplit );
371  allMVAVars.SCeta = scEta;
372  // The spectator variables below were examined for training, but
373  // are not necessary for evaluating the discriminator, so they are
374  // given dummy values (the specator variables above are also unimportant).
375  // They are introduced only to match the definition of the discriminator
376  // in the weights file.
377  constexpr unsigned nines = 999;
378  allMVAVars.eClass = nines;
379  allMVAVars.pfRelIso = nines;
380  allMVAVars.expectedInnerHits = nines;
381  allMVAVars.vtxconv = nines;
382  allMVAVars.mcEventWeight = nines;
383  allMVAVars.mcCBmatchingCategory = nines;
384 
385  constrainMVAVariables(allMVAVars);
386 
387  std::vector<float> vars;
388 
389  if( isEndcapCategory( findCategory( eleRecoPtr ) ) ) {
390  vars = std::move( packMVAVariables(allMVAVars.see,
391  allMVAVars.spp,
392  allMVAVars.OneMinusE1x5E5x5,
393  allMVAVars.R9,
394  allMVAVars.etawidth,
395  allMVAVars.phiwidth,
396  allMVAVars.HoE,
397  //Pure tracking variables
398  allMVAVars.kfhits,
399  allMVAVars.kfchi2,
400  allMVAVars.gsfchi2,
401  // Energy matching
402  allMVAVars.fbrem,
403  allMVAVars.gsfhits,
404  allMVAVars.expectedMissingInnerHits,
405  allMVAVars.convVtxFitProbability,
406  allMVAVars.EoP,
407  allMVAVars.eleEoPout,
408  allMVAVars.IoEmIoP,
409  // Geometrical matchings
410  allMVAVars.deta,
411  allMVAVars.dphi,
412  allMVAVars.detacalo,
413  // Endcap only variables
414  allMVAVars.PreShowerOverRaw,
415 
416  // Spectator variables
417  allMVAVars.pt,
418  allMVAVars.isBarrel,
419  allMVAVars.isEndcap,
420  allMVAVars.SCeta,
421  allMVAVars.eClass,
422  allMVAVars.pfRelIso,
423  allMVAVars.expectedInnerHits,
424  allMVAVars.vtxconv,
425  allMVAVars.mcEventWeight,
426  allMVAVars.mcCBmatchingCategory)
427  );
428  } else {
429  vars = std::move( packMVAVariables(allMVAVars.see,
430  allMVAVars.spp,
431  allMVAVars.OneMinusE1x5E5x5,
432  allMVAVars.R9,
433  allMVAVars.etawidth,
434  allMVAVars.phiwidth,
435  allMVAVars.HoE,
436  //Pure tracking variables
437  allMVAVars.kfhits,
438  allMVAVars.kfchi2,
439  allMVAVars.gsfchi2,
440  // Energy matching
441  allMVAVars.fbrem,
442  allMVAVars.gsfhits,
443  allMVAVars.expectedMissingInnerHits,
444  allMVAVars.convVtxFitProbability,
445  allMVAVars.EoP,
446  allMVAVars.eleEoPout,
447  allMVAVars.IoEmIoP,
448  // Geometrical matchings
449  allMVAVars.deta,
450  allMVAVars.dphi,
451  allMVAVars.detacalo,
452  // Spectator variables
453  allMVAVars.pt,
454  allMVAVars.isBarrel,
455  allMVAVars.isEndcap,
456  allMVAVars.SCeta,
457  allMVAVars.eClass,
458  allMVAVars.pfRelIso,
459  allMVAVars.expectedInnerHits,
460  allMVAVars.vtxconv,
461  allMVAVars.mcEventWeight,
462  allMVAVars.mcCBmatchingCategory)
463  );
464  }
465  return vars;
466 }
467 
469 
470  // Check that variables do not have crazy values
471 
472  if(allMVAVars.fbrem < -1.)
473  allMVAVars.fbrem = -1.;
474 
475  allMVAVars.deta = fabs(allMVAVars.deta);
476  if(allMVAVars.deta > 0.06)
477  allMVAVars.deta = 0.06;
478 
479 
480  allMVAVars.dphi = fabs(allMVAVars.dphi);
481  if(allMVAVars.dphi > 0.6)
482  allMVAVars.dphi = 0.6;
483 
484 
485  if(allMVAVars.EoP > 20.)
486  allMVAVars.EoP = 20.;
487 
488  if(allMVAVars.eleEoPout > 20.)
489  allMVAVars.eleEoPout = 20.;
490 
491 
492  allMVAVars.detacalo = fabs(allMVAVars.detacalo);
493  if(allMVAVars.detacalo > 0.2)
494  allMVAVars.detacalo = 0.2;
495 
496  if(allMVAVars.OneMinusE1x5E5x5 < -1.)
497  allMVAVars.OneMinusE1x5E5x5 = -1;
498 
499  if(allMVAVars.OneMinusE1x5E5x5 > 2.)
500  allMVAVars.OneMinusE1x5E5x5 = 2.;
501 
502 
503 
504  if(allMVAVars.R9 > 5)
505  allMVAVars.R9 = 5;
506 
507  if(allMVAVars.gsfchi2 > 200.)
508  allMVAVars.gsfchi2 = 200;
509 
510 
511  if(allMVAVars.kfchi2 > 10.)
512  allMVAVars.kfchi2 = 10.;
513 
514 
515 }
516 
bool isAvailable() const
Definition: Ref.h:576
T getParameter(std::string const &) const
virtual double pt() const final
transverse momentum
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
std::vector< std::unique_ptr< const GBRForest > > gbrForest_s
float eSuperClusterOverP() const
Definition: GsfElectron.h:245
float full5x5_e5x5() const
Definition: GsfElectron.h:459
float full5x5_e1x5() const
Definition: GsfElectron.h:457
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:160
bool isValid() const
Tells whether the vertex is valid.
Definition: Vertex.h:68
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:291
float full5x5_sigmaIphiIphi() const
Definition: GsfElectron.h:456
#define NULL
Definition: scimark2.h:8
float fbrem() const
Definition: GsfElectron.h:750
std::unique_ptr< const GBRForest > createSingleReader(const int iCategory, const edm::FileInPath &weightFile)
#define constexpr
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
TrackRef closestCtfTrackRef() const
Definition: GsfElectron.h:201
float full5x5_sigmaIetaIeta() const
Definition: GsfElectron.h:455
std::vector< float > packMVAVariables(const Args...args) const
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:249
int iEvent
Definition: GenABIO.cc:230
reco::TrackRef closestCtfTrackRef() const
override the reco::GsfElectron::closestCtfTrackRef method, to access the internal storage of the trac...
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:184
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:252
void setConsumes(edm::ConsumesCollector &&) const override final
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double chi2() const
chi-squares
Definition: Vertex.h:98
float eEleClusterOverPout() const
Definition: GsfElectron.h:248
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:244
std::vector< float > fillMVAVariables(const edm::Ptr< reco::Candidate > &particle, const edm::Event &) const override
bool isValid() const
Definition: HandleBase.h:74
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:416
bool isEndcap(GeomDetEnumerators::SubDetector m)
bool isNull() const
Checks for null.
Definition: Ref.h:249
double ndof() const
Definition: Vertex.h:105
float mvaValue(const edm::Ptr< reco::Candidate > &particle, const edm::Event &) const override
#define debug
Definition: HDRShower.cc:19
T const * product() const
Definition: Handle.h:81
float full5x5_hcalOverEcal() const
Definition: GsfElectron.h:463
Analysis-level electron class.
Definition: Electron.h:52
float ecalEnergy() const
Definition: GsfElectron.h:837
float full5x5_r9() const
Definition: GsfElectron.h:460
float deltaEtaSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:250
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:94
HLT enums.
int findCategory(const edm::Ptr< reco::Candidate > &particle) const override
void init(const std::vector< std::string > weightFileNames)
const Point & position() const
position
Definition: BeamSpot.h:62
std::string fullPath() const
Definition: FileInPath.cc:184
static reco::ConversionRef matchedConversion(const reco::GsfElectron &ele, const edm::Handle< reco::ConversionCollection > &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
def move(src, dest)
Definition: eostools.py:510
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:185