Closed henryiii closed 2 years ago
I guess this can be a little difficult when it comes to errors and sumw. I would suggest implementing the simplest rule within boost-histogram and if people need clopper-pearson or something else for division of correlated quantities they can manipulate as needed.
Agreed. Division generally assumes the data sets are independent. If you compute an efficiency, the data sets are correlated. We cannot know what has to be done in this case so we can only implement the rule for the simplest assumption, independent data sets.
The best way to handle computing efficiencies with Boost Histogram is to use a special efficiency accumulator that still needs to be written, where you pass a boolean to indicate whether the event passed or not.
Yes - the latter thing you mention would be a really nice interface!
Yes - the latter thing you mention would be a really nice interface!
@lgray If you are interested in drafting such an accumulator, I am happy to review it.
Some additional comments:
weighted_sum
by another weighted_sum
, that computes the variance correctly.weighted_sum
by an ordinary storage (e.g. double
) treats the count like a constant and not like a Poisson count with a Poisson variance. This is perhaps not what the user expects, but we have no guarantee that the contents of an ordinary histogram are counts and not something else, and so there is nothing we can do about it. We gave up on that guarantee early on in the design.
Weighted storages do not have a division operator. @lgray requested this for doing a background estimate.