What is the difference of GetEntries and Integral

Hi experts,
I have found the method explanation of GetEntries and Integral:
The former return the number of entries matching the selection.
While the later return the integral of bin contents.

But in fact I don’t know what is the mean of bin contents.
And the outputs of these two method are both different.

Does integral consider the events weights?

print(h.GetEntries(), h.Integral())
output: 120000, 12000
1 Like

Yes, that’s very likely why you have a difference.

It could also be that Integral() does not take into account the underflow and overflow bins.

1 Like

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