Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR description:
This PR adds the
muonBestTrackType()
as an int8 value to NanoAODs.The reason for this is to enable analyzers to detect occurrences of muons that are
isGlobal
and/orisTracker
, but whose default parameters are taken from the standalone muon fit. These are marked asmuonBestTrackType()==2
in miniAODs, but in nanoAODs there is currently no way of knowing - they may appear as perfectly good global and tracker muon that may even pass cut-based IDs and IP cuts, but in realty their momentum and impact parameters are very poorly measured.This issue has been known since more than 10 years, and some analyses like H->4l have been rejecting these muons in Run2.
Some examples of such muons in 2022 data are listed below.
The reason why the addition of this variable in nanoAODs was not proposed earlier was the belief that this behavior was pathological, and that the right solution would have been to fit it upstream.
Upon some investigation with @ferrico and @bellan, it turns out that the choice of the STA track as the best track happens in the PF post-cleaning step, with a logic that was specifically crafted in the PF development, which involves the MET assignment. PF conveners thus pointed out that changing this logic may have unwanted side effects and that from their perspective it is much safer to let concerned analyzers handle these cases if they wish.
We thus propose the addition of this variable in v15. The impact on nanoAOD size is negligible and there's no possible side effect.
PR validation:
Tested on a DYJetsToLL sample in 15_0_0_pre1; the size increase is 0.8 b/item.
Some examples of GLB/TK Muons with bestTrackType==2
Some examples, in case anybody is interested, taken from
/store/data/Run2022F/Muon/MINIAOD/22Sep2023-v2/2550000/086c7233-8352-473a-9def-3cca7b470cc7.root
(dataset: /Muon/Run2022F-22Sep2023-v2/MINIAOD):
In 361303:2183:4542134810
pt= 74.1754 eta= 0.223418 phi= -2.30594
pass: isGlobal, isTracker, isLooseMuon, isMediumMuon
Tracker: pt,eta,phi: 33.1955 0.222571 -2.26291; validFraction: 1 normalizedChi2: 0.608714
GLB: pt,eta,phi: 33.1846 0.222568 -2.26291 validFraction: 1 normalizedChi2 0.762897
In 361303:2184:4544165596
pt= 32.035 eta= -2.32739 phi= 0.388782
pass: isGlobal, isLooseMuon
Tracker: pt,eta,phi: 94.5429 -2.33026 0.403547 validFraction: 0.666667 normChi2 0.940081
GLB: pt,eta,phi: 63.6122 -2.33019 0.404392 validFraction: 1 normChi2 1.8665
In 361318:139:254795536
pt= 39.6768 eta= -1.23819 phi= -2.05707
pass: isTracker, isLooseMuon
Tracker: pt,eta,phi: 2.03231 -1.38233 -0.980531 validFraction: 0.714286 normChi2 9.18183
In 361318:140:255901697
pt= 28.8683 eta= 0.269369 phi= -1.65092
pass: isGlobal, isTracker, isLooseMuon, isMediumMuon
Tracker: pt,eta,phi: 20.5644 0.272467 -1.60871 validFraction: 1 normChi2 0.663753
GLB: pt,eta,phi: 20.5427 0.272464 -1.6087 validFraction: 1 normChi2 0.763495