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  result_type operator()(const reco::GsfElectronPtr&) const final;
14 
15  double value(const reco::CandidatePtr& cand) const final;
16 
18 
19 private:
21  const double _barrelCutOff;
22 };
23 
25 
27  constexpr auto missingHitType = reco::HitPattern::MISSING_INNER_HITS;
28  const unsigned maxMissingHits =
29  (std::abs(cand->superCluster()->position().eta()) < _barrelCutOff ? _maxMissingHitsEB : _maxMissingHitsEE);
30  const unsigned mHits = cand->gsfTrack()->hitPattern().numberOfLostHits(missingHitType);
31  return mHits <= maxMissingHits;
32 }
33 
35  constexpr auto missingHitType = reco::HitPattern::MISSING_INNER_HITS;
37  const unsigned mHits = ele->gsfTrack()->hitPattern().numberOfLostHits(missingHitType);
38  return mHits;
39 }
GsfEleMissingHitsCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const final
Definition: GsfEleMissingHitsCut.cc:26
reco::GsfElectron::gsfTrack
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:164
watchdog.const
const
Definition: watchdog.py:83
GsfEleMissingHitsCut::value
double value(const reco::CandidatePtr &cand) const final
Definition: GsfEleMissingHitsCut.cc:34
GsfEleMissingHitsCut::_barrelCutOff
const double _barrelCutOff
Definition: GsfEleMissingHitsCut.cc:21
candidate_functions::CandidateCut::result_type
bool result_type
Definition: CandidateCut.h:11
GsfEleMissingHitsCut::candidateType
CandidateType candidateType() const final
Definition: GsfEleMissingHitsCut.cc:17
GsfElectron.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
GsfEleMissingHitsCut
Definition: GsfEleMissingHitsCut.cc:5
edm::ParameterSet
Definition: ParameterSet.h:36
CutApplicatorBase::CandidateType
CandidateType
Definition: CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition: PluginFactory.h:34
cand
Definition: decayParser.h:34
GsfTrack.h
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
GsfEleMissingHitsCut::_maxMissingHitsEB
const unsigned _maxMissingHitsEB
Definition: GsfEleMissingHitsCut.cc:20
edm::Ptr< reco::GsfElectron >
CutApplicatorBase
Definition: CutApplicatorBase.h:45
reco::HitPattern::MISSING_INNER_HITS
Definition: HitPattern.h:155
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GsfEleMissingHitsCut::GsfEleMissingHitsCut
GsfEleMissingHitsCut(const edm::ParameterSet &c)
Definition: GsfEleMissingHitsCut.cc:7
CutApplicatorBase.h
CutApplicatorBase::ELECTRON
Definition: CutApplicatorBase.h:47
GsfEleMissingHitsCut::_maxMissingHitsEE
const unsigned _maxMissingHitsEE
Definition: GsfEleMissingHitsCut.cc:20