CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonMatchCut.cc
Go to the documentation of this file.
4 
6 {
7 public:
9 
10  result_type operator()(const reco::MuonPtr&) const override final;
11  CandidateType candidateType() const override final { return MUON; }
12  double value(const reco::CandidatePtr&) const override final;
13 
14 private:
16 
17 };
19 
20 // Define constructors and initialization routines
21 MuonMatchCut::MuonMatchCut(const edm::ParameterSet& c):
23  minNumberOfMatchedStations_(c.getParameter<int>("minNumberOfMatchedStations"))
24 {
25 }
26 
27 // Functors for evaluation
28 CutApplicatorBase::result_type MuonMatchCut::operator()(const reco::MuonPtr& muon) const
29 {
30  return muon->numberOfMatchedStations() >= minNumberOfMatchedStations_;
31 }
32 
33 double MuonMatchCut::value(const reco::CandidatePtr& cand) const
34 {
35  const reco::MuonPtr muon(cand);
36  return muon->numberOfMatchedStations();
37 }
double value(const reco::CandidatePtr &) const overridefinal
Definition: MuonMatchCut.cc:33
#define private
Definition: FWEveView.cc:22
result_type operator()(const reco::MuonPtr &) const overridefinal
Definition: MuonMatchCut.cc:28
MuonMatchCut(const edm::ParameterSet &c)
Definition: MuonMatchCut.cc:21
string const
Definition: compareJSON.py:14
CandidateType candidateType() const overridefinal
Definition: MuonMatchCut.cc:11
const int minNumberOfMatchedStations_
Definition: MuonMatchCut.cc:15
#define DEFINE_EDM_PLUGIN(factory, type, name)