Dear ROOT expert,
using TGeoShape::GetAxisRange(…) method I found a misleading behaviour.
For a TGeoBBox the constructor is:
TGeoBBox(Double_t dx, Double_t dy, Double_t dz, Double_t* origin = 0)
if I call GetAxisRange(idx,…) for a TGeoBBox object, if idx=1 I get information about x axis, if idx=2 I get information about y axis, if idx=3 I get information about z axis. This is what I expect using TGeoShape::GetAxisRange(…).
But for TGeoSphere the constructor is:
TGeoSphere(Double_t rmin, Double_t rmax, Double_t theta1 = 0, Double_t theta2 = 180, Double_t phi1 = 0, Double_t phi2 = 360)
so when I call GetAxisRange(idx,…) for a TGeoSphere object, if id idx=1 I expect to get “r” information, if id idx=2 I expect to get “theta” information, if id idx=3 I expect to get “phi” information. But in the implementation of TGeoSphere::GetAxisRange(idx,…) , if id idx=2 I get “phi” information, if id idx=3 I expect to get “theta” information.
The same happen for other shapes, for example TGeoTubeSeg. The last two variables (axis) used in the constructor are swapped in the implementation of GetAxisRange(idx,…).
I find this a little misleading, but maybe this is implemented this way intentionally for some reason unknown to me.
Cheers,
Vito