You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Right now, cutflow provides a histogram that is effectively raw event yields (where weight is just 1 (num of events). The current problem is that this is hard-coded.
Describe the solution you'd like
It would be great to pass in an array or broadcast-able value for the weights to fill (such as weights=1 recovers original behavior and weights=events.weight allows per-event weighting).
Describe alternatives you've considered
None? Unless I make my own histograms lazily...
Additional context
From discussion with @ikrommyd on IRIS-HEP Slack in #coffea channel
The text was updated successfully, but these errors were encountered:
I guess it makes the most sense to do this not only for the histograms, but for the raw count lists as well. Basically anything that is summing to count events, it should also consider a user provided weight for each event.
Should also be added for the N-1 method as well apart from cutflow.
Hi @kratsg , the PR mentioned above has been merged in. From your description, I'm unsure if this will be usable in the workflow you're iterating on now, but if and when you have time, you can have a look and share feedback on whether it works and how things could be altered to accommodate your needs, if not. Right now, the cutflow expects a coffea Weights() instance, but that could be extended to accept just straight arrays of weights if the output of your tools can be passed through that class. Additionally, the case for handling scalars to be broadcast is done with the scale method in the print, yieldhists and plot_vars methods. Some examples of using most of these are available in the updated packed_selection notebook / docs
Is your feature request related to a problem? Please describe.
Right now,
cutflow
provides a histogram that is effectively raw event yields (whereweight
is just1
(num of events). The current problem is that this is hard-coded.Describe the solution you'd like
It would be great to pass in an array or broadcast-able value for the weights to fill (such as
weights=1
recovers original behavior andweights=events.weight
allows per-event weighting).Describe alternatives you've considered
None? Unless I make my own histograms lazily...
Additional context
From discussion with @ikrommyd on IRIS-HEP Slack in
#coffea
channelThe text was updated successfully, but these errors were encountered: