Unstable results when enabling MT and filling a THnD histogram using Take

Dear @eguiraud, in origin my problem was about filling a THnSparse object. There is another post about this here:

So, in origin I was working with an THnSparse and while trying to make it work I thought it would be good to try with a THnD. I need to use a THnX so that I can in future use any number of variables.

EDIT: I see now that perhaps the solution in previous post is that I need to use THnSparseD and not the abstract class THnSparse!

I imagine the @mczurylo example will also work with THnD without problems, but the point is that I want to be able to fill in a THnSparse to be more memory efficient, and I think this is only possible with a manual fill?

I got other issues with THnSparse, see post:

Thanks for your replies!