Skip to content

Fix JetMET and Muon Scare#119

Merged
kandrosov merged 37 commits into
cms-flaf:mainfrom
aebid:Fix_JetMet_MuScare
Jun 9, 2026
Merged

Fix JetMET and Muon Scare#119
kandrosov merged 37 commits into
cms-flaf:mainfrom
aebid:Fix_JetMet_MuScare

Conversation

@aebid

@aebid aebid commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

This PR started as a continuation of the abandoned #111

After making the existing PR run, I further added a Muon ID (loose-configurable) requirement on MuScare to avoid crazy values that were harming MET corrections.

I also fixed a bug in JER smearing that was giving negative smear values for jets with no GEN match.

Then I reworked the jet corrections to use a combined getShiftedP4_Base that is now shared between fat jets and ak4 jets.

One proposed version was to have a separate CorrectionProvider instance for Jet and FatJet, but I do not know how to do this 🤷🏼‍♀️

@aebid

aebid commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@cms-flaf-bot please test

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14947205 started

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14947205 failed

@aebid

aebid commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@cms-flaf-bot please test

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14948307 started

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14948307 failed

@aebid

aebid commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@cms-flaf-bot please test

  • HH_bbWW_version=PR_87

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14956971 started

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14956817 failed

@aebid

aebid commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@cms-flaf-bot please test

  • HH_bbWW_version=PR_87

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14957204 started

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14956971 failed

@aebid

aebid commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@cms-flaf-bot please test

  • HH_bbWW_version=PR_87

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14957271 started

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14957204 failed

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14957271 passed

@aebid

aebid commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@kandrosov CI tests passed, ready for review

Freezing the jet corrections to an older version did not happen because all years do not have a similar folder structure.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CMS FLAF Corrections submodule to stabilize Jet/MET and Muon ScaRe corrections: it adds a second (VXBS) Muon ScaRe JSON path and introduces an ID-based guard for ScaRe application, fixes/modernizes JER smearing handling, and refactors jet/fatjet shifting to share a common implementation.

Changes:

  • Extend Muon ScaRe to support an alternate VXBS correction set and add an ID-selection gate to avoid pathological corrections.
  • Refactor jet/fatjet p4 shifting to a shared getShiftedP4_Base implementation and update JEC/JER tag mappings.
  • Add/refresh Muon ScaRe JSON payloads (including VXBS variants) and wire stage/config options in Corrections.py.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
MuonScaReProvider.h Adds support for a second (VXBS) correction set and ID-gated vectorized ScaRe application.
MuonEnergyScale_corr.py Wires VXBS ScaRe JSON, adds id_selection parameter, and expands variation definitions to cover multiple muon p4 representations.
mu.py Adjusts LowPt muon SF initialization/availability for Run3_2025/Run3_2026 eras.
jet.py Updates JEC/JER tag maps and switches to getShiftedP4_Jet / getShiftedP4_FatJet entrypoints.
jet.h Refactors jet/fatjet shifting into shared base logic and adds negative-JER-smear protection.
fatjet.py Changes FatJet SF branch naming (drops fatjetName prefix).
CorrectionsCore.py Adds a temporary Run3_2026 period mapping.
Corrections.py Adds configurable DY branch names and reworks muScaRe config/stage handling.
data/MUO/MuonScaRe/Run3-25Prompt-Summer24-NanoAODv15/muon_scalesmearing.json.gz Updates Muon ScaRe payload (LFS pointer changed).
data/MUO/MuonScaRe/Run3-25Prompt-Summer24-NanoAODv15/muon_scalesmearing_VXBS.json.gz Adds VXBS Muon ScaRe payload (new LFS pointer).
data/MUO/MuonScaRe/Run3-24CDEReprocessingFGHIPrompt-Summer24-NanoAODv15/muon_scalesmearing.json.gz Updates Muon ScaRe payload (LFS pointer changed).
data/MUO/MuonScaRe/Run3-24CDEReprocessingFGHIPrompt-Summer24-NanoAODv15/muon_scalesmearing_VXBS.json.gz Adds VXBS Muon ScaRe payload (new LFS pointer).
data/MUO/MuonScaRe/Run3-23DSep23-Summer23BPix-NanoAODv12/muon_scalesmearing.json.gz Updates Muon ScaRe payload (LFS pointer changed).
data/MUO/MuonScaRe/Run3-23DSep23-Summer23BPix-NanoAODv12/muon_scalesmearing_VXBS.json.gz Adds VXBS Muon ScaRe payload (new LFS pointer).
data/MUO/MuonScaRe/Run3-23CSep23-Summer23-NanoAODv12/muon_scalesmearing.json.gz Updates Muon ScaRe payload (LFS pointer changed).
data/MUO/MuonScaRe/Run3-23CSep23-Summer23-NanoAODv12/muon_scalesmearing_VXBS.json.gz Adds VXBS Muon ScaRe payload (new LFS pointer).
data/MUO/MuonScaRe/Run3-22EFGSep23-Summer22EE-NanoAODv12/muon_scalesmearing.json.gz Updates Muon ScaRe payload (LFS pointer changed).
data/MUO/MuonScaRe/Run3-22EFGSep23-Summer22EE-NanoAODv12/muon_scalesmearing_VXBS.json.gz Adds VXBS Muon ScaRe payload (new LFS pointer).
data/MUO/MuonScaRe/Run3-22CDSep23-Summer22-NanoAODv12/muon_scalesmearing.json.gz Updates Muon ScaRe payload (LFS pointer changed).
data/MUO/MuonScaRe/Run3-22CDSep23-Summer22-NanoAODv12/muon_scalesmearing_VXBS.json.gz Adds VXBS Muon ScaRe payload (new LFS pointer).

Comment thread Corrections.py
Comment thread mu.py Outdated
Comment thread MuonEnergyScale_corr.py Outdated
Comment thread MuonEnergyScale_corr.py Outdated
Comment thread jet.h
Comment thread jet.h
@aebid

aebid commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@cms-flaf-bot please test

  • HH_bbWW_version=PR_87

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14963015 started

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14963015 passed

@kandrosov kandrosov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fix met delta computations

Comment thread jet.py Outdated
Comment thread MuonEnergyScale_corr.py Outdated
@aebid

aebid commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@cms-flaf-bot please test

  • HH_bbWW_version=PR_87

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14977062 started

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#14977062 passed

@kandrosov kandrosov merged commit f6161c6 into cms-flaf:main Jun 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants