It would be nice if there were a function (in the TH2,TH3 classes) that gave you the binx, biny, and binz that corresponds to the global number that you pass it. Something like the following:
This would be complimentary to the FindBin() function, which returns the global bin number, but not the 2D or 3D bin numbers. I find that the 2D/3D bin numbers are used for some functions while the global bin number is used in others.
I hope I have not overlooked a function that already describes what I am requesting.
In the meantime, it won’t be hard to make the transformation myself, but this would be a nice easy function to have built in.
All libraries are included. GetBinXYZ is an inherited function of TH2F from TH1:
virtual void TH1::GetBinXYZ(Int_t binglobal, Int_t& binx, Int_t& biny, Int_t& binz) const
I expected that I could use GetBinXYZ with TH2F, but something is not right here.