CMS 3D CMS Logo

ElectronMVAEstimatorRun2Fall17.cc
Go to the documentation of this file.
2 
5  tag_(conf.getParameter<std::string>("mvaTag")),
6  name_(conf.getParameter<std::string>("mvaName")),
7  methodName_("BDTG method"),
8  beamSpotLabel_ (conf.getParameter<edm::InputTag> ("beamSpot")),
9  conversionsLabelAOD_ (conf.getParameter<edm::InputTag> ("conversionsAOD")),
10  conversionsLabelMiniAOD_(conf.getParameter<edm::InputTag> ("conversionsMiniAOD")),
11  rhoLabel_ (edm::InputTag ("fixedGridRhoFastjetAll")),
12  ptSplit_ (conf.getParameter<double> ("ptSplit")),
13  ebSplit_ (conf.getParameter<double> ("ebSplit")),
14  ebeeSplit_ (conf.getParameter<double> ("ebeeSplit")),
15  varNames_ (conf.getParameter<std::vector<std::string>>("varNames")),
16  absTrackClusterMatching_(tag_ == "V2")
17 {
18 
19  const std::vector <std::string> weightFileNames
20  = conf.getParameter<std::vector<std::string> >("weightFileNames");
21 
22  std::vector<double> clipsLowerValues = conf.getParameter<std::vector<double>>("clipLower");
23  std::vector<double> clipsUpperValues = conf.getParameter<std::vector<double>>("clipUpper");
24 
25  // Initialize GBRForests and and clipping instructions
26  init(weightFileNames);
27  setClips(clipsLowerValues, clipsUpperValues);
28 
29  withIso_ = withIso;
30  debug_ = conf.getUntrackedParameter<bool>("debug", false);
31 
32 }
33 
35  const std::string &mvaTag, const std::string &mvaName, bool withIso, const std::string &conversionsTag, const std::string &beamspotTag,
36  const double ptSplit, const double ebSplit, const double ebeeSplit, const bool debug):
38  tag_ (mvaTag),
39  name_ (mvaName),
40  methodName_ ("BDTG method"),
41  beamSpotLabel_ (edm::InputTag(beamspotTag)),
42  conversionsLabelAOD_ (edm::InputTag(conversionsTag)),
44  rhoLabel_ (edm::InputTag("fixedGridRhoFastjetAll")),
45  ptSplit_ (ptSplit),
46  ebSplit_ (ebSplit),
47  ebeeSplit_ (ebeeSplit),
49 {
50 
51  // Set if this is the ID with or without PF isolations
52  withIso_ = withIso;
53 
54  // Set debug flag
55  debug_ = debug;
56 
57 }
58 
59 void ElectronMVAEstimatorRun2Fall17::init(const std::vector<std::string> &weightFileNames) {
60 
61  // Initialize GBRForests
62  if( (int)(weightFileNames.size()) != nCategories_ )
63  throw cms::Exception("MVA config failure: ")
64  << "wrong number of weightfiles" << std::endl;
65 
66  gbrForests_.clear();
67  // Create a TMVA reader object for each category
68  for(int i=0; i<nCategories_; i++){
69 
70  // Use unique_ptr so that all readers are properly cleaned up
71  // when the vector clear() is called in the destructor
72 
73  edm::FileInPath weightFile( weightFileNames[i] );
74  gbrForests_.push_back( GBRForestTools::createGBRForest( weightFile ) );
75 
76  }
77 
78 }
79 
80 void ElectronMVAEstimatorRun2Fall17::setClips(const std::vector<double> &clipsLowerValues, const std::vector<double> &clipsUpperValues) {
81 
82  // Set up the variable clipping intructions
83  unsigned int i = 0;
84  for(auto const& value: clipsLowerValues) {
85  if (edm::isFinite(value)) {
86  Clip clip = {i, false, (float)value};
87  clipsLower_.push_back(clip);
88  }
89  ++i;
90  }
91 
92  i = 0;
93  for(auto const& value: clipsUpperValues) {
94  if (edm::isFinite(value)) {
95  Clip clip = {i, true, (float)value};
96  clipsUpper_.push_back(clip);
97  }
98  ++i;
99  }
100 
101 }
102 
105 }
106 
108 
109  // All tokens for event content needed by this MVA
110 
111  // Beam spot (same for AOD and miniAOD)
112  cc.consumes<reco::BeamSpot>(beamSpotLabel_);
113  // Conversions collection (different names in AOD and miniAOD)
116  // Event-by-event pileup estimate rho
117  cc.consumes<double>(rhoLabel_);
118 
120  //beamSpotToken_ = cc.consumes<reco::BeamSpot>(beamSpotLabel_);
122  //conversionsTokenAOD_ = cc.mayConsume<reco::ConversionCollection>(conversionsLabelAOD_);
123  //conversionsTokenMiniAOD_ = cc.mayConsume<reco::ConversionCollection>(conversionsLabelMiniAOD_);
125  //rhoToken_ = cc.consumes<double>(rhoLabel_);
126 
127 }
128 
130 mvaValue( const edm::Ptr<reco::Candidate>& particle, const edm::Event& iEvent) const {
131  // Try to cast the particle into a reco particle.
132  // This should work for both reco and pat.
133  const edm::Ptr<reco::GsfElectron> eleRecoPtr = ( edm::Ptr<reco::GsfElectron> )particle;
134  if( eleRecoPtr.get() == nullptr ) {
135  throw cms::Exception("MVA failure: ")
136  << " given particle is expected to be reco::GsfElectron or pat::Electron," << std::endl
137  << " but appears to be neither" << std::endl;
138  }
139 
140  const int iCategory = findCategory( eleRecoPtr.get() );
141  const std::vector<float> vars = fillMVAVariables( particle, iEvent );
142  return mvaValue(iCategory, vars);
143 }
144 
146 mvaValue( const reco::GsfElectron * particle, const edm::EventBase & iEvent) const {
150  iEvent.getByLabel(conversionsLabelAOD_, conversions);
151  iEvent.getByLabel(beamSpotLabel_, beamSpot);
152  iEvent.getByLabel(rhoLabel_, rho);
153  const int iCategory = findCategory( particle );
154  const std::vector<float> vars = fillMVAVariables( particle, conversions, beamSpot.product(), rho );
155  return mvaValue(iCategory, vars);
156 }
157 
159 mvaValue( const int iCategory, const std::vector<float> & vars) const {
160  const float result = gbrForests_.at(iCategory)->GetResponse(vars.data()); // The BDT score
161 
162  if(debug_) {
163  std::cout << " *** Inside the class methodName_ " << methodName_ << std::endl;
164  std::cout << " bin " << iCategory << std::endl
165  << " see " << vars[0] << std::endl
166  << " spp " << vars[1] << std::endl
167  << " circularity " << vars[2] << std::endl
168  << " r9 " << vars[3] << std::endl
169  << " etawidth " << vars[4] << std::endl
170  << " phiwidth " << vars[5] << std::endl
171  << " hoe " << vars[6] << std::endl
172  << " kfhits " << vars[7] << std::endl
173  << " kfchi2 " << vars[8] << std::endl
174  << " gsfchi2 " << vars[9] << std::endl
175  << " fbrem " << vars[10] << std::endl
176  << " gsfhits " << vars[11] << std::endl
177  << " expectedMissingInnerHits " << vars[12] << std::endl
178  << " convVtxFitProbability " << vars[13] << std::endl
179  << " eop " << vars[14] << std::endl
180  << " eleeopout " << vars[15] << std::endl
181  << " oneOverEminusOneOverP " << vars[16] << std::endl
182  << " deta " << vars[17] << std::endl
183  << " dphi " << vars[18] << std::endl
184  << " detacalo " << vars[19] << std::endl;
185  if (withIso_) {
186  std::cout << " ele_pfPhotonIso " << vars[20] << std::endl
187  << " ele_pfChargedHadIso " << vars[21] << std::endl
188  << " ele_pfNeutralHadIso " << vars[22] << std::endl
189  << " rho " << vars[23] << std::endl
190  << " preShowerOverRaw " << vars[24] << std::endl;
191  }
192  else {
193  std::cout << " rho " << vars[20] << std::endl
194  << " preShowerOverRaw " << vars[21] << std::endl;
195  }
196  std::cout << " ### MVA " << result << std::endl << std::endl;
197  }
198 
199  return result;
200 }
201 
203 
204  // Try to cast the particle into a reco particle.
205  // This should work for both reco and pat.
206  const edm::Ptr<reco::GsfElectron> eleRecoPtr = ( edm::Ptr<reco::GsfElectron> )particle;
207  if( eleRecoPtr.get() == nullptr ) {
208  throw cms::Exception("MVA failure: ")
209  << " given particle is expected to be reco::GsfElectron or pat::Electron," << std::endl
210  << " but appears to be neither" << std::endl;
211  }
212  return findCategory(eleRecoPtr.get());
213 }
214 
216  float pt = eleRecoPtr->pt();
217  float eta = eleRecoPtr->superCluster()->eta();
218  float absEta = std::abs(eta);
219 
220  //
221  // Determine the category
222  //
223  int iCategory = UNDEFINED;
224 
225  if (pt < ptSplit_ && absEta < ebSplit_) {
226  iCategory = CAT_EB1_PTLow;
227  }
228 
229  else if (pt < ptSplit_ && absEta >= ebSplit_ && absEta < ebeeSplit_) {
230  iCategory = CAT_EB2_PTLow;
231  }
232 
233  else if (pt < ptSplit_ && absEta >= ebeeSplit_) {
234  iCategory = CAT_EE_PTLow;
235  }
236 
237  else if (pt >= ptSplit_ && absEta < ebSplit_) {
238  iCategory = CAT_EB1_PTHig;
239  }
240 
241  else if (pt >= ptSplit_ && absEta >= ebSplit_ && absEta < ebeeSplit_) {
242  iCategory = CAT_EB2_PTHig;
243  }
244 
245  else if (pt >= ptSplit_ && absEta >= ebeeSplit_) {
246  iCategory = CAT_EE_PTHig;
247  }
248 
249  return iCategory;
250 }
251 
252 // A function that should work on both pat and reco objects
253 std::vector<float> ElectronMVAEstimatorRun2Fall17::
255 
256  //
257  // Declare all value maps corresponding to the products we defined earlier
258  //
259  edm::Handle<double> theRho;
260  edm::Handle<reco::BeamSpot> theBeamSpot;
262 
263  iEvent.getByLabel(rhoLabel_, theRho);
264 
265  // Get data needed for conversion rejection
266  iEvent.getByLabel(beamSpotLabel_, theBeamSpot);
267 
268  // Conversions in miniAOD and AOD have different names,
269  // but the same type, so we use the same handle with different tokens.
270  iEvent.getByLabel(conversionsLabelAOD_, conversions);
271  if( !conversions.isValid() ) {
272  iEvent.getByLabel(conversionsLabelMiniAOD_, conversions);
273  }
274 
275  // Make sure everything is retrieved successfully
276  if(! (theBeamSpot.isValid()
277  && conversions.isValid() )
278  ) {
279  throw cms::Exception("MVA failure: ")
280  << "Failed to retrieve event content needed for this MVA"
281  << std::endl
282  << "Check python MVA configuration file."
283  << std::endl;
284  }
285 
286  // Try to cast the particle into a reco particle.
287  // This should work for both reco and pat.
288  const edm::Ptr<reco::GsfElectron> eleRecoPtr = ( edm::Ptr<reco::GsfElectron> )particle;
289  if( eleRecoPtr.get() == nullptr ) {
290  throw cms::Exception("MVA failure: ")
291  << " given particle is expected to be reco::GsfElectron or pat::Electron," << std::endl
292  << " but appears to be neither" << std::endl;
293  }
294 
295  return fillMVAVariables(eleRecoPtr.get(), conversions, theBeamSpot.product(), theRho);
296 }
297 
298 // A function that should work on both pat and reco objects
299 std::vector<float> ElectronMVAEstimatorRun2Fall17::
301 
302  const int iCategory = findCategory( eleRecoPtr );
303 
304  // Both pat and reco particles have exactly the same accessors, so we use a reco ptr
305  // throughout the code, with a single exception as of this writing, handled separately below.
306  auto superCluster = eleRecoPtr->superCluster();
307 
308  // Pure ECAL -> shower shapes
309  float see = eleRecoPtr->full5x5_sigmaIetaIeta();
310  float spp = eleRecoPtr->full5x5_sigmaIphiIphi();
311  float circularity = 1. - eleRecoPtr->full5x5_e1x5() / eleRecoPtr->full5x5_e5x5();
312  float r9 = eleRecoPtr->full5x5_r9();
313  float etawidth = superCluster->etaWidth();
314  float phiwidth = superCluster->phiWidth();
315  float hoe = eleRecoPtr->full5x5_hcalOverEcal(); //hadronicOverEm();
316  // Endcap only variables
317  float preShowerOverRaw = superCluster->preshowerEnergy() / superCluster->rawEnergy();
318 
319  // To get to CTF track information in pat::Electron, we have to have the pointer
320  // to pat::Electron, it is not accessible from the pointer to reco::GsfElectron.
321  // This behavior is reported and is expected to change in the future (post-7.4.5 some time).
322  bool validKF= false;
323  reco::TrackRef myTrackRef = eleRecoPtr->closestCtfTrackRef();
324  const pat::Electron * elePatPtr = dynamic_cast<const pat::Electron *>(eleRecoPtr);
325  // Check if this is really a pat::Electron, and if yes, get the track ref from this new
326  // pointer instead
327  if( elePatPtr != nullptr ) {
328  myTrackRef = elePatPtr->closestCtfTrackRef();
329  }
330  validKF = (myTrackRef.isAvailable() && (myTrackRef.isNonnull()) );
331 
332  //Pure tracking variables
333  float kfhits = (validKF) ? myTrackRef->hitPattern().trackerLayersWithMeasurement() : -1. ;
334  float kfchi2 = (validKF) ? myTrackRef->normalizedChi2() : 0;
335  float gsfchi2 = eleRecoPtr->gsfTrack()->normalizedChi2();
336 
337  // Energy matching
338  float fbrem = eleRecoPtr->fbrem();
339 
340  float gsfhits = eleRecoPtr->gsfTrack()->hitPattern().trackerLayersWithMeasurement();
341  float expectedMissingInnerHits = eleRecoPtr->gsfTrack()
342  ->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
343 
345  conversions,
346  theBeamSpot->position());
347  float convVtxFitProbability = -1.;
348  if(!convRef.isNull()) {
349  const reco::Vertex &vtx = convRef.get()->conversionVertex();
350  if (vtx.isValid()) {
351  convVtxFitProbability = (float)TMath::Prob( vtx.chi2(), vtx.ndof());
352  }
353  }
354 
355  float eop = eleRecoPtr->eSuperClusterOverP();
356  float eleeopout = eleRecoPtr->eEleClusterOverPout();
357  float pAtVertex = eleRecoPtr->trackMomentumAtVtx().R();
358  float oneOverEminusOneOverP = (1.0/eleRecoPtr->ecalEnergy()) - (1.0 / pAtVertex );
359 
360  // Geometrical matchings
361  float deta = eleRecoPtr->deltaEtaSuperClusterTrackAtVtx();
362  float dphi = eleRecoPtr->deltaPhiSuperClusterTrackAtVtx();
363  float detacalo = eleRecoPtr->deltaEtaSeedClusterTrackAtCalo();
364 
365  // Required by V2 ID
367  deta = std::abs(deta);
368  dphi = std::abs(dphi);
369  detacalo = std::abs(detacalo);
370  }
371 
372  if(tag_ == "V2" && withIso_)
373  {
374 
375  // Isolation variables
376  float pfChargedHadIso = (eleRecoPtr->pfIsolationVariables()).sumChargedHadronPt ; //chargedHadronIso();
377  float pfNeutralHadIso = (eleRecoPtr->pfIsolationVariables()).sumNeutralHadronEt ; //neutralHadronIso();
378  float pfPhotonIso = (eleRecoPtr->pfIsolationVariables()).sumPhotonEt; //photonIso();
379 
380  if ((iCategory + 1) % 3 == 0) {
381  std::vector<float> vars = packMVAVariables(
382  see, // 0
383  spp, // 1
384  circularity,
385  r9,
386  etawidth,
387  phiwidth, // 5
388  hoe,
389  //Pure tracking variables
390  kfhits,
391  kfchi2,
392  gsfchi2, // 9
393  // Energy matching
394  fbrem,
395  gsfhits,
396  expectedMissingInnerHits,
397  convVtxFitProbability, // 13
398  eop,
399  eleeopout, // 15
400  oneOverEminusOneOverP,
401  // Geometrical matchings
402  deta, // 17
403  dphi,
404  detacalo,
405  // Pileup
406  (float)*rho,
407  // Endcap only
408  preShowerOverRaw, // 24
409  // Isolation variables
410  pfPhotonIso,
411  pfChargedHadIso,
412  pfNeutralHadIso
413  );
414  constrainMVAVariables(vars);
415  return vars;
416  } else {
417  std::vector<float> vars = packMVAVariables(
418  see, // 0
419  spp, // 1
420  circularity,
421  r9,
422  etawidth,
423  phiwidth, // 5
424  hoe,
425  //Pure tracking variables
426  kfhits,
427  kfchi2,
428  gsfchi2, // 9
429  // Energy matching
430  fbrem,
431  gsfhits,
432  expectedMissingInnerHits,
433  convVtxFitProbability, // 13
434  eop,
435  eleeopout, // 15
436  oneOverEminusOneOverP,
437  // Geometrical matchings
438  deta, // 17
439  dphi,
440  detacalo,
441  // Pileup
442  (float)*rho,
443  // Isolation variables
444  pfPhotonIso,
445  pfChargedHadIso,
446  pfNeutralHadIso
447  );
448  constrainMVAVariables(vars);
449  return vars;
450  }
451  }
452  else if(withIso_)
453  {
454 
455  // Isolation variables
456  float pfChargedHadIso = (eleRecoPtr->pfIsolationVariables()).sumChargedHadronPt ; //chargedHadronIso();
457  float pfNeutralHadIso = (eleRecoPtr->pfIsolationVariables()).sumNeutralHadronEt ; //neutralHadronIso();
458  float pfPhotonIso = (eleRecoPtr->pfIsolationVariables()).sumPhotonEt; //photonIso();
459 
460  /*
461  * Packing variables for the MVA evaluation.
462  * CAREFUL: It is critical that all the variables that are packed into “vars” are
463  * exactly in the order they are found in the weight files
464  */
465  std::vector<float> vars = packMVAVariables(
466  see, // 0
467  spp, // 1
468  circularity,
469  r9,
470  etawidth,
471  phiwidth, // 5
472  hoe,
473  //Pure tracking variables
474  kfhits,
475  kfchi2,
476  gsfchi2, // 9
477  // Energy matching
478  fbrem,
479  gsfhits,
480  expectedMissingInnerHits,
481  convVtxFitProbability, // 13
482  eop,
483  eleeopout, // 15
484  oneOverEminusOneOverP,
485  // Geometrical matchings
486  deta, // 17
487  dphi,
488  detacalo,
489  // Isolation variables
490  pfPhotonIso,
491  pfChargedHadIso,
492  pfNeutralHadIso,
493  // Pileup
494  (float)*rho,
495 
496  // Endcap only variables NOTE: we don't need
497  // to check if we are actually in the endcap
498  // or not, as it is the last variable in the
499  // vector and it will be ignored by the
500  // GBRForest for the barrel.
501  //
502  // The GBRForest classification just needs an
503  // array with the input variables in the
504  // right order, what comes after doesn't
505  // matter.
506  preShowerOverRaw // 24
507  );
508 
509  constrainMVAVariables(vars);
510 
511  return vars;
512  }
513  else
514  {
515  std::vector<float> vars = packMVAVariables(
516  see, // 0
517  spp, // 1
518  circularity,
519  r9,
520  etawidth,
521  phiwidth, // 5
522  hoe,
523  kfhits,
524  kfchi2,
525  gsfchi2, // 9
526  fbrem,
527  gsfhits,
528  expectedMissingInnerHits,
529  convVtxFitProbability, // 13
530  eop,
531  eleeopout, // 15
532  oneOverEminusOneOverP,
533  deta, // 17
534  dphi,
535  detacalo,
536  (float)*rho,
537  preShowerOverRaw // 21
538  );
539 
540  constrainMVAVariables(vars);
541 
542  return vars;
543  }
544 }
545 
546 void ElectronMVAEstimatorRun2Fall17::constrainMVAVariables(std::vector<float>& vars) const {
547 
548  // Check that variables do not have crazy values
549 
550  for(auto const& clip: clipsLower_) {
551  if ( vars[clip.varIdx] < clip.value ) {
552  vars[clip.varIdx] = clip.value;
553  }
554  }
555 
556  for(auto const& clip: clipsUpper_) {
557  if ( vars[clip.varIdx] > clip.value ) {
558  vars[clip.varIdx] = clip.value;
559  }
560  }
561 
562 }
const PflowIsolationVariables & pfIsolationVariables() const
Definition: GsfElectron.h:670
bool isAvailable() const
Definition: Ref.h:577
T getParameter(std::string const &) const
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:185
T getUntrackedParameter(std::string const &, T const &) const
void setClips(const std::vector< double > &clipsLowerValues, const std::vector< double > &clipsUpperValues)
virtual TrackRef closestCtfTrackRef() const
Definition: GsfElectron.h:201
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
float eSuperClusterOverP() const
Definition: GsfElectron.h:245
T clip(const T &n, const T &lower, const T &upper)
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:159
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
double pt() const final
transverse momentum
void init(const std::vector< std::string > &weightFileNames)
float fbrem() const
Definition: GsfElectron.h:750
#define nullptr
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
bool isFinite(T x)
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
static std::unique_ptr< const GBRForest > createGBRForest(const std::string &weightFile)
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:252
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
std::vector< std::unique_ptr< const GBRForest > > gbrForests_
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:245
Definition: value.py:1
bool isValid() const
Definition: HandleBase.h:74
ElectronMVAEstimatorRun2Fall17(const edm::ParameterSet &conf, bool withIso)
void constrainMVAVariables(std::vector< float > &) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:464
bool isNull() const
Checks for null.
Definition: Ref.h:250
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
reco::TrackRef closestCtfTrackRef() const override
override the reco::GsfElectron::closestCtfTrackRef method, to access the internal storage of the trac...
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.
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:184
int findCategory(const edm::Ptr< reco::Candidate > &particle) const override
const Point & position() const
position
Definition: BeamSpot.h:62
std::vector< float > fillMVAVariables(const edm::Ptr< reco::Candidate > &particle, const edm::Event &) const override
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)
void setConsumes(edm::ConsumesCollector &&) const final