Skip to content

New producer to read PU weights from ROOT files#351

Merged
nshadskiy merged 4 commits intomainfrom
pu_weight
May 7, 2026
Merged

New producer to read PU weights from ROOT files#351
nshadskiy merged 4 commits intomainfrom
pu_weight

Conversation

@sofiagiappichini
Copy link
Copy Markdown
Contributor

A new producer is introduced to read PU weights from ROOT files, instead of using correctionlib with JSONs. This is adapted from the TauFW framework and validated for 2024 PU.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 introduces a new producer function PUWeightROOT to calculate pileup reweighting by directly reading from ROOT histogram files, providing an alternative to the existing correctionlib JSON-based approach. The implementation is adapted from the TauFW framework and has been validated for 2024 pileup conditions.

Changes:

  • Added PUWeightROOT function to read pileup weights from ROOT files containing data and MC pileup distributions
  • Added function declaration in the header file
  • Updated jsonpog-integration submodule reference

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/reweighting.cxx Implements new PUWeightROOT function with histogram-based PU weight calculation and adds clarifying note about ZPtMass function usage
include/reweighting.hxx Adds function declaration for the new PUWeightROOT producer
data/jsonpog-integration Updates submodule commit reference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/reweighting.cxx Outdated
Comment thread src/reweighting.cxx Outdated
Comment thread src/reweighting.cxx Outdated
Comment thread src/reweighting.cxx Outdated
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 15, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 8 complexity · 0 duplication

Metric Results
Complexity 8
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@nshadskiy nshadskiy merged commit adfe011 into main May 7, 2026
6 checks passed
@nshadskiy nshadskiy deleted the pu_weight branch May 7, 2026 14:22
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