reco::Muon
or pat::Muon
, which have equivalent functionalities.
CMSSW_5_3_10
all the standard muon IDs are available as boolean selectors, as described HEREbool muon::isLooseMuon (const reco::Muon & recoMu);Particle identified as a muon by the Particle Flow event reconstruction. Studied in MUO-10-004
Plain-text description | Technical description | Comments |
---|---|---|
Particle-Flow muon id | recoMu.isPFMuon() |
Can be complemented by muon quality cuts similar to those used in the Tight Muon selection. |
Is Global OR Tracker Muon | recoMu.isGlobalMuon() || recoMu.isTrackerMuon() |
Avoid using muons which are only Standalone Muons. (~0.01% of PF muons) |
Plain-text description | Technical description | Comments |
---|---|---|
Tracker track matched with at least one muon segment (in any station) in both X and Y coordinates (< 3σ) ( TMOneStationTight ) and arbitrated |
muon::isGoodMuon(recoMu, TMOneStationTight) |
Loose requirement, which can be tightened further (e.g., by requiring at least two matched segments) if needed |
Cut on number of tracker layers with hits > 5 | recoMu.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 |
To guarantee a good pT measurement, for which some minimal number of measurement points in the tracker is needed. Also suppresses muons from decays in flight. |
Number of pixel layers > 0 | recoMu.innerTrack()->hitPattern().pixelLayersWithMeasurement() > 0 |
To further suppress muons from decays in flight. |
Track high-purity flag | recoMu.innerTrack()->quality(reco::TrackBase::highPurity) |
Rejects bad quality tracks, basically just few outliers |
Loose transverse and longitudinal impact parameter cuts, dxy < 0.3 cm and dz < 20 cm w.r.t. the primary vertex | fabs(recoMu.innerTrack()->dxy(vertex->position())) < 0.3 && fabs(recoMu.innerTrack()->dz(vertex->position())) < 20. |
Loose compatibility with the PV or rather with the beamspot |
bool muon::isSoftMuon(const reco::Muon & recoMu, const reco::Vertex & vtx);
Plain-text description | Technical description | Comments |
---|---|---|
Tracker track matched with at least one muon segment (in any station) in both X and Y coordinates (< 3σ) ( TMOneStationTight ) and arbitrated |
muon::isGoodMuon(recoMu, TMOneStationTight) |
Loose requirement, which can be tightened further (e.g., by requiring at least two matched segments) if needed |
Cut on number of tracker layers with hits > 5 | track()->hitPattern().trackerLayersWithMeasurement() > 5 |
To guarantee a good pT measurement, for which some minimal number of measurement points in the tracker is needed. Also suppresses muons from decays in flight. |
Number of pixel layers > 1 | recoMu.innerTrack()->hitPattern().pixelLayersWithMeasurement() > 1 |
To further suppress muons from decays in flight. |
χ2/ndof of the tracker-muon track fit < 1.8 | recoMu.innerTrack()->normalizedChi2() < 1.8 |
To suppress hadronic punch-through and muons from decays in flight |
Loose transverse and longitudinal impact parameter cuts, dxy < 3 cm and dz < 30 cm w.r.t. the primary vertex | fabs(recoMu.innerTrack()->dxy(vertex->position())) < 3. && fabs(recoMu.innerTrack()->dz(vertex->position())) < 30. |
Loose compatibility with the PV or rather with the beamspot. |
bool muon::isTightMuon(const reco::Muon & recoMu, const reco::Vertex & vtx);Global muon with additional muon quality requirements. Studied in MUO-10-002
Plain-text description | Technical description | Comments |
---|---|---|
The candidate is reconstructed as a Global Muon | recoMu.isGlobalMuon() |
|
Particle-Flow muon id | recoMu.isPFMuon() |
the exclusive effect of this requirement is very small, i.e. PFMuon is keeping almost all Tight Muons without this cut |
χ2/ndof of the global-muon track fit < 10 | recoMu.globalTrack()->normalizedChi2() < 10. |
To suppress hadronic punch-through and muons from decays in flight (see CMS AN 2008/098![]() |
At least one muon chamber hit included in the global-muon track fit | recoMu.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 |
To suppress hadronic punch-through and muons from decays in flight. |
Muon segments in at least two muon stations This implies that the muon is also an arbitrated tracker muon, see SWGuideTrackerMuons |
recoMu.numberOfMatchedStations() > 1 |
To suppress punch-through and accidental track-to-segment matches. Also makes selection consistent with the logic of the muon trigger, which requires segments in at least two muon stations to obtain a meaningful estimate of the muon pT. |
Its tracker track has transverse impact parameter dxy < 2 mm w.r.t. the primary vertex | fabs(recoMu.muonBestTrack()->dxy(vertex->position())) < 0.2 Or dB() < 0.2 on pat::Muon [1] |
To suppress cosmic muons and further suppress muons from decays in flight (see CMS AN 2008/098![]() The 2 mm cut preserves efficiency for muons from decays of b and c hadrons. It is a loose cut and can be tightened further with minimal loss of efficiency for prompt muons if background from cosmic muons is an issue. Another way to obtain a better cosmic-ray suppression is to complement the dxy cut with a cut on the opening angle α or use a dedicated cosmic-id algorithm (see Section 7.1 of MUO-10-004 ![]() |
The longitudinal distance of the tracker track wrt. the primary vertex is dz < 5 mm | fabs(recoMu.muonBestTrack()->dz(vertex->position())) < 0.5 |
Loose cut to further suppress cosmic muons, muons from decays in flight and tracks from PU. innerTrack() is also supported for dz cut, as the performance of the two is very close. |
Number of pixel hits > 0 | recoMu.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 |
To further suppress muons from decays in flight. |
Cut on number of tracker layers with hits >5 | recoMu.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 |
To guarantee a good pT measurement, for which some minimal number of measurement points in the tracker is needed. Also suppresses muons from decays in flight. |
dB()
method of the pat::Muon
uses the version in IPTools, so there are tiny differences between the values returned by dxy(vertex->position())
and dB()
.
bool muon::isHighPtMuon(const reco::Muon & recoMu, const reco::Vertex & vtx); bool muon::isHighPtMuon(const reco::Muon & recoMu, const reco::Vertex & vtx, muon::TunePType = muon::improvedTuneP);WARNING: the HighPt selector uses by default the new Tune P momentum assignment. The last (optional) parameter:
enum TunePType{defaultTuneP, improvedTuneP}
is used
to choose between old and new Tune P, but it defaults to new Tune P.
To have access to the best muon track determined by the new Tune P
algorithm you can use the function:
reco::TrackRef muon::improvedMuonBestTrack(const reco::Muon & recoMu, muon::improvedTuneP);Please pay attention that
reco::Muon::muonBestTrack()
will continue to
give the best track determined by the OLD Tune P, as the other methods retrieving the kinematical variables like reco::Muon::p4()
, reco::Muon::pt()
, etc...
Hence when you use the New Tune P and the New HighPt Muon selector you have to obtain the muon momentum from the correct muon track by the improvedMuonBestTrack
method.
The above code is EQUIVALENT to the recipe which has been existing since quite some time and is given here below.
The updated version of the muon momentum assignment logic (i.e. new Tune P) is available starting from CMSSW_5_3_6_patch1 and CMSSW_5_3_7 (backports to 5XY and 44X are also available, see below). Thanks to internal rejection of misreconstructed tracks based on dpT/pT this has much improved handling of momentum misassignment, which makes it possible to loosen the cut on tracker layers to 5, which is the value used in the Tight muon ID.
To use the new version of TuneP you have to follow these steps: V09-04-03-02 DataFormats/MuonReco
(if you have problems getting CMSSW to compile please do also addpkg RecoMuon/MuonIdentification
).
#include "DataFormats/MuonReco/interface/MuonCocktails.h"
add this to your analysis code
reco::TrackRef cktTrack = (muon::tevOptimized(*recoMu, 200, 17., 40., 0.25)).first;
call to get the optimal muon track
cktTrack->pt()
- to get the pT of the muon.
V09-01-05-01 DataFormats/MuonReco
.
reco::TrackRef cktTrack = (muon::tevOptimized(*recoMu, 200, 30., 0., 0.25));
.
cktTrack->ptError()/cktTrack->pt()<0.3
recoMu.muonBestTrack
(impact parameter cuts) need to be applied to cktTrack
since this is the new best track now.
tevOptimized
function istelf:
The modified TuneP algorithm adds track selection based on track dpT/pT, the threshold for this cut is controlled by the last (fifth) parameter of muon::tevOptimized
. This parameter is only present in the new version of the code. The recommended value is 0.25. Passing a value of -1 will switch the dpT/pT cut off altogether, effectively reverting to the old version of TuneP. Parameters #3 and #4 are thresholds for switching between track fits in the TuneP logic. In CMSSW_53X the default values of the parameters are muon::tevOptimized(*recoMu, 200, 4., 6., -1.)
, which exactly reproduces the old behavior of the algorithm, 4 and 6 are the old thresholds.
bool muon::isHighPtMuon(const reco::Muon & recoMu, const reco::Vertex & vtx, muon::TunePType = muon::defaultTuneP);The old HighPT Muon selection differs from the Tight Muon selection in 3 points:
track()->hitPattern().trackerLayersWithMeasurement() > 8
is applied in order to suppress muons with largely mis-measured pT Algorithm | Type | Expression | PU correction | Cone size (ΔR) | Tight cut | Loose cut |
---|---|---|---|---|---|---|
Subdetector based | Tracker relative | (∑pT(TRK))/pT | none | 0.3 | 0.05 | 0.10 |
PF based | Combined relative | (∑ET(chHad from PV)+∑ET(neutHad)+∑ET(photons))/pT | Reference correction using DeltaB corrections (for reference see here![]() |
0.4 | 0.12 | 0.20 |
PF based | MVA | ![]() |
const MuonPFIsolation& pfIsolationR03() ///Cone of 0.3 const MuonPFIsolation& pfIsolationR04() /// Cone of 0.4-SuggestedThe MuonPFIsolation struct includes the following members:
DataFormats/MuonReco/interface/MuonSelectors.h
Plain-text description | Technical description | Comments |
---|---|---|
The candidate is reconstructed as a Global Muon | recoMu.isGlobalMuon() |
Requiring that this muon is also PF muon leads to PFTight selection |
χ2/ndof of the global-muon track fit < 10 | recoMu.globalTrack()->normalizedChi2() < 10. |
To suppress hadronic punch-through and muons from decays in flight (see CMS AN 2008/098![]() As showering muons typically have larger χ2/ndof (see Section 2.4.1 of CMS AN 2011/278 ![]() |
At least one muon chamber hit included in the global-muon track fit | recoMu.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 |
To suppress hadronic punch-through and muons from decays in flight [1]. |
Muon segments in at least two muon stations This implies that the muon is also an arbitrated tracker muon, see SWGuideTrackerMuons |
recoMu.numberOfMatchedStations() > 1 |
To suppress punch-through and accidental track-to-segment matches. Also makes selection consistent with the logic of the muon trigger, which requires segments in at least two muon stations to obtain a meaningful estimate of the muon pT. |
Its tracker track has transverse impact parameter dxy < 2 mm w.r.t. the primary vertex [2] | fabs(recoMu.innerTrack()->dxy(vertex->position())) < 0.2 Or dB() < 0.2 on pat::Muon [3] |
To suppress cosmic muons and further suppress muons from decays in flight (see CMS AN 2008/098![]() The 2 mm cut preserves efficiency for muons from decays of b and c hadrons. It is a loose cut and can be tightened further with minimal loss of efficiency for prompt muons if background from cosmic muons is an issue. Another way to obtain a better cosmic-ray suppression is to complement the dxy cut with a cut on the opening angle α or use a dedicated cosmic-id algorithm (see Section 7.1 of MUO-10-004 ![]() |
Number of pixel hits > 0 | recoMu.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 |
To further suppress muons from decays in flight. |
Number of tracker layers with hits > 8 [4] | track()->hitPattern().trackerLayersWithMeasurement() > 8 |
To guarantee a good pT measurement, for which some minimal number of measurement points in the tracker is needed. Also suppresses muons from decays in flight. |
reco::Muon
as GlobalMuonPromptTight
selector, which is returned by muon::isGoodMuon(recoMu, GlobalMuonPromptTight)
. More details can be found in the WorkBook section on muon identification.
dB()
method of the pat::Muon
uses the version in ÏPTools, so there are tiny differences between the values returned by dxy(vertex->position())
and dB()
.
recoMu.innerTrack()->hitPattern().numberOfValidTrackerHits() > 10
and is also supported to ease the transition: Plain-text description | Technical description | Comments |
---|---|---|
Tracker track matched with at least one muon segment (in any station) in both X and Y coordinates (< 3σ) ( TMOneStationTight ) and arbitrated |
muon::isGoodMuon(recoMu, TMOneStationTight) |
Loose requirement, which can be tightened further (e.g., by requiring at least two matched segments) if needed |
Plain-text description | Technical description | Comments |
---|---|---|
Tracker track matched with at least one muon segment (in any station) in both X and Y coordinates (< 3σ) ( TMOneStationTight ) and arbitrated |
muon::isGoodMuon(recoMu, TMOneStationTight) |
Loose requirement, which can be tightened further (e.g., by requiring at least two matched segments) if needed |
Number of hits in the tracker > 10 | recoMu.innerTrack()->hitPattern().numberOfValidTrackerHits() > 10 |
To guarantee a good pT measurement, for which some minimal number of measurement points in the tracker is needed. Also suppresses muons from decays in flight. |
Number of pixel layers > 1 | recoMu.innerTrack()->hitPattern().pixelLayersWithMeasurement() > 1 |
To further suppress muons from decays in flight. |
χ2/ndof of the tracker-muon track fit < 1.8 | recoMu.innerTrack()->normalizedChi2() < 1.8 |
To suppress hadronic punch-through and muons from decays in flight |
Loose transverse and longitudinal impact parameter cuts, dxy < 3 cm and dz < 30 cm w.r.t. the primary vertex | fabs(recoMu.innerTrack()->dxy(vertex->position())) < 3. && fabs(recoMu.innerTrack()->dz(vertex->position())) < 30. |
To further suppress muons from decays in flight. |
Plain-text description | Technical description | Comments |
---|---|---|
Particle-Flow muons out-of-the-box | PFCandidate that has pdgId = ±13 and muonRef() pointing to this muonStarting from CMSSW_4_4_0, can be accessed via isPFMuon() flag implemented in reco::Muon |
Can be complemented by muon quality cuts similar to those used in the Tight Muon selection by accessing the muonRef() in reco or by using PAT |
Algorithm | Type | Expression | Pile Up Correction | Cone size (ΔR) | Tight cut | Loose cut |
---|---|---|---|---|---|---|
Subdetector based | Combined relative | (∑pT(TRK)+∑ET(ECAL)+∑ET(HCAL))/pT | None | 0.3 | 0.10 | 0.15 |
Subdetector based | Tracker relative | (∑pT(TRK))/pT | None | 0.3 | 0.05 | 0.10 |
PF based | Combined relative | (∑ET(chHad from PV)+∑ET(neutHad)+∑ET(photons))/pT | Reference correction using DeltaB (for reference see here![]() |
0.4 | 0.12 | 0.20 |
const MuonPFIsolation& pfIsolationR03() ///Cone of 0.3 const MuonPFIsolation& pfIsolationR04() /// Cone of 0.4-SuggestedThe MuonPFIsolation struct includes the following members:
Reviewer/Editor and Date (copy from screen) | Comments |
---|
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
![]() |
eff_all.png | r1 | manage | 25.7 K | 2011-10-26 - 15:58 | SlavaValuev | Efficiencies for various cuts on Nhits and Nlayers, for 50 GeV simulated muons |