Skip to content

Prepare Run3_2024, Run3_2025 and Run3_2026 (shared MC + weight_base_cmb) - #300

Merged
kandrosov merged 22 commits into
cms-flaf:mainfrom
kandrosov:prepare-run3-2025
Aug 14, 2026
Merged

Prepare Run3_2024, Run3_2025 and Run3_2026 (shared MC + weight_base_cmb)#300
kandrosov merged 22 commits into
cms-flaf:mainfrom
kandrosov:prepare-run3-2025

Conversation

@kandrosov

@kandrosov kandrosov commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Enable Run3_2024, Run3_2025 and Run3_2026 in FLAF. There is no dedicated 2025 or 2026 MC campaign: all three years use Summer24 NanoAOD, but jet/PU/tau corrections differ, so AnaTuple production runs once per era.

Each production stores:

  • weight_base — all events, this year's luminosity (single-year runs)
  • weight_base_cmb — in-era residue split for a combined 2024+2025+2026 run

shared_mc lives on Run3_2024 only (modulus 38, 17:17:4 target matching recorded lumis). Run3_2025 and Run3_2026 set reuse_mc_from_era: Run3_2024 so Setup copies the 2024 MC list and the shared_mc split.

Other changes

  • Global aggregated cache producers (e.g. BtagShape) are HistTuple dependencies only when a correction names them via normCacheProducer
  • uncs_to_exclude missing an era key defaults to []
  • HistFromNtupleProducerTask batches booked histograms when the count (including Up/Down) exceeds hist_from_ntuple_max_hists
  • Period::Run3_2026 and HHbTag maps
  • Unit tests for shared_mc and histogram batching
  • Docs: eras, datasets, data-flow, 2024/2025/2026 caveats

Testing

GitLab integration pipeline 15535595 passed for all three analyses and all Run 3 eras (--test 1000, TestModel).

Comment thread config/Run3_2024/global.yaml Outdated
Comment thread config/Run3_2025/global.yaml Outdated
Comment thread Analysis/tasks.py Outdated
@cms-flaf-bot

Copy link
Copy Markdown
Collaborator

pipeline#15528718 started

@cms-flaf-bot

Copy link
Copy Markdown
Collaborator

pipeline#15528718 failed

@cms-flaf-bot

Copy link
Copy Markdown
Collaborator

pipeline#15534437 started

@cms-flaf-bot

Copy link
Copy Markdown
Collaborator

pipeline#15535232 started

@cms-flaf-bot

Copy link
Copy Markdown
Collaborator

pipeline#15534437 failed

@cms-flaf-bot

Copy link
Copy Markdown
Collaborator

pipeline#15535232 failed

@cms-flaf-bot

Copy link
Copy Markdown
Collaborator

pipeline#15535595 started

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 enables the Run3_2024, Run3_2025 and Run3_2026 eras in FLAF. Because there is no dedicated 2025/2026 MC campaign, all three years reuse the Summer24 NanoAOD, but since jet/PU/tau corrections differ, AnaTuple production runs once per era. It introduces a shared-MC residue split (a 17:17:4 target over modulus 38, matching the recorded luminosities) so each production can store both weight_base (full-sample denominator, single-year) and weight_base_cmb (in-era denominator, for a combined run). It also adds a memory-bounded histogram-batching path for HistFromNtupleProducerTask, a reuse_mc_from_era mechanism in Setup.py, and supporting docs/tests.

Changes:

  • Add shared-MC infrastructure: Common/shared_mc.py, denominator_cmb computation in anaTupleProducer.py, cache merging in MergeAnaTuples.py, and reuse_mc_from_era/shared_mc inheritance in Setup.py.
  • Enable Run3_2024/2025/2026 end-to-end: Period enum + HHbTagScores maps, new/updated era configs and dataset exceptions, and CI era lists.
  • Add hist_from_ntuple_max_hists batching (Analysis/histFromNtupleBatch.py) plus unit tests for batching and the residue split.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Common/shared_mc.py New residue-split helpers (Python + C++ expr) with range validation.
AnaProd/anaTupleProducer.py Computes denominator_cmb for shared-MC eras via in-era filter.
AnaProd/MergeAnaTuples.py Refactors cache combining into _combine_denominator_map, handles denominator_cmb.
Common/Setup.py Guards empty config; copies MC datasets and shared_mc from reuse_mc_from_era.
Analysis/histFromNtupleBatch.py New histogram-budget batching logic.
Analysis/HistProducerFromNTuple.py / Analysis/tasks.py Wire up --max-hists batching; scope global cache producers; robust uncs_to_exclude lookup.
include/AnalysisTools.h / include/HHbTagScores.h Add Run3_2026 enumerator and HHbTag maps.
`config/Run3_2024 2025
config/dataset_exceptions.yaml Extends exceptions for 2026 and new 2024 samples.
.github/workflows/*.yaml Add Run3_2026 to consistency/cross-section checks.
docs/** Documents eras, shared-MC weights, batching, and new-era steps.
test/test_shared_mc.py, test/test_histtuple_weight_base_branch.py, test/test_hist_from_ntuple_batch.py Unit tests for the split and batching.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread config/Run3_2024/global.yaml
@cms-flaf-bot

Copy link
Copy Markdown
Collaborator

pipeline#15535595 passed

@kandrosov kandrosov changed the title Prepare Run3_2024 and Run3_2025 (shared MC + weight_base_cmb) Prepare Run3_2024, Run3_2025 and Run3_2026 (shared MC + weight_base_cmb) Aug 14, 2026
@kandrosov
kandrosov merged commit 4a8a66a into cms-flaf:main Aug 14, 2026
7 checks passed
@kandrosov
kandrosov deleted the prepare-run3-2025 branch August 14, 2026 17:30
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.

3 participants