CMS 3D CMS Logo

MuonMomQualityCut.cc
Go to the documentation of this file.
4 
6 public:
8 
9  result_type operator()(const reco::MuonPtr&) const final;
10  CandidateType candidateType() const final { return MUON; }
11  double value(const reco::CandidatePtr&) const final;
12 
13 private:
14  const double maxRelPtErr_;
15 };
17 
18 // Define constructors and initialization routines
20  : CutApplicatorBase(c), maxRelPtErr_(c.getParameter<double>("maxRelPtErr")) {}
21 
22 // Functors for evaluation
24  const auto trackRef = cand->muonBestTrack();
25  return trackRef.isNonnull() and trackRef->ptError() <= maxRelPtErr_ * trackRef->pt();
26 
27  return true;
28 }
29 
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 }
Muon.h
MuonMomQualityCut::MuonMomQualityCut
MuonMomQualityCut(const edm::ParameterSet &c)
Definition: MuonMomQualityCut.cc:19
muon
Definition: MuonCocktails.h:17
watchdog.const
const
Definition: watchdog.py:83
candidate_functions::CandidateCut::result_type
bool result_type
Definition: CandidateCut.h:11
MuonMomQualityCut::operator()
result_type operator()(const reco::MuonPtr &) const final
Definition: MuonMomQualityCut.cc:23
HLT_FULL_cff.muon
muon
Definition: HLT_FULL_cff.py:11725
MuonSelectors.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
CutApplicatorBase::MUON
Definition: CutApplicatorBase.h:47
edm::ParameterSet
Definition: ParameterSet.h:47
CutApplicatorBase::CandidateType
CandidateType
Definition: CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition: PluginFactory.h:34
cand
Definition: decayParser.h:32
edm::Ptr< reco::Muon >
MuonMomQualityCut::value
double value(const reco::CandidatePtr &) const final
Definition: MuonMomQualityCut.cc:30
CutApplicatorBase
Definition: CutApplicatorBase.h:45
or
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
MuonMomQualityCut
Definition: MuonMomQualityCut.cc:5
CutApplicatorBase.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
MuonMomQualityCut::maxRelPtErr_
const double maxRelPtErr_
Definition: MuonMomQualityCut.cc:14
MuonMomQualityCut::candidateType
CandidateType candidateType() const final
Definition: MuonMomQualityCut.cc:10