Baseline muon selections for Run-II

In this page you can find recommendations for muon ID in Run2 and releases ≥CMSSW_7_4_X (unless otherwise specified).
For instruction related to previous releases (e.g. 44X and 53X), please check Run-I recommendations.

Muon selectors (Since 9_4_X)

Since CMSSW_9_4_X a set of pre-computed muon selectors are included in the reco::muon.
An updated comprehensive list is available at the enum Selector in /DataFormats/MuonReco/interface/Muon.h of your release.

This is a link for DataFormat/MuonReco/interface/Muon.h for CMSSW_9_4_X. Check the same file in your release to know which selectors are available to you.

We strongly recommend using these selectors instead of the standard booleans that were recommended before CMSSW_9_4_X. Official efficiency measurements and scale-factors are provided for these selectors.

Selector Description Available since Comments
reco::Muon::CutBasedIdLoose reco::Muon::isLooseMuon ≥CMSSW_9_4_X  
reco::Muon::CutBasedIdMedium reco::Muon::isMediumMuon ≥CMSSW_9_4_X  
reco::Muon::CutBasedIdMediumPrompt reco::Muon::isMediumMuon and dz<0.1 and dxy< 0.02 ≥CMSSW_9_4_X  
reco::Muon::CutBasedIdTight reco::Muon::isTightMuon ≥CMSSW_9_4_X  
reco::Muon::CutBasedIdGlobalHighPt reco::Muon::isHighPtMuon (better momentum resolution) ≥CMSSW_9_4_X  
reco::Muon::CutBasedIdTrkHighPt reco::Muon:: isTrackerHighPtMuon (better efficiency) ≥CMSSW_9_4_X  
reco::Muon::PFIsoVeryLoose Relative PF-isolation (delta beta corrected, 0.4 cone) <0.40 ≥CMSSW_9_4_X  
reco::Muon::PFIsoLoose Relative PF-isolation (delta beta corrected, 0.4 cone) <0.25 ≥CMSSW_9_4_X  
reco::Muon::PFIsoMedium Relative PF-isolation (delta beta corrected, 0.4 cone) <0.20 ≥CMSSW_9_4_X  
reco::Muon::PFIsoTight Relative PF-isolation (delta beta corrected, 0.4 cone) <0.15 ≥CMSSW_9_4_X  
reco::Muon::PFIsoVeryTight Relative PF-isolation (delta beta corrected, 0.4 cone) <0.10 ≥CMSSW_9_4_X  
reco::MuonPFIsoVeryVeryTight Relative PF-isolation (delta beta corrected, 0.4 cone) <0.05 ≥CMSSW_10_1_X  
reco::Muon::TkIsoLoose Relative Tracker isolation (0.3 cone) <0.10 ≥CMSSW_9_4_X  
reco::Muon::TkIsoTight Relative Tracker isolation (0.3 cone) <0.05 ≥CMSSW_9_4_X  
reco::Muon::SoftCutBasedId reco::Muon::isSoftMuon ≥CMSSW_9_4_X  
reco::Muon::SoftMvaId   ≥CMSSW_10_1_X MiniAOD only
reco::Muon::MvaLoose   ≥CMSSW_9_4_X 2016 training,MiniAOD only
reco::Muon::MvaMedium   ≥CMSSW_9_4_X 2016 training,MiniAOD only
reco::Muon::MvaTight   ≥CMSSW_9_4_X 2016 training, MiniAOD only
reco::Muon::MiniIsoLoose Relative MiniIso <0.40 ≥CMSSW_9_4_X MiniAOD only
reco::Muon::MiniIsoMedium Relative MiniIso <0.20 ≥CMSSW_9_4_X MiniAOD only
reco::Muon::MiniIsoTight Relative MiniIso <0.10 ≥CMSSW_9_4_X MiniAOD only
reco::Muon::MiniIsoVeryTight Relative MiniIso <0.05 ≥CMSSW_9_4_X MiniAOD only
reco::Muon::TriggerIdLoose robust selector for HLT ≥CMSSW_10_0_X  
reco::Muon::InTimeMuon   ≥CMSSW_10_1_X  
reco::Muon::MultiIsoLoose miniIso with ptRatio and pTRel ≥CMSSW_10_1_X MiniAOD only
reco::Muon::MultiIsoMedium miniIso with ptRatio and pTRel ≥CMSSW_10_1_X MiniAOD only


Usage example:

for (const auto& muon: muons){
   if (muon.passed(reco::Muon::CutBasedIdTight|reco::Muon::PFIsoMedium)
      histGoodMuonPt->Fill(muon.pt());
}

Details on each of the selectors can be found later in this twiki.

Muon Identification

Technical details for all ID can be found directly in CMSSW.

Reco muon
Interface at DataFormats/MuonReco/interface/MuonSelectors.h. Link to CMSSW_9_4_X version.
Implementation in DataFormats/MuonReco/src/MuonSelectors.cc. Link to CMSSW_9_4_X version.

PF muon
Interface at RecoParticleFlow/PFProucer/interface/PFMuonAlgo.h. Link to the CMSSW_9_4_X version.
Implementation in RecoParticleFlow/PFProducer/src/PFMuonAlgo.cc. Link to the CMSSW_9_4_X version.

PAT muon
Interface at DataFormats/PatCandidates/interface/Muon.h. Link to the CMSSW_9_4_X version .
Implementation in DataFormats/PatCandidates/src/Muon.cc. Link to the CMSSW_9_4_X version.

Loose Muon

Particle identified as a muon by the Particle-Flow event reconstruction, and that is also reconstructed either as a global-muon or as an arbitrated tracker-muon. Studied in MUO-10-004.
This identification criteria is designed to be highly efficienct, for prompt muons, as well as from muons from heavy and light quark decays.
Please consider complementing it by applying impact parameter cuts is used in analyses with prompt muon signals.
Note: For multi-muon analysis using data reconstructed with older than CMSSW_9_2_0 release the Loose Muon id should be complemented with a DeltaR cut between the muon pairs (DeltaR<0.02) in order to suppress contribution from split tracks. (See details on G. Petrucciani's talk)

TWIKI revisions documenting the ID version First CMSSW release with corresponding selector implemented
CMSSW_7_4_X CMSSW_7_6_X CMSSW_8_0_X Any higher release
revision4 - now ≥CMSSW_7_4_0 ≥CMSSW_7_6_0 ≥CMSSW_8_0_0 Any higher release

Medium Muon

Loose muon (i.e. PF muon that is either a global or an arbitrated tracker muon) with additional track-quality and muon-quality requirements. Described in this presentation by C. Botta & G. Petrucciani.
This identification criteria is designed to be highly efficienct for prompt muons and for muons from heavy quark decays. Please consider complement it by impact parameter cuts on top of it, if you plan to use it to recostruct signatures with prompt muon decays.

The following boolean selector is equivalent to the set of cuts in the table below, please note that the selector is available only for CMSSW_7_4_2 and above. Otherwise the cuts can to be implemented "by hand" according to the instructions in the table below.

TWIKI revisions documenting the ID version First CMSSW release with corresponding selector implemented
CMSSW_7_4_X CMSSW_7_6_X CMSSW_8_0_X Any higher release
revision4 - now ≥CMSSW_7_4_2 ≥CMSSW_7_6_0 ≥CMSSW_8_0_0 Any higher release

Tight Muon

Global muon with additional muon-quality requirements. Studied in MUO-10-002 and MUO-10-004; widely used in physics analyses. Tight Muon ID selects a subset of the Particle-Flow muons.

TWIKI revisions documenting the ID version First CMSSW release with corresponding selector implemented
CMSSW_7_4_X CMSSW_7_6_X CMSSW_8_0_X Any higher release
revision4 - now ≥CMSSW_7_4_0 ≥CMSSW_7_6_0 ≥CMSSW_8_0_0 Any higher release

Soft Muon

Developed in BPH. For more details, see I. Krätschmer's talk.

TWIKI revisions documenting the ID version First CMSSW release with corresponding selector implemented
CMSSW_7_4_X CMSSW_7_6_X CMSSW_8_0_X Any higher release
revision4 - now ≥CMSSW_7_4_0 ≥CMSSW_7_6_0 ≥CMSSW_8_0_0 Any higher release

NOTE: Please consider this option ONLY if you do not make use of the Particle-Flow event description in your analysis. In case you do, start from the Loose ID and then consider possible further quality cuts.

HighPt Muon

This selection is aimed to the best reconstruction of the muon track parameters for high-pT muons (pT > 200 GeV), without relying on external information in the event. In this high-pT region, the muon detectors can improve the momentum resolution of the inner tracker.

Starting from 10_4_X two cuts in the selector have been changed (see table below) to recover an inefficiency observed in data (2-3%) with increasing momentum. The criteria for matched segments close to the detector cracks, and the global valid hits criteria were not fully optimized for high energetic muons that shower. Despite the fact the updated selector is only accessible in 10_4_X we recommend to use the new selection definition for the full run 2 (2016, 2017 and 2018 data sets, if the analyses are not yet approved) since the inefficiency is already visible in 2016 data.

TWIKI revisions documenting the ID version First CMSSW release with corresponding selector implemented
CMSSW_7_4_X CMSSW_7_6_X CMSSW_8_0_X Any higher release
revision1 - now ≥CMSSW_7_4_0 ≥CMSSW_7_6_0 ≥CMSSW_8_0_0 Any higher release

NOTE: The High-pT selection does not use the Particle-Flow algorithm. Please consider this option ONLY if you do not use the Particle-Flow event description in your analysis. If you do, start from the Loose (or Tight) ID and then consider possible addition (or removal) of further quality cuts.

NOTE 2: Muon pT assignment details When using the High-pT selector, you should obtain the muon momentum from the muon track determined by the TuneP algorithm. To have access to the best muon track determined by the TuneP algorithm and its type, you can use the following functions, respectively:

reco::TrackRef tunePBestTrack = recoMu.tunePMuonBestTrack();
reco::Muon::MuonTrackType tunePBestTrackType = recoMu.tunePMuonBestTrackType();
The pT assignment as obtained from the TuneP algorithm can be used anyway, independently of the adopted selection. Anyhow it is recommended not to use it directly for analyses that make use of Particle-Flow AND rely on quantities computed on the basis of the PF muon pT (e.g. PF MET). In fact, when using Particle-Flow the muon pT assignment can be further adjusted on the basis of the global event description. In this case, it is therefore advisable to stick with the estimation of the muon pT made by PF.

HighPt Tracker Muon

A small variation with respect to the previous seletor, tries to improve the reconstruction for boosted Z, in which two close-by high-pT muons (pT > 200 GeV) may appear. As the muon is not required to be a global muon, the momentum resolution might be degraded with respect to the previous selector.

NOTE: Same consideration about the usage of Particle-Flow algorithms as for the high-pT identification applies here.

Displaced Standalone Muon

This selection targets displaced muon produced from the decay of long-lived particles in the outer tracker layers and beyond. Such muons can only be reconstructed in the muon system (no tracker track). This selection relies on the displaced standalone reconstruction to which identification criteria are applied. The displaced standalone reconstruction is similar to the usual standalone reconstruction with two differences in order to improve the detection of muon not produced at the beampsot:

  • The seeding step is similar to the one used in cosmic muon reconstruction and autorizes the muon to come across various CMS angle and not only from the beamspot.
  • The pT refit do not include any constrain to the beamspot
More information about displaced standalone reconstruction can be found in AN-2015/035. The displaced standalone reconstruction is not a reco muon but belongs to the reco track class. You can find below an example of how to acess to the displaced standalone muon collection:
edm::Handle<std::vector<reco::Track>> dSAmuons;
dSAmuons=cms.InputTag('displacedStandaloneMuons');

The displaced standalone ID will be part of the official muon selector list in CMSSW_12_0_X (summer 2021). If you wish to use it for earlier releases then you need to apply the set of cuts listed in the table below. For more infornation you can also look at this presentation.

Selection description Technical implementation Purpose
At least twelve muon hits hitPattern().numberOfValidMuonCSCHits() + hitPattern().numberOfValidMuonDTHits() > 12 This selection is equivalent to requiring 3 segments in the endcaps and 2 in the barrel. Supress fake muons and ensure a reliable pT
At least 18 muon hits if the muon crosses only DT chambers if (hitPattern().numberOfValidMuonCSCHits() == 0 ) hitPattern().numberOfValidMuonDTHits() > 18 Suppress background for poorly measured muons and ensure reliable reconstruction
χ2/ndof of the displaced standalonne track fit < 2.5 normalizedChi2() < 2.5 Suppress background for poorly measured muons and ensure reliable reconstruction
The pT relative error of the displaced standalone track is less than 100% ptError() / pt() < 1. ensure acceptable pT, resolution and charge assignment

Trigger Identification

Muon HLT reconstruction in 2018 introduced identification requirements, a simple ID selection based on robust inputs that can be used online.

So starting from 10_0_X the selector is included in the release in DataFormat/MuonReco/interface/MuonSelectors.h
Link to DataFormat/MuonReco/interface/MuonSelectors.h for CMSSW_10_0_X
The selector is implemented in DataFormat/MuonReco/src/MuonSelectors.cc
Link to DataFormat/MuonReco/src/MuonSelectors.cc for CMSSW_10_0_X.

bool muon::isLooseTriggerMuon(const reco::Muon& muon){

  // Requirements:
  // - no depencence on information not availabe in the muon object
  // - use only robust inputs

  // Tracker track matched with at least one muon segment (in any station) in both X and Y coordinates (> 3 sigma) ( TMOneStationTight) and arbitrated.
  // Loose requirement, which can be tightened further (e.g., by requiring at least two matched segments) if needed.
  bool tk_id = muon::isGoodMuon(muon, TMOneStationTight);
  if ( not tk_id ) return false;

  //  Cut on number of tracker layers with hits > 5. To guarantee a good pT measurement, for which some minimal number of measurement points in the tracker is needed.
  bool layer_requirements = muon.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 &&
    // Number of pixel layers > 0. Also suppresses muons from decays in flight. 
    muon.innerTrack()->hitPattern().pixelLayersWithMeasurement() > 0;

  // chi2/ndof of the global-muon track fit < 20 only if it is global. To further suppress muons from decays in flight.
  bool global_requirements = (not muon.isGlobalMuon()) or muon.globalTrack()->normalizedChi2()<20;

  // Muon segments in at least two muon stations or expected number of matched stations less than two
  bool match_requirements = (muon.expectedNnumberOfMatchedStations()<2) or (muon.numberOfMatchedStations()>1);
  return layer_requirements and global_requirements and match_requirements;
}

In-time muon selector

This selector is designed to discard out-of-time muons. You can quickly check if a muon is on time using the corresponding flag. If available, this selector trusts the RPC time, otherwise it takes the value calculated from the DT/CSC. This selector rejects about 0.08% of the muons with a mis-tagging efficiency of 0.000002%. For analyses using muon::CutBasedTightId out-of time muons should not be an issue, for looser muon selections it might be an issue. More details can be found in this talk by Piotr Traczyk.

This selector is available starting from CMSSW_10_1_X with the name InTimeMuon.
It is defined in DataFormats/MuonReco/interface/MuonSelectors.h. Link to DataFormat/MuonReco/src/MuonSelectors.h for CMSSW_10_1_X. Its implementation can be found in /DataFormats/MuonReco/src/MuonSelectors.cc of your release. Link to DataFormats/MuonReco/src/MuonSelectors.cc for CMSSW_10_1_X.

Muon Isolation

Recommended recipes for isolation criteria. Isolation criteria are also implemented as selector in DataFormat/MuonReco/interface/Muon.h.

Particle-Flow isolation:

PF-based combined relative isolation with Δ&beta corrections (see here) for PU mitigation, uses a (ΔR) cone size of 0.4 and is defined as follows:

  • (∑pT(ch.had from PV) + max(0, ∑ET(neut.had) + ∑ET(phot) − 0.5*∑pT(ch.had from PU)))/pT(μ)

The isolation selectors are defined in DataFormats/MuonReco/interface/Muon.h. Here the CMSSW_9_4X version.
They are implemented in DataFormats/MuonReco/src/Muon.cc. Here the CMSSW_9_4X version.

Working point Muon selector Cut value efficiency
Very Loose Muon::PFIsoVeryLoose 0.4  
Loose Muon::PFIsoLoose 0.25 ε~0.98
Medium Muon::PFIsoMedium 0.20  
Tight Muon::PFIsoTight 0.15 ε~0.95
Very Tight Muon::PFIsoVeryTight 0.10  
Very very Tight Muon::PFIsoVeryVeryTight 0.05  

Tracker-based Isolation

The tracker based relative isolation is computed using tracks from the leading PV in the event, which are in a cone of size (ΔR) < 0.3.

  • ∑pT(tracker tracks from PV)/pT(μ)

The isolation selectors are defined in DataFormats/MuonReco/interface/Muon.h. Here the CMSSW_9_4X version.
They are implemented in DataFormats/MuonReco/src/Muon.cc. Here the CMSSW_9_4X version.

Working point Muon selector Cut value efficiency
Loose Muon::TkIsoLoose 0.10 ε~0.98
Tight Muon::TkIsoTight 0.05 ε~0.95

Mini Isolation

Miniisolation allows to recover efficiency when muons are produced in the decay chain of a boosted object. In such cases, it is likely that, when the boost is large, the muon overlaps with a jet produced in the same decay chain, failing a standard isolation cut. Miniisolation is constructed by defining a cone whose radius varies with the pt 0.2 and 0.05. Isolation is then calculated for that muon on that cone, reducing the probability of the overlap for more boosted topologies. More information on the definition of miniiso and its performance can be found here. Four working points are provided in the standard selectors, which are calculated using effective area corrections.

Multi Isolation

Multiisolation is defined to select muons coming from prompt decays from muons coming from other sources. One working point is supported: a muon passes the Muon::MultiIsoMedium selector if it passes requirements in miniiso, on the pt of the closest jet and on the relative pt of the muon and the closest jet.

PUPPI isolation

NOT SUPPORTED YET

Advanced methods for identification and isolation

Soft Muon MVA

The soft muon MVA has been initially developed for the Bmm4 analysis, and aims at reducing the fake rate from hadrons for low pT muons originating from B hadron in the barrel. It consist of a BDT trained for global muons, with pT > 4 GeV and |η| < 1.4, coming from Bs/d mesons.

It is present in miniAOD up to CMSSW_10_1_X and you can find the main documentation of the Soft Muon MVA in this link.

Lepton MVA

The lepton MVA has been developed in the context of the ttH multilepton and some SUSY multilepton analyses. It is trained to discriminate fake muons in a semileptonic ttbar sample (mainly leptonic B decays) against prompt leptons in a ttH sample. There is a twiki documenting the main features of the MVA link, and there you can also find links to talks on the performance of some of the working points. You can find all the details of the most recent training in the AN supporting the ttH multilepton (AN2018_098).

The current lepton MVA which is present in miniAOD up to CMSSW_10_4_X is buggy (although the discriminant is reasonably performant). It was fixed in CMSSW_10_6_X for the UL campaign.

Note for NanoAOD user: the miniAOD selector is stored in the NanoAOD (as Muon_mvaId). However, there exists an enhanced version of the lepton MVA, provided by the ttH multilepton group (Muon_mvaTTH) that is slightly more performant than the miniAOD one, provided by the POG, as it uses the deep flavor of the closest jet. Therefore, the score of the two variables is not necessarily consistent.

Muon Trigger

2017 Data

Details about the muon HLT reconstruction and the trigger paths to be used can be checked in MuonHLT2017

2016 Data

Recommended SingleMuon and DoubleMuon trigger paths for 2016 data to be used with CMSSW 80X.

N.B.:
These recommendations refer only to intermediate/high-pT muon triggers (pT > ~10-20 GeV).
For muon triggers with lower pT thresholds (e.g. for Onia or B-physics analyses), please refer to BPH PAG.
For cross triggers with muon legs, please refer to your PAG HLT contact.

Event type Suggested trigger combination Suggested minimal offline cuts on triggering muon(s)
Single muon, intermediate pT (> ~25 GeV) HLT_IsoMu24_v* OR HLT_IsoTkMu24_v* pT > 26 GeV, abs( η ) < 2.4; Loose/Medium/Tight ID; Loose/Tight PF comb. rel. isolation (dBeta)
Single muon, high pT (> ~50 GeV) HLT_Mu50_v* ( OR HLT_TkMu50_v* starting from run 274954 onwards) pT > 53 GeV, abs( η ) < 2.4; HighPt ID; Loose trk. rel. iso.
Double muon, intermediate pT (> ~10-20 GeV) HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_v* OR HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_v* OR HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_v* OR HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_DZ_v* ALERT! See the remark below pT > 10-20 GeV, abs( η ) < 2.4; Loose/Medium/Tight ID Loose PF comb. rel. isolation (dBeta)

Important remark: The double muon paths without the DZ filter (HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_v* || HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_v*) have been prescaled in run H. In addition, the version of the path with the DZ filter HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_v* || HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_DZ_v* were inefficient in the dataset affected by the HIPs. That is why on the full 2016 dataset, the recommendation is to use the noDZ OR DZ paths (equivalent to use the noDZ only in run BCDEFG and the DZ version only in run H)

Other remarks:

  • Offline muons selected for analysis should always be associated to the HLT objects that triggered the event. Recommended matching criterion: ΔR(HLT object, offline muon) < 0.1.
  • For SingleMuon (intermediate pT) and DoubleMuon triggers, we strongly recommend to always use the logical OR of two paths, one based L3Muons ( (Iso)Mu ) and the other on TrackerMuons ( (Iso)TkMu ).
  • To increase the efficiency in events with two or more muons, it is possible to use a combination of DoubleMuon and SingleMuon (intermediate pT) triggers:
    HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_v* || HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_v* || HLT_IsoMu22_v* || HLT_IsoTkMu22_v*

2015 Data and MC

Recommended SingleMuon and DoubleMuon trigger paths for 2015 data and MC to be used with CMSSW 74X and 76X.

N.B.:
These recommendations refer only to intermediate/high-pT muon triggers (pT > ~10-20 GeV).
For muon triggers with lower pT thresholds (e.g. for Onia or B-physics analyses), please refer to BPH PAG.
For cross triggers with muon legs, please refer to your PAG HLT contact.

Event type Suggested trigger combination Suggested minimal offline cuts on triggering muon(s)
Single muon, intermediate pT (> ~20 GeV) HLT_IsoMu20_v* OR HLT_IsoTkMu20_v* pT > 22 GeV, abs( η ) < 2.4; Loose/Medium/Tight ID; Loose/Tight PF comb. rel. isolation (dBeta)
Single muon, high pT (> ~45 GeV) HLT_Mu45_eta2p1_v* pT > 48 GeV, abs( η ) < 2.1; HighPt ID; Loose trk. rel. iso.
HLT_Mu50_v* pT > 53 GeV, abs( η ) < 2.4; HighPt ID; Loose trk. rel. iso.
Double muon, intermediate pT (> ~10-20 GeV) HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_v* OR HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_DZ_v* pT > 10-20 GeV, abs( η ) < 2.4; Loose/Medium/Tight ID Loose PF comb. rel. isolation (dBeta)
Important remark: Given the large number of ID/isolation/trigger combinations, the Muon POG does not plan to provide central efficiencies and scale factors for all of them. Priority will be given to the combinations listed in the table above and based on the needs of the majority of analyses.

Other remarks:

  • Offline muons selected for analysis should always be associated to the HLT objects that triggered the event. Recommended matching criterion: ΔR(HLT object, offline muon) < 0.1.
  • For SingleMuon (intermediate pT) and DoubleMuon triggers, we strongly recommend to always use the logical OR of two paths, one based L3Muons ((Iso)Mu) and the other on TrackerMuons ((Iso)TkMu).
  • To increase the efficiency in events with two or more muons, it is possible to use a combination of DoubleMuon and SingleMuon (intermediate pT) triggers:
    HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_v* || HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_DZ_v* || HLT_IsoMu20_v* || HLT_IsoTkMu20_v*
    However, efficiencies and scale factors for this "grand combination" will not be provided by the Muon POG in time for the December '15 Jamboree.

SimHit Muon matching (since CMSSW_9_4_X)

A SimHit based classifier has been integrated with the standard reconstruction since CMSS_9_4_X. The information is available as a ValueMap of MuonSimInfo aligned with the reco::muon collection for AOD ( Check details), for MIniAOD only a summary of MuonSimInfo is integrated into pat::Muon. ( Check details.

WARNING In python for some reason pyROOT treats simType() enum output as unsigned number instead of a signed int. For example instead of -10 you would get 4294967286. To fix that use:

def fix_sign(input):
    if (input & 0x80000000):
        return input - 0x100000000
    else:
        return input

CLASSIFICATION For each RECO muon, match to SIM particle, and then:

  • If the SIM is not a Muon, label as Punchthrough (1) except if it is an electron or positron (11)
  • If the SIM is a Muon, then look at it's provenance.
    • the SIM muon is also a GEN muon, whose parent is NOT A HADRON AND NOT A TAU, classify as "primary" (4)
    • the SIM muon is also a GEN muon, whose parent is HEAVY FLAVOURED HADRON OR A TAU, classify as "heavy flavour" (3)
    • classify as "light flavour/decay" (2)

In any case, if the tracking particle is not preferentially matched back to the same RECO muon, label as Ghost (flip the classification). The classification is done using two set of flags: MuonSimType and ExtendedMuonSimType. Most users will be happy with the shorter primary classification type.

enum MuonSimType {
    Unknown                     = 999,
    NotMatched                  = 0,
    MatchedPunchthrough         = 1,
    MatchedElectron             = 11,
    MatchedPrimaryMuon          = 4,
    MatchedMuonFromHeavyFlavour = 3,
    MatchedMuonFromLightFlavour = 2,
    GhostPunchthrough           = -1,
    GhostElectron               = -11,
    GhostPrimaryMuon            = -4,
    GhostMuonFromHeavyFlavour   = -3,
    GhostMuonFromLightFlavour   = -2
  };

  enum ExtendedMuonSimType {
    ExtUnknown                        = 999,
    ExtNotMatched                     = 0,
    ExtMatchedPunchthrough            = 1,
    ExtMatchedElectron                = 11,
    MatchedMuonFromGaugeOrHiggsBoson  = 10,
    MatchedMuonFromTau                = 9,
    MatchedMuonFromB                  = 8,
    MatchedMuonFromBtoC               = 7,
    MatchedMuonFromC                  = 6,
    MatchedMuonFromOtherLight         = 5,
    MatchedMuonFromPiKppMuX           = 4,
    MatchedMuonFromPiKNotppMuX        = 3,
    MatchedMuonFromNonPrimaryParticle = 2,
    ExtGhostPunchthrough              = -1,
    ExtGhostElectron                  = -11,
    GhostMuonFromGaugeOrHiggsBoson    = -10,
    GhostMuonFromTau                  = -9,
    GhostMuonFromB                    = -8,
    GhostMuonFromBtoC                 = -7,
    GhostMuonFromC                    = -6,
    GhostMuonFromOtherLight           = -5,
    GhostMuonFromPiKppMuX             = -4,
    GhostMuonFromPiKNotppMuX          = -3,
    GhostMuonFromNonPrimaryParticle   = -2
};

FLAVOUR of the muon is also stored, following this logic:

  • for non-muons: 0
  • for primary muons: 13
  • for non primary muons: flavour of the mother: std::abs(pdgId) of heaviest quark, or 15 for taus.

Further details details can be checked in this talk by D.Kovalskyi

Trigger Muon matching (since CMSSW_10_2_X)

The matching information between the offline reconstructed muon and the trigger object muon can be easily be accessed in the collection pat::Muon. There are three methods available. The method

bool triggered( const char * pathName ); 

can be used to determine whether a muon has fired a given path. For instance,

muon->triggered("HLT_IsoMu24_v*");

Additonally the methods

bool pat::TriggerObjectStandAlone* hltObject(const size_t idx=0);

and

bool pat::TriggerObjectStandAlone* l1Object(const size_t idx=0);

can be used to obtain the L1 and HLT objects respectively. A null pointer is returned if no matched object is found. The implementation can be found here and additional details can be found in here.

-- PierluigiBortignon - 2021-01-20

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2021-02-17 - AliceFlorent
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback