CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( const edm::ParameterSet c)

Definition at line 19 of file MuonMomQualityCut.cc.

20  : CutApplicatorBase(c), maxRelPtErr_(c.getParameter<double>("maxRelPtErr")) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const double maxRelPtErr_

Member Function Documentation

CandidateType MuonMomQualityCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 10 of file MuonMomQualityCut.cc.

References CutApplicatorBase::MUON.

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

Reimplemented from CutApplicatorBase.

Definition at line 23 of file MuonMomQualityCut.cc.

References edm::Ptr< T >::isNonnull(), and maxRelPtErr_.

23  {
24  const auto trackRef = cand->muonBestTrack();
25  return trackRef.isNonnull() and trackRef->ptError() <= maxRelPtErr_ * trackRef->pt();
26 
27  return true;
28 }
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
const double maxRelPtErr_
double MuonMomQualityCut::value ( const reco::CandidatePtr cand) const
finalvirtual

Implements candidate_functions::CandidateCut.

Definition at line 30 of file MuonMomQualityCut.cc.

References HLT_FULL_cff::muon, and or.

Referenced by Types.int32::__nonzero__(), Types.uint32::__nonzero__(), Types.int64::__nonzero__(), Types.uint64::__nonzero__(), Types.double::__nonzero__(), Types.bool::__nonzero__(), Types.string::__nonzero__(), Types.string::configValue(), Types.FileInPath::configValue(), Types.int32::insertInto(), Types.uint32::insertInto(), Types.int64::insertInto(), Types.uint64::insertInto(), Types.double::insertInto(), Types.bool::insertInto(), Types.string::insertInto(), Types.FileInPath::insertInto(), Types.vint32::insertInto(), Types.vuint32::insertInto(), Types.vint64::insertInto(), Types.vuint64::insertInto(), Types.vdouble::insertInto(), Types.vbool::insertInto(), and Types.vstring::insertInto().

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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12

Member Data Documentation

const double MuonMomQualityCut::maxRelPtErr_
private

Definition at line 14 of file MuonMomQualityCut.cc.

Referenced by operator()().