test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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>

Go to the source code of this file.

Functions

bool isLooseMuonCustom (const reco::Muon &recoMu)
 
bool isMediumMuonCustom (const reco::Muon &recoMu)
 

Function Documentation

bool isLooseMuonCustom ( const reco::Muon recoMu)

Definition at line 15 of file MuonID.h.

References edm::false, reco::Muon::isGlobalMuon(), reco::Muon::isPFMuon(), and reco::Muon::isTrackerMuon().

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

16 {
17  bool flag = false ;
18  if(recoMu.isPFMuon() && (recoMu.isGlobalMuon() || recoMu.isTrackerMuon())) flag = true;
19 
20  return flag;
21 }
bool isTrackerMuon() const
Definition: Muon.h:223
bool isGlobalMuon() const
Definition: Muon.h:222
bool isPFMuon() const
Definition: Muon.h:226
volatile std::atomic< bool > shutdown_flag false
bool isMediumMuonCustom ( const reco::Muon recoMu)

Definition at line 23 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 L1Analysis::L1AnalysisRecoMuon2::SetMuon().

24  {
25  bool goodGlob = recoMu.isGlobalMuon() &&
26  recoMu.globalTrack()->normalizedChi2() < 3 &&
27  recoMu.combinedQuality().chi2LocalPosition < 12 &&
28  recoMu.combinedQuality().trkKink < 20;
29  bool isMedium = isLooseMuonCustom(recoMu) &&
30  recoMu.innerTrack()->validFraction() > 0.8 &&
31  segmentCompatibility(recoMu) > (goodGlob ? 0.303 : 0.451);
32  return isMedium;
33  }
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
Definition: MuonQuality.h:19
virtual TrackRef innerTrack() const
Definition: Muon.h:48
bool isGlobalMuon() const
Definition: Muon.h:222
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:15
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