Skip to content

feat: implement CMS Type-1 MET correction in CorrectedMETFactory#1537

Open
alefisico wants to merge 5 commits intoscikit-hep:masterfrom
alefisico:fix/CorrT1METJet
Open

feat: implement CMS Type-1 MET correction in CorrectedMETFactory#1537
alefisico wants to merge 5 commits intoscikit-hep:masterfrom
alefisico:fix/CorrT1METJet

Conversation

@alefisico
Copy link
Copy Markdown
Contributor

Implements the full CMS Type-1 MET correction recipe in CorrectedMETFactory, addressing the remaining open item from #1064. (This feature was asked by @mcremone)

The previous fix (commit 6dfd4ad) corrected the sign and _orig reference bugs, but the factory still did not implement the proper Type-1 correction: it was missing muon subtraction, L1-only JEC, EM fraction cuts, and the CorrT1METJet low-pT jet collection.

This PR adds a new Type-1 mode that follows the official CMS procedure as described in the JME General Meeting slides (Feb 2026):

  1. Compute muon-subtracted raw pT and phi for each jet
  2. Apply L1-only and L1L2L3 JEC to the muon-subtracted raw pT
  3. Select jets passing pt_noMuL1L2L3 > 15 GeV and EM fraction < 0.9
  4. Vectorial correction: RawMET -= Σ(pt_noMuL1L2L3 - pt_noMuL1) for both Jet and CorrT1METJet collections

Behaviour

Type-1 mode is opt-in and backward compatible. Legacy behavior is completely unchanged when the new parameters are not provided.

# Construct with L1-only and L1L2L3 JEC correctors
met_factory = CorrectedMETFactory(name_map, jec_L1L2L3=jec_L1L2L3, jec_L1=jec_L1)

# Build with RawMET and (optionally) CorrT1METJet
corrected_met = met_factory.build(
    events.MET, corrected_jets,
    in_RawMET=events.RawMET,
    in_CorrT1METJets=events.CorrT1METJet,
)

The JEC correctors are duck-typed — both FactorizedJetCorrector and CorrectionLibJEC work.

Implementation details

  • JEC factors are computed once and reused across all JES/JER systematic variations
  • Helper functions return awkward.zip records (not tuples) for dask-awkward compatibility
  • Arrays are flattened before JEC calls and unflattened after, for CorrectionLibJEC compatibility
  • JES/JER variations use the ratio varied_pt / nominal_pt to scale pt_noMuL1L2L3, and re-apply the > 15 GeV cut
  • CorrT1METJet contribution stays nominal for JES/JER variations (it's not in corrected_jets)

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.

2 participants