GetEffectiveEntries and Integral

Hello,

I’m using the functions GetEffectiveEntries() and Integral() on histograms which are scaled and weighted. Therefore I would have expected the two values to be different of course but proportional. Instead I’m obtaining a strange behaviour. For example I’m reporting some numbers below (Integral() on the left and GetEffectiveEntries() on the right):

21.4704256251 6536.47094847
21.5080075297 6631.15488974
21.3268216939 6536.47109412
21.4512426977 6646.26669627
21.6758591703 6629.89421523
21.4058911537 6634.10862083

Am I misunderstanding the meaning of these two functions?

Thanks,
Alessia

Hi Alessia,

Are the histograms scaled with a scalar, or could there be two different sets of data which are scaled independently?

If you are using hist->Scale() then the integral should be updated proportionally. However, this should not change the number of effective entries.

If instead the histogram is generated from some data source, check if some scaling factor is applied only to a subset. This would then skew the integral.

Cheers,
Kim

Hi Kim,

thanks a lot for the reply. I see, I think I have to double-check because these histograms are coming from MonteCarlo samples, managed by another code of which I’m not the responsible.

Cheers,
Alessia

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.