I have a histogram that seems to be empty, however it has 192 entries. I understand that some of them might be over/underflows. However, when setting the statistics option to see under/overflows, it shows that I have NO underflows and only 10 overflows. Could this be a problem with ROOT, or is it a problem with my data. I do know that those entries might be very large (compared to the range of my histogram)… is there a limit in the value of the entry to be considered an overflow? I also noticed that the skewness is ‘nan’, not sure it that’s related.
Hi,
There is no max limit value for an entry to be considered overflow.
Are you filling the histogram with weights ?
In that case the underflow/overflow number is the total sum of the weights for the underflow/overflow events which can be different than the total number of underflow/overflow entries.
Having nan in skewness is normal if you have all in-range bins with zero content.
Thanks for you prompt reply. I’m not filling this histograms with weights. This is a pT (transverse momentum) histogram. As you mentioned, I have no entries inside the range of the histogram, but still, I would expect all of them to be overflows. Any other idea why this is happening?
how did you create and fill the histogram ? Is it coming from a projection of a multi-dimensional histogram ?
Can you send me the minimal program reproducing this, or otherwise the histogram object (not the figure) in a ROOT file so I can have a look at it
Thanks
At some point, I thought the values I’m filling the histogram with might not be well defined (I have a given value for P, but not sure if pT is well defined.) However, I can not tell now, since I seem to have values for the angles (which, along with P, define pT.)
I would need also your code filling the histogram to understand your problem. If you are filling with Nan’s you should get them as overflow’s entries.
Regards
Here’s the code I use to fill the histogram. I can not include the whole code that reproduces the problem, because the problem might be related to the data I’m using (from CASTOR) or other predeclaration, and the whole thing is not so simple (I’m running MuonTrackMonitoring package on cosmic data.)
I understand if you can not spot the problem from this information. But, since I’m running in AthenaFramework, reproducing the problem might be overwhelming. Any suggestions of what I could try when running my code to spot possible problems?
there are a couple of thinks you can do. First you can set the statistics to include underflow/overflow by calling (before filling the histogram):
TH1::StatOverflows(true);
then you could also check the bin value number returned by the Fill() method. For example you could print or make an histogram with these returned bin values.
I believe I understand the problem now, and actually it was sort of related to what Lorenzo mentioned on weights.
I forgot to consider one detail. I created 10 pT histograms (so I don’t need to run all the statistics at once), each one normalized (to 1.) At the end, this final histogram is the addition of the 10 initial histograms. Then, for each histogram, having all entries outside the range, implies an overflow of “1” (the entries have been normalized.) Then, for the final histogram, the overflow is 10.
Thanks you so much for your help. And I’m sorry, I should have considered this before, but forgot to mention/think about it.