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 override final;
15 
16  double value(const reco::CandidatePtr& cand) const override final;
17 
18  CandidateType candidateType() const override final {
19  return ELECTRON;
20  }
21 
22 private:
24  const double _barrelCutOff;
25 };
26 
29  "GsfEleMissingHitsCut");
30 
31 CutApplicatorBase::result_type
36  const unsigned maxMissingHits =
37  ( std::abs(cand->superCluster()->position().eta()) < _barrelCutOff ?
39  const unsigned mHits =
40  cand->gsfTrack()->hitPattern().numberOfHits(missingHitType);
41  return mHits <= maxMissingHits;
42 }
43 
47  reco::GsfElectronPtr ele(cand);
48  const unsigned mHits =
49  ele->gsfTrack()->hitPattern().numberOfHits(missingHitType);
50  return mHits;
51 }
#define constexpr
double value(const reco::CandidatePtr &cand) const override final
CandidateType candidateType() const override final
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:184
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const unsigned _maxMissingHitsEB
GsfEleMissingHitsCut(const edm::ParameterSet &c)
#define DEFINE_EDM_PLUGIN(factory, type, name)
const unsigned _maxMissingHitsEE
result_type operator()(const reco::GsfElectronPtr &) const override final
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:185