How do I check if a THnSparse bin is empty?

Hi everyone,

Is there any way to check if a bin in a THnSparse histogram is empty?

My full problem is the following:
I would like to GetBinContent from 3 out of the 11 dimensions in several THnSparse histograms and put it into a new 4 dimensional THnSparse histogram. As I cannot simply merge them and use a projection, I need to iterate through the bins and get the content to then set it in the new hist. However, if I use GetBinContent on an empty bin, it seem to return something non-zero.

Any help is immensely appreciated!

Cheers

Hello,

this should not be the case.
Do you have an example reproducing the issue?

Cheers,
Danilo