RecoMuon
MuonIdentification
plugins
cuts
MuonMatchCut.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h
"
2
#include "
DataFormats/MuonReco/interface/Muon.h
"
3
#include "
DataFormats/MuonReco/interface/MuonSelectors.h
"
4
5
class
MuonMatchCut
:
public
CutApplicatorBase
{
6
public
:
7
MuonMatchCut
(
const
edm::ParameterSet
&
c
);
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
int
minNumberOfMatchedStations_
;
15
};
16
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
MuonMatchCut
,
"MuonMatchCut"
);
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
23
CutApplicatorBase::result_type
MuonMatchCut::operator()
(
const
reco::MuonPtr
&
muon
)
const
{
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
}
MuonMatchCut::operator()
result_type operator()(const reco::MuonPtr &) const final
Definition:
MuonMatchCut.cc:23
Muon.h
muon
Definition:
MuonCocktails.h:17
MuonMatchCut::candidateType
CandidateType candidateType() const final
Definition:
MuonMatchCut.cc:10
HLT_2018_cff.muon
muon
Definition:
HLT_2018_cff.py:10349
watchdog.const
const
Definition:
watchdog.py:83
MuonMatchCut::minNumberOfMatchedStations_
const int minNumberOfMatchedStations_
Definition:
MuonMatchCut.cc:14
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
MuonSelectors.h
MuonMatchCut::MuonMatchCut
MuonMatchCut(const edm::ParameterSet &c)
Definition:
MuonMatchCut.cc:19
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
CutApplicatorBase::MUON
Definition:
CutApplicatorBase.h:47
MuonMatchCut
Definition:
MuonMatchCut.cc:5
edm::ParameterSet
Definition:
ParameterSet.h:36
MuonMatchCut::value
double value(const reco::CandidatePtr &) const final
Definition:
MuonMatchCut.cc:27
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
cand
Definition:
decayParser.h:34
createfilelist.int
int
Definition:
createfilelist.py:10
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
edm::Ptr< reco::Muon >
CutApplicatorBase
Definition:
CutApplicatorBase.h:45
CutApplicatorBase.h
Generated for CMSSW Reference Manual by
1.8.16