CMS 3D CMS Logo

MuonID.h
Go to the documentation of this file.
11 
12 //vertex
13 // EDM formats
16 //local data formats
18 
19 inline bool isLooseMuonCustom(const reco::Muon& recoMu) {
20  bool flag = false;
21  if (recoMu.isPFMuon() && (recoMu.isGlobalMuon() || recoMu.isTrackerMuon()))
22  flag = true;
23 
24  return flag;
25 }
26 
27 inline bool isMediumMuonCustom(const reco::Muon& recoMu) {
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 }
35 
36 inline bool isTightMuonCustom(const reco::Muon& recoMu, const reco::Vertex recoVtx) {
37  //bp
38  bool isTight = recoMu.isGlobalMuon() && recoMu.isPFMuon() && recoMu.globalTrack()->normalizedChi2() < 10. &&
39  recoMu.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
40  recoMu.numberOfMatchedStations() > 1 &&
41  std::abs(recoMu.muonBestTrack()->dxy(recoVtx.position())) < 0.2 &&
42  std::abs(recoMu.muonBestTrack()->dz(recoVtx.position())) < 0.5 &&
43  recoMu.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
44  recoMu.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 &&
45  recoMu.globalTrack()->normalizedChi2() < 1;
46 
47  return isTight;
48 }
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
Definition: MuonQuality.h:19
MuonQuality combinedQuality() const
get energy deposition information
Definition: Muon.h:119
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:51
const Point & position() const
position
Definition: Vertex.h:128
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:19
bool isTrackerMuon() const override
Definition: Muon.h:304
bool isPFMuon() const
Definition: Muon.h:307
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
bool isTightMuonCustom(const reco::Muon &recoMu, const reco::Vertex recoVtx)
Definition: MuonID.h:36
bool isMediumMuonCustom(const reco::Muon &recoMu)
Definition: MuonID.h:27
virtual TrackRef innerTrack() const
Definition: Muon.h:45
virtual TrackRef muonBestTrack() const
Definition: Muon.h:60
int numberOfMatchedStations(ArbitrationType type=SegmentAndTrackArbitration) const
bool isGlobalMuon() const override
Definition: Muon.h:303