I am trying to calculate distance from inside using the method DistFromInside of TGeoShape. I have an example code to illustrate my puzzle:
- build a box
- put a point in the box
- define a direction and its opposite direction
- calculate the distance based on the point via both the directions
I realized that one direction returns the correct distance, another one gives zero, which I am so puzzled by. Why the distance along one direction is zeor?!
I understand some experts would not suggest to use the methods like DistFromInside or Outside to trace tracks. But in the example, it is a very simple case, it is not working.
test_DistFromInside.C (1.66 KB)