Error for event weigthing

Hello,

I want to fill a 2 dimensional histogram with weighted values. The weight is calculated for each event which is filled in the histogram. So far it works without problems.
Now I want to add an error to the weight in each event, with the aim, that the error of each bin of the 2D histogram filled with the weighted events is calculated from the weight errors of the events filled in the specific bin.

I did not find any possibility to do this up to now. Is there any way?

Thank you very much.

Hi,

Not that I’m aware of. But I have a procedure that approximates that - it’s actually from my thesis :wink::

The uncertainty for a histogram bin is a convolution of the Poisson uncertainty (the “counting” part) and the uncertainty of the weights (the inverse of the product of the efficiencies) that is different for each entry.
Instead of a full convolution, you can try to treat these two contributions separately: σ^2(bin) = σ^2_{Poisson}(bin) + σ^2_{weights}(bin). A bin with N entries, with the weight of entry i being w_i, has a bin content of Sum_{i=1}^N w_i. The Poisson uncertainty is σ^2_{Poisson}(bin) = Sum_{i=1}^N w_i^2. The best estimate of the variance caused by the uncertainty on the weights is the average of the weights’ variances: σ^2_{weights}(bin) = 1/N Sum_{i=1}^N w_i^2.

Note that in general you cannot assume that all these uncertainties are uncorrelated, and you should do a proper convolution.

Cheers, Axel.