CMS 3D CMS Logo

MuonSegmentCompatibilityCut.cc
Go to the documentation of this file.
4 
6 {
7 public:
9 
10  result_type operator()(const reco::MuonPtr&) const final;
11  CandidateType candidateType() const final { return MUON; }
12  double value(const reco::CandidatePtr&) const final;
13 
14 private:
17 
18 };
20  MuonSegmentCompatibilityCut, "MuonSegmentCompatibilityCut");
21 
22 // Define constructors and initialization routines
25  minCompatGlb_(c.getParameter<double>("minCompatGlb")),
26  minCompatNonGlb_(c.getParameter<double>("minCompatNonGlb"))
27 {
28  const edm::ParameterSet cc = c.getParameter<edm::ParameterSet>("goodGLB");
29  maxGlbNormChi2_ = cc.getParameter<double>("maxGlbNormChi2");
30  maxChi2LocalPos_ = cc.getParameter<double>("maxChi2LocalPos");
31  maxTrkKink_ = cc.getParameter<double>("maxTrkKink");
32 }
33 
34 // Functors for evaluation
35 CutApplicatorBase::result_type MuonSegmentCompatibilityCut::operator()(const reco::MuonPtr& muon) const
36 {
37  const bool isGoodGlb = (
38  muon->isGlobalMuon() and
39  muon->globalTrack()->normalizedChi2() < maxGlbNormChi2_ and
42  );
43 
44  const double compat = muon::segmentCompatibility(*muon);
45 
46  return compat > (isGoodGlb ? minCompatGlb_ : minCompatNonGlb_);
47 
48 }
49 
51 {
52  const reco::MuonPtr muon(cand);
53  return muon::segmentCompatibility(*muon);
54 }
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
Definition: MuonQuality.h:19
T getParameter(std::string const &) const
result_type operator()(const reco::MuonPtr &) const final
float trkKink
value of the kink algorithm applied to the inner track stub
Definition: MuonQuality.h:11
MuonSegmentCompatibilityCut(const edm::ParameterSet &c)
bool isGlobalMuon() const override
Definition: Muon.h:276
MuonQuality combinedQuality() const
get energy deposition information
Definition: Muon.h:121
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
double value(const reco::CandidatePtr &) const final
#define DEFINE_EDM_PLUGIN(factory, type, name)
CandidateType candidateType() const final
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:54