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 
20 bool isLooseMuonCustom(const reco::Muon & recoMu)
21 {
22  bool flag = false ;
23  if(recoMu.isPFMuon() && (recoMu.isGlobalMuon() || recoMu.isTrackerMuon())) flag = true;
24 
25  return flag;
26 }
27 
28 bool isMediumMuonCustom(const reco::Muon & recoMu)
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  }
40 
41 
42 bool isTightMuonCustom(const reco::Muon & recoMu, const reco::Vertex recoVtx)
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  }
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
const Point & position() const
position
Definition: Vertex.h:109
bool isTrackerMuon() const override
Definition: Muon.h:266
virtual TrackRef muonBestTrack() const
Definition: Muon.h:63
bool isGlobalMuon() const override
Definition: Muon.h:265
MuonQuality combinedQuality() const
get energy deposition information
Definition: Muon.h:121
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:42
bool isMediumMuonCustom(const reco::Muon &recoMu)
Definition: MuonID.h:28
int numberOfMatchedStations(ArbitrationType type=SegmentAndTrackArbitration) const
bool isPFMuon() const
Definition: Muon.h:269
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:54