CMS 3D CMS Logo

Functions
MuonID.h File Reference
#include "DataFormats/MuonReco/interface/Muon.h"
#include "DataFormats/MuonReco/interface/MuonFwd.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/GeometrySurface/interface/Cylinder.h"
#include "DataFormats/GeometrySurface/interface/Plane.h"
#include "DataFormats/MuonReco/interface/MuonEnergy.h"
#include "DataFormats/MuonReco/interface/MuonTime.h"
#include "CondFormats/AlignmentRecord/interface/TrackerSurfaceDeformationRcd.h"
#include <DataFormats/PatCandidates/interface/Muon.h>
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "L1Trigger/L1TNtuples/interface/L1AnalysisRecoVertexDataFormat.h"

Go to the source code of this file.

Functions

bool isLooseMuonCustom (const reco::Muon &recoMu)
 
bool isMediumMuonCustom (const reco::Muon &recoMu)
 
bool isTightMuonCustom (const reco::Muon &recoMu, const reco::Vertex recoVtx)
 

Function Documentation

◆ isLooseMuonCustom()

bool isLooseMuonCustom ( const reco::Muon recoMu)

Definition at line 19 of file MuonID.h.

19  {
20  bool flag = false;
21  if (recoMu.isPFMuon() && (recoMu.isGlobalMuon() || recoMu.isTrackerMuon()))
22  flag = true;
23 
24  return flag;
25 }

References RemoveAddSevLevel::flag, reco::Muon::isGlobalMuon(), reco::Muon::isPFMuon(), and reco::Muon::isTrackerMuon().

Referenced by isMediumMuonCustom(), and L1Analysis::L1AnalysisRecoMuon2::SetMuon().

◆ isMediumMuonCustom()

bool isMediumMuonCustom ( const reco::Muon recoMu)

Definition at line 27 of file MuonID.h.

27  {
28  bool goodGlob = recoMu.isGlobalMuon() && recoMu.globalTrack()->normalizedChi2() < 3 &&
29  recoMu.combinedQuality().chi2LocalPosition < 12 && recoMu.combinedQuality().trkKink < 20;
30  bool isMedium = isLooseMuonCustom(recoMu) && recoMu.innerTrack()->validFraction() > 0.49 &&
31  muon::segmentCompatibility(recoMu) > (goodGlob ? 0.303 : 0.451);
32 
33  return isMedium;
34 }

References reco::MuonQuality::chi2LocalPosition, reco::Muon::combinedQuality(), reco::Muon::globalTrack(), reco::Muon::innerTrack(), reco::Muon::isGlobalMuon(), isLooseMuonCustom(), muon::segmentCompatibility(), and reco::MuonQuality::trkKink.

Referenced by LeptonSkimming::filter(), and L1Analysis::L1AnalysisRecoMuon2::SetMuon().

◆ isTightMuonCustom()

bool isTightMuonCustom ( const reco::Muon recoMu,
const reco::Vertex  recoVtx 
)

Definition at line 36 of file MuonID.h.

36  {
37  //bp
38  bool isTight = recoMu.isGlobalMuon() && recoMu.isPFMuon() && recoMu.globalTrack()->normalizedChi2() < 10. &&
39  recoMu.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
40  recoMu.numberOfMatchedStations() > 1 && fabs(recoMu.muonBestTrack()->dxy(recoVtx.position())) < 0.2 &&
41  fabs(recoMu.muonBestTrack()->dz(recoVtx.position())) < 0.5 &&
42  recoMu.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
43  recoMu.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 &&
44  recoMu.globalTrack()->normalizedChi2() < 1;
45 
46  return isTight;
47 }

References reco::Muon::globalTrack(), reco::Muon::innerTrack(), reco::Muon::isGlobalMuon(), reco::Muon::isPFMuon(), reco::Muon::muonBestTrack(), reco::Muon::numberOfMatchedStations(), and reco::Vertex::position().

Referenced by LeptonSkimming::filter(), and L1Analysis::L1AnalysisRecoMuon2::SetMuon().

reco::Muon::muonBestTrack
virtual TrackRef muonBestTrack() const
Definition: Muon.h:60
muon::segmentCompatibility
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
Definition: MuonSelectors.cc:61
reco::Vertex::position
const Point & position() const
position
Definition: Vertex.h:114
reco::MuonQuality::chi2LocalPosition
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
Definition: MuonQuality.h:19
reco::Muon::numberOfMatchedStations
int numberOfMatchedStations(ArbitrationType type=SegmentAndTrackArbitration) const
reco::Muon::isGlobalMuon
bool isGlobalMuon() const override
Definition: Muon.h:299
reco::MuonQuality::trkKink
float trkKink
value of the kink algorithm applied to the inner track stub
Definition: MuonQuality.h:11
reco::Muon::globalTrack
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:51
isLooseMuonCustom
bool isLooseMuonCustom(const reco::Muon &recoMu)
Definition: MuonID.h:19
reco::Muon::isPFMuon
bool isPFMuon() const
Definition: Muon.h:303
reco::Muon::innerTrack
virtual TrackRef innerTrack() const
Definition: Muon.h:45
reco::Muon::isTrackerMuon
bool isTrackerMuon() const override
Definition: Muon.h:300
reco::Muon::combinedQuality
MuonQuality combinedQuality() const
get energy deposition information
Definition: Muon.h:119
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116