CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GsfEleMissingHitsCut Class Reference
Inheritance diagram for GsfEleMissingHitsCut:
CutApplicatorBase candidate_functions::CandidateCut

Public Member Functions

CandidateType candidateType () const final
 
 GsfEleMissingHitsCut (const edm::ParameterSet &c)
 
result_type operator() (const reco::GsfElectronPtr &) const final
 
double value (const reco::CandidatePtr &cand) const final
 
- Public Member Functions inherited from CutApplicatorBase
virtual result_type asCandidate (const argument_type &) const
 
 CutApplicatorBase ()
 
 CutApplicatorBase (const CutApplicatorBase &)=delete
 
 CutApplicatorBase (const edm::ParameterSet &c)
 
const std::string & name () const override
 
result_type operator() (const argument_type &) const final
 
virtual result_type operator() (const pat::ElectronPtr &) const
 
virtual result_type operator() (const pat::MuonPtr &) const
 
virtual result_type operator() (const pat::PhotonPtr &) const
 
virtual result_type operator() (const pat::TauPtr &) const
 
virtual result_type operator() (const reco::MuonPtr &) const
 
virtual result_type operator() (const reco::PFTauPtr &) const
 
virtual result_type operator() (const reco::PhotonPtr &) const
 
CutApplicatorBaseoperator= (const CutApplicatorBase &)=delete
 
 ~CutApplicatorBase () override
 Destructor. More...
 
- Public Member Functions inherited from candidate_functions::CandidateCut
 CandidateCut ()
 
virtual ~CandidateCut ()
 

Private Attributes

const double _barrelCutOff
 
const unsigned _maxMissingHitsEB
 
const unsigned _maxMissingHitsEE
 

Additional Inherited Members

- Public Types inherited from CutApplicatorBase
enum  CandidateType {
  NONE, ELECTRON, MUON, PHOTON,
  TAU, PATELECTRON, PATMUON, PATPHOTON,
  PATTAU
}
 
- Public Types inherited from candidate_functions::CandidateCut
using argument_type = reco::CandidatePtr
 
using result_type = bool
 

Detailed Description

Definition at line 5 of file GsfEleMissingHitsCut.cc.

Constructor & Destructor Documentation

◆ GsfEleMissingHitsCut()

GsfEleMissingHitsCut::GsfEleMissingHitsCut ( const edm::ParameterSet c)
inline

Definition at line 7 of file GsfEleMissingHitsCut.cc.

9  _maxMissingHitsEB(c.getParameter<unsigned>("maxMissingHitsEB")),
10  _maxMissingHitsEE(c.getParameter<unsigned>("maxMissingHitsEE")),
11  _barrelCutOff(c.getParameter<double>("barrelCutOff")) {}

Member Function Documentation

◆ candidateType()

CandidateType GsfEleMissingHitsCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 17 of file GsfEleMissingHitsCut.cc.

17 { return ELECTRON; }

References CutApplicatorBase::ELECTRON.

◆ operator()()

CutApplicatorBase::result_type GsfEleMissingHitsCut::operator() ( const reco::GsfElectronPtr cand) const
finalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 26 of file GsfEleMissingHitsCut.cc.

26  {
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 }

References _barrelCutOff, _maxMissingHitsEB, _maxMissingHitsEE, funct::abs(), and reco::HitPattern::MISSING_INNER_HITS.

◆ value()

double GsfEleMissingHitsCut::value ( const reco::CandidatePtr cand) const
finalvirtual

Implements candidate_functions::CandidateCut.

Definition at line 34 of file GsfEleMissingHitsCut.cc.

34  {
35  constexpr auto missingHitType = reco::HitPattern::MISSING_INNER_HITS;
37  const unsigned mHits = ele->gsfTrack()->hitPattern().numberOfLostHits(missingHitType);
38  return mHits;
39 }

References reco::GsfElectron::gsfTrack(), and reco::HitPattern::MISSING_INNER_HITS.

Member Data Documentation

◆ _barrelCutOff

const double GsfEleMissingHitsCut::_barrelCutOff
private

Definition at line 21 of file GsfEleMissingHitsCut.cc.

Referenced by operator()().

◆ _maxMissingHitsEB

const unsigned GsfEleMissingHitsCut::_maxMissingHitsEB
private

Definition at line 20 of file GsfEleMissingHitsCut.cc.

Referenced by operator()().

◆ _maxMissingHitsEE

const unsigned GsfEleMissingHitsCut::_maxMissingHitsEE
private

Definition at line 20 of file GsfEleMissingHitsCut.cc.

Referenced by operator()().

CutApplicatorBase::CutApplicatorBase
CutApplicatorBase()
Definition: CutApplicatorBase.h:49
GsfEleMissingHitsCut::_barrelCutOff
const double _barrelCutOff
Definition: GsfEleMissingHitsCut.cc:21
cand
Definition: decayParser.h:34
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
GsfEleMissingHitsCut::_maxMissingHitsEB
const unsigned _maxMissingHitsEB
Definition: GsfEleMissingHitsCut.cc:20
edm::Ptr< reco::GsfElectron >
reco::HitPattern::MISSING_INNER_HITS
Definition: HitPattern.h:155
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CutApplicatorBase::ELECTRON
Definition: CutApplicatorBase.h:47
GsfEleMissingHitsCut::_maxMissingHitsEE
const unsigned _maxMissingHitsEE
Definition: GsfEleMissingHitsCut.cc:20