CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
33 operator()(const reco::GsfElectronPtr& cand) const{
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
CandidateType candidateType() const overridefinal
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
result_type operator()(const reco::GsfElectronPtr &) const overridefinal
const unsigned _maxMissingHitsEB
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
GsfEleMissingHitsCut(const edm::ParameterSet &c)
string const
Definition: compareJSON.py:14
double value(const reco::CandidatePtr &cand) const overridefinal
#define DEFINE_EDM_PLUGIN(factory, type, name)
const unsigned _maxMissingHitsEE