CMS 3D CMS Logo

MuonSegmentCompatibilityCut.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:
16 };
18 
19 // Define constructors and initialization routines
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
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 
42  const reco::MuonPtr muon(cand);
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