Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix data shape in qcd hook. #60

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Fix data shape in qcd hook. #60

merged 2 commits into from
Jan 22, 2025

Conversation

riga
Copy link
Member

@riga riga commented Jan 21, 2025

This is a small PR that changes an isolated piece of the QCD estimation.

When invoked with systematic shifts, the shift axis of MC histograms will contain these shifts as categorical axis values. For data, however, we only consider the "nominal" shift.

Currently, this leads to a shape mismatch in the QCD hook. Assuming 3 shifts and therefore 3 x 2 + 1 = 7 variations, and a variable with 40 bins, the "data - mc" subtraction is applied to the shapes

(1, 40) - (7, 40)

which breaks since operations on scinum Number objects are not broadcasted.

This PR manually repeat's the shift axis of data to match that of MC, which fixes the issue.

@riga riga added enhancement New feature or request priority-medium Medium priority labels Jan 21, 2025
@riga riga requested a review from aalvesan January 21, 2025 17:47
Copy link
Contributor

@aalvesan aalvesan left a comment

Choose a reason for hiding this comment

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

good catch! I had not tried with systematic shifts yet. looks good :)

@aalvesan aalvesan merged commit 792a2d5 into master Jan 22, 2025
2 checks passed
@aalvesan aalvesan deleted the fix/qcd_with_systs branch January 22, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-medium Medium priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants