There is a possible problem with navigation inside TGeoPgon if the initial position is exactly on the polygon axis.
I have a package which performs tracking of photons using TGeoManager class.
If the starting point is situated exactly on the axis of the polygon, the results are obviously wrong: I see a strong asymmetry in the positions of the ends of the photon “tracks”.
Starting just slightly off the axis (X or Y of 0.0001) cures the problem and I have a perfect symmetry.
The problem does not appear in TGeoTube or TGeoBBox - tracking from the axis performs perfectly well.
Replacing TGeoBBox with a TGeoPgon of exactly the same shape (4 edges, matching rotation) shows the problem again.
The number of edges as well as the position along the axis does not mater - the problem remains.
I do not know will this help or not - the tracking with “on axis” condition in the TGeoPgon is ~40 times slower compared with off-axis conditions.
I have tried TGeoPgons with two planes, number of edges from 3 to 50.
The tracing directions were random (isotropic).
Any point on the axis would result in that strange behavior.