RecoMuon
MuonIdentification
plugins
cuts
MuonSegmentCompatibilityCut.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
MuonSegmentCompatibilityCut
:
public
CutApplicatorBase
{
6
public
:
7
MuonSegmentCompatibilityCut
(
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
double
maxGlbNormChi2_
,
maxChi2LocalPos_
,
maxTrkKink_
;
15
const
double
minCompatGlb_
,
minCompatNonGlb_
;
16
};
17
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
MuonSegmentCompatibilityCut
,
"MuonSegmentCompatibilityCut"
);
18
19
// Define constructors and initialization routines
20
MuonSegmentCompatibilityCut::MuonSegmentCompatibilityCut
(
const
edm::ParameterSet
&
c
)
21
:
CutApplicatorBase
(
c
),
22
minCompatGlb_(
c
.getParameter<double>(
"minCompatGlb"
)),
23
minCompatNonGlb_(
c
.getParameter<double>(
"minCompatNonGlb"
)) {
24
const
edm::ParameterSet
cc
=
c
.getParameter<
edm::ParameterSet
>(
"goodGLB"
);
25
maxGlbNormChi2_
=
cc
.getParameter<
double
>(
"maxGlbNormChi2"
);
26
maxChi2LocalPos_
=
cc
.getParameter<
double
>(
"maxChi2LocalPos"
);
27
maxTrkKink_
=
cc
.getParameter<
double
>(
"maxTrkKink"
);
28
}
29
30
// Functors for evaluation
31
CutApplicatorBase::result_type
MuonSegmentCompatibilityCut::operator()
(
const
reco::MuonPtr
&
muon
)
const
{
32
const
bool
isGoodGlb =
33
(
muon
->isGlobalMuon() and
muon
->globalTrack()->normalizedChi2() <
maxGlbNormChi2_
and
34
muon
->combinedQuality().chi2LocalPosition <
maxChi2LocalPos_
and
muon
->combinedQuality().trkKink <
maxTrkKink_
);
35
36
const
double
compat =
muon::segmentCompatibility
(*
muon
);
37
38
return
compat > (isGoodGlb ?
minCompatGlb_
:
minCompatNonGlb_
);
39
}
40
41
double
MuonSegmentCompatibilityCut::value
(
const
reco::CandidatePtr
&
cand
)
const
{
42
const
reco::MuonPtr
muon
(
cand
);
43
return
muon::segmentCompatibility
(*
muon
);
44
}
MuonSegmentCompatibilityCut::value
double value(const reco::CandidatePtr &) const final
Definition:
MuonSegmentCompatibilityCut.cc:41
Muon.h
muon
Definition:
MuonCocktails.h:17
muon::segmentCompatibility
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
Definition:
MuonSelectors.cc:61
MuonSegmentCompatibilityCut::minCompatGlb_
const double minCompatGlb_
Definition:
MuonSegmentCompatibilityCut.cc:15
watchdog.const
const
Definition:
watchdog.py:83
MuonSegmentCompatibilityCut::operator()
result_type operator()(const reco::MuonPtr &) const final
Definition:
MuonSegmentCompatibilityCut.cc:31
MuonSegmentCompatibilityCut::candidateType
CandidateType candidateType() const final
Definition:
MuonSegmentCompatibilityCut.cc:10
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
MuonSegmentCompatibilityCut::maxChi2LocalPos_
double maxChi2LocalPos_
Definition:
MuonSegmentCompatibilityCut.cc:14
MuonSegmentCompatibilityCut::minCompatNonGlb_
const double minCompatNonGlb_
Definition:
MuonSegmentCompatibilityCut.cc:15
HLT_FULL_cff.muon
muon
Definition:
HLT_FULL_cff.py:11725
MuonSelectors.h
MuonSegmentCompatibilityCut::maxTrkKink_
double maxTrkKink_
Definition:
MuonSegmentCompatibilityCut.cc:14
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
MuonSegmentCompatibilityCut::MuonSegmentCompatibilityCut
MuonSegmentCompatibilityCut(const edm::ParameterSet &c)
Definition:
MuonSegmentCompatibilityCut.cc:20
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
cand
Definition:
decayParser.h:32
MuonSegmentCompatibilityCut::maxGlbNormChi2_
double maxGlbNormChi2_
Definition:
MuonSegmentCompatibilityCut.cc:14
cc
edm::Ptr< reco::Muon >
CutApplicatorBase
Definition:
CutApplicatorBase.h:45
MuonSegmentCompatibilityCut
Definition:
MuonSegmentCompatibilityCut.cc:5
CutApplicatorBase.h
c
auto & c
Definition:
CAHitNtupletGeneratorKernelsImpl.h:56
Generated for CMSSW Reference Manual by
1.8.16