CMS 3D CMS Logo

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

Public Member Functions

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

Private Attributes

const double maxRelPtErr_
 

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 MuonMomQualityCut.cc.

Constructor & Destructor Documentation

◆ MuonMomQualityCut()

MuonMomQualityCut::MuonMomQualityCut ( const edm::ParameterSet c)

Definition at line 19 of file MuonMomQualityCut.cc.

20  : CutApplicatorBase(c), maxRelPtErr_(c.getParameter<double>("maxRelPtErr")) {}
const double maxRelPtErr_

Member Function Documentation

◆ candidateType()

CandidateType MuonMomQualityCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 10 of file MuonMomQualityCut.cc.

References CutApplicatorBase::MUON.

◆ operator()()

CutApplicatorBase::result_type MuonMomQualityCut::operator() ( const reco::MuonPtr cand) const
finalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 23 of file MuonMomQualityCut.cc.

References maxRelPtErr_.

23  {
24  const auto trackRef = cand->muonBestTrack();
25  return trackRef.isNonnull() and trackRef->ptError() <= maxRelPtErr_ * trackRef->pt();
26 
27  return true;
28 }
const double maxRelPtErr_

◆ value()

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

Implements candidate_functions::CandidateCut.

Definition at line 30 of file MuonMomQualityCut.cc.

References HLT_2022v12_cff::muon, and or.

30  {
31  const reco::MuonPtr muon(cand);
32  const auto trackRef = muon->muonBestTrack();
33  if (trackRef.isNull() or trackRef->pt() <= 0)
34  return -1;
35 
36  return trackRef->ptError() / trackRef->pt();
37 }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12

Member Data Documentation

◆ maxRelPtErr_

const double MuonMomQualityCut::maxRelPtErr_
private

Definition at line 14 of file MuonMomQualityCut.cc.

Referenced by operator()().