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

bool isLooseMuonCustom ( const reco::Muon recoMu)

Definition at line 20 of file MuonID.h.

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

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

21 {
22  bool flag = false ;
23  if(recoMu.isPFMuon() && (recoMu.isGlobalMuon() || recoMu.isTrackerMuon())) flag = true;
24 
25  return flag;
26 }
bool isTrackerMuon() const override
Definition: Muon.h:277
bool isGlobalMuon() const override
Definition: Muon.h:276
bool isPFMuon() const
Definition: Muon.h:280
bool isMediumMuonCustom ( const reco::Muon recoMu)

Definition at line 28 of file MuonID.h.

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().

29  {
30  bool goodGlob = recoMu.isGlobalMuon() &&
31  recoMu.globalTrack()->normalizedChi2() < 3 &&
32  recoMu.combinedQuality().chi2LocalPosition < 12 &&
33  recoMu.combinedQuality().trkKink < 20;
34  bool isMedium = isLooseMuonCustom(recoMu) &&
35  recoMu.innerTrack()->validFraction() > 0.49 &&
36  muon::segmentCompatibility(recoMu) > (goodGlob ? 0.303 : 0.451);
37 
38  return isMedium;
39  }
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
Definition: MuonQuality.h:19
virtual TrackRef innerTrack() const
Definition: Muon.h:48
float trkKink
value of the kink algorithm applied to the inner track stub
Definition: MuonQuality.h:11
bool isLooseMuonCustom(const reco::Muon &recoMu)
Definition: MuonID.h:20
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)
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:54
bool isTightMuonCustom ( const reco::Muon recoMu,
const reco::Vertex  recoVtx 
)

Definition at line 42 of file MuonID.h.

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().

43  {
44 
45  //bp
46  bool isTight = recoMu.isGlobalMuon() && recoMu.isPFMuon() && recoMu.globalTrack()->normalizedChi2() < 10. &&
47  recoMu.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
48  recoMu.numberOfMatchedStations() > 1 &&
49  fabs(recoMu.muonBestTrack()->dxy(recoVtx.position())) < 0.2 &&
50  fabs(recoMu.muonBestTrack()->dz(recoVtx.position())) < 0.5 &&
51  recoMu.innerTrack()->hitPattern().numberOfValidPixelHits() > 0&&
52  recoMu.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 &&
53  recoMu.globalTrack()->normalizedChi2() < 1;
54 
55  return isTight;
56  }
virtual TrackRef innerTrack() const
Definition: Muon.h:48
const Point & position() const
position
Definition: Vertex.h:109
virtual TrackRef muonBestTrack() const
Definition: Muon.h:63
bool isGlobalMuon() const override
Definition: Muon.h:276
int numberOfMatchedStations(ArbitrationType type=SegmentAndTrackArbitration) const
bool isPFMuon() const
Definition: Muon.h:280
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:54