CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MuonSegmentCompatibilityCut Class Reference
Inheritance diagram for MuonSegmentCompatibilityCut:
CutApplicatorBase candidate_functions::CandidateCut

Public Member Functions

CandidateType candidateType () const final
 
 MuonSegmentCompatibilityCut (const edm::ParameterSet &c)
 
result_type operator() (const reco::MuonPtr &) const final
 
double value (const reco::CandidatePtr &) const final
 
- Public Member Functions inherited from CutApplicatorBase
virtual result_type asCandidate (const argument_type &) const
 
 CutApplicatorBase ()
 
 CutApplicatorBase (const CutApplicatorBase &)=delete
 
 CutApplicatorBase (const edm::ParameterSet &c)
 
const std::string & name () const override
 
result_type operator() (const argument_type &) const final
 
virtual result_type operator() (const pat::ElectronPtr &) const
 
virtual result_type operator() (const pat::MuonPtr &) const
 
virtual result_type operator() (const pat::PhotonPtr &) const
 
virtual result_type operator() (const pat::TauPtr &) const
 
virtual result_type operator() (const reco::GsfElectronPtr &) const
 
virtual result_type operator() (const reco::PFTauPtr &) const
 
virtual result_type operator() (const reco::PhotonPtr &) const
 
CutApplicatorBaseoperator= (const CutApplicatorBase &)=delete
 
 ~CutApplicatorBase () override
 Destructor. More...
 
- Public Member Functions inherited from candidate_functions::CandidateCut
 CandidateCut ()
 
virtual ~CandidateCut ()
 

Private Attributes

double maxChi2LocalPos_
 
double maxGlbNormChi2_
 
double maxTrkKink_
 
const double minCompatGlb_
 
const double minCompatNonGlb_
 

Additional Inherited Members

- Public Types inherited from CutApplicatorBase
enum  CandidateType {
  NONE, ELECTRON, MUON, PHOTON,
  TAU, PATELECTRON, PATMUON, PATPHOTON,
  PATTAU
}
 
- Public Types inherited from candidate_functions::CandidateCut
using argument_type = reco::CandidatePtr
 
using result_type = bool
 

Detailed Description

Definition at line 5 of file MuonSegmentCompatibilityCut.cc.

Constructor & Destructor Documentation

◆ MuonSegmentCompatibilityCut()

MuonSegmentCompatibilityCut::MuonSegmentCompatibilityCut ( const edm::ParameterSet c)

Definition at line 20 of file MuonSegmentCompatibilityCut.cc.

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 }

References HltBtagPostValidation_cff::c, maxChi2LocalPos_, maxGlbNormChi2_, and maxTrkKink_.

Member Function Documentation

◆ candidateType()

CandidateType MuonSegmentCompatibilityCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 10 of file MuonSegmentCompatibilityCut.cc.

10 { return MUON; }

References CutApplicatorBase::MUON.

◆ operator()()

CutApplicatorBase::result_type MuonSegmentCompatibilityCut::operator() ( const reco::MuonPtr muon) const
finalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 31 of file MuonSegmentCompatibilityCut.cc.

31  {
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 }

References maxChi2LocalPos_, maxGlbNormChi2_, maxTrkKink_, minCompatGlb_, minCompatNonGlb_, and muon::segmentCompatibility().

◆ value()

double MuonSegmentCompatibilityCut::value ( const reco::CandidatePtr cand) const
finalvirtual

Implements candidate_functions::CandidateCut.

Definition at line 41 of file MuonSegmentCompatibilityCut.cc.

41  {
42  const reco::MuonPtr muon(cand);
44 }

References HLT_2018_cff::muon, and muon::segmentCompatibility().

Member Data Documentation

◆ maxChi2LocalPos_

double MuonSegmentCompatibilityCut::maxChi2LocalPos_
private

Definition at line 14 of file MuonSegmentCompatibilityCut.cc.

Referenced by MuonSegmentCompatibilityCut(), and operator()().

◆ maxGlbNormChi2_

double MuonSegmentCompatibilityCut::maxGlbNormChi2_
private

Definition at line 14 of file MuonSegmentCompatibilityCut.cc.

Referenced by MuonSegmentCompatibilityCut(), and operator()().

◆ maxTrkKink_

double MuonSegmentCompatibilityCut::maxTrkKink_
private

Definition at line 14 of file MuonSegmentCompatibilityCut.cc.

Referenced by MuonSegmentCompatibilityCut(), and operator()().

◆ minCompatGlb_

const double MuonSegmentCompatibilityCut::minCompatGlb_
private

Definition at line 15 of file MuonSegmentCompatibilityCut.cc.

Referenced by operator()().

◆ minCompatNonGlb_

const double MuonSegmentCompatibilityCut::minCompatNonGlb_
private

Definition at line 15 of file MuonSegmentCompatibilityCut.cc.

Referenced by operator()().

muon
Definition: MuonCocktails.h:17
muon::segmentCompatibility
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
Definition: MuonSelectors.cc:61
CutApplicatorBase::CutApplicatorBase
CutApplicatorBase()
Definition: CutApplicatorBase.h:49
MuonSegmentCompatibilityCut::minCompatGlb_
const double minCompatGlb_
Definition: MuonSegmentCompatibilityCut.cc:15
HLT_2018_cff.muon
muon
Definition: HLT_2018_cff.py:10349
MuonSegmentCompatibilityCut::maxChi2LocalPos_
double maxChi2LocalPos_
Definition: MuonSegmentCompatibilityCut.cc:14
MuonSegmentCompatibilityCut::minCompatNonGlb_
const double minCompatNonGlb_
Definition: MuonSegmentCompatibilityCut.cc:15
MuonSegmentCompatibilityCut::maxTrkKink_
double maxTrkKink_
Definition: MuonSegmentCompatibilityCut.cc:14
CutApplicatorBase::MUON
Definition: CutApplicatorBase.h:47
edm::ParameterSet
Definition: ParameterSet.h:36
cand
Definition: decayParser.h:34
MuonSegmentCompatibilityCut::maxGlbNormChi2_
double maxGlbNormChi2_
Definition: MuonSegmentCompatibilityCut.cc:14
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
cc
edm::Ptr< reco::Muon >