THnSparse constructor

Hi. I am trying to learn how to use THnSparse. The documentation is very vague about how you
define the sparse histogram. Here’s the block describing this:

“…the minimal, and the maximal value on the dimension’s axis”, hmmm. Is xmin here the coordinate of the low edge of 1st bin and xmax the coordinate of the high edge of the last bin, as with TH1?

Any insight?

Hi,

Yes, just like for TH1.

Cheers, Axel.

Thanks Axel.

Btw, since we are at it, I would like to report a bug on THnSparse…when you rebin it, you end up getting
zero-content bins. If one were to assume that all the allocated bins have content (an obvious expectation
for a sparse matrix/histogram), they would get errors. It might be worth putting a big warning about this in the
documentation.

Hi,

Sorry, I don’t understand - how do you end up with empty bins? If you merge a bin content of -5 with a bin content of 5 - yes, then the new bin will have 0 bin content. But it’s not empty - e.g. if you have uncertainties tracking turned on then you’ll see the difference.

If that’s not your case, can you send me some code that I can run and that reproduces the empty bins?

Cheers, Axel.