Skip to content

Fix polyhedron ZSegment indexing which was generating "surface points" not actually on surface

Guilherme Lima requested to merge lima/VECGEOM-547 into master

This commit fixes a polyhedron ZSegment indexing bug which was causing function UnplacedPolyhedron::SamplePointOnSurface() to generate points off of surface, in case the "top" surface was chosen.

The bug only affected polyhedra in which the last ZSegment had Rmin=0, so my previous attempt could not find the bug because I used Rmin>0 in my tests.

Thanks to Birgit Zatschler for providing a B1 Geant4 example isolating the problem.

Merge request reports