CMS 3D CMS Logo

GsfEleMissingHitsCut.cc
Go to the documentation of this file.
4 
6 public:
9  _maxMissingHitsEB(c.getParameter<unsigned>("maxMissingHitsEB")),
10  _maxMissingHitsEE(c.getParameter<unsigned>("maxMissingHitsEE")),
11  _barrelCutOff(c.getParameter<double>("barrelCutOff")){
12  }
13 
14  result_type operator()(const reco::GsfElectronPtr&) const final;
15 
16  double value(const reco::CandidatePtr& cand) const final;
17 
18  CandidateType candidateType() const final {
19  return ELECTRON;
20  }
21 
22 private:
24  const double _barrelCutOff;
25 };
26 
29  "GsfEleMissingHitsCut");
30 
31 CutApplicatorBase::result_type
34  constexpr auto missingHitType =
36  const unsigned maxMissingHits =
37  ( std::abs(cand->superCluster()->position().eta()) < _barrelCutOff ?
39  const unsigned mHits =
40  cand->gsfTrack()->hitPattern().numberOfLostHits(missingHitType);
41  return mHits <= maxMissingHits;
42 }
43 
45  constexpr auto missingHitType =
47  reco::GsfElectronPtr ele(cand);
48  const unsigned mHits =
49  ele->gsfTrack()->hitPattern().numberOfLostHits(missingHitType);
50  return mHits;
51 }
double value(const reco::CandidatePtr &cand) const final
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:185
#define constexpr
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
result_type operator()(const reco::GsfElectronPtr &) const final
const unsigned _maxMissingHitsEB
GsfEleMissingHitsCut(const edm::ParameterSet &c)
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:184
CandidateType candidateType() const final
#define DEFINE_EDM_PLUGIN(factory, type, name)
const unsigned _maxMissingHitsEE