CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MuonMatchCut.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:
15 };
17 
18 // Define constructors and initialization routines
19 MuonMatchCut::MuonMatchCut(const edm::ParameterSet& c)
20  : CutApplicatorBase(c), minNumberOfMatchedStations_(c.getParameter<int>("minNumberOfMatchedStations")) {}
21 
22 // Functors for evaluation
24  return muon->numberOfMatchedStations() >= minNumberOfMatchedStations_;
25 }
26 
27 double MuonMatchCut::value(const reco::CandidatePtr& cand) const {
28  const reco::MuonPtr muon(cand);
29  return muon->numberOfMatchedStations();
30 }
const edm::EventSetup & c
result_type operator()(const reco::MuonPtr &) const final
Definition: MuonMatchCut.cc:23
double value(const reco::CandidatePtr &) const final
Definition: MuonMatchCut.cc:27
CandidateType candidateType() const final
Definition: MuonMatchCut.cc:10
MuonMatchCut(const edm::ParameterSet &c)
Definition: MuonMatchCut.cc:19
const int minNumberOfMatchedStations_
Definition: MuonMatchCut.cc:14
#define DEFINE_EDM_PLUGIN(factory, type, name)