You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TGeoChecker::ComputeOverlap skips every mesh point with x < 0 and y < 0 (missing TMath::Abs?) #24293
In geom/geomchecker/src/TGeoChecker.cxx, TGeoChecker::ComputeOverlap skips points with this test in three of its four point loops:
if (local[0] <1e-10&&local[1] <1e-10)
continue;
The coordinates are compared signed, with no absolute value. So the test doesn't only skip points on the z axis, which is presumably the intent. It skips every mesh point of the shape that lies in the quadrant x ≤ 0, y ≤ 0 of its local frame.
The other loop, over the daughter's points in the extrusion case, uses absolute values:
if (TMath::Abs(local[0]) <tolerance&&TMath::Abs(local[1]) <tolerance)
continue;
Reproducer
A small box A lies wholly inside a large box B, its sibling. Both are placed without a transform. A is centred at (15, 15, 0), then at (−15, −15, 0).
A centred at (+15, +15, 0): 1 overlap(s) found
A centred at (-15, -15, 0): 0 overlap(s) found
In the second case A is still wholly inside B, but all of its mesh points have x < 0 and y < 0, so they are all skipped. B's points are far from A, so nothing is reported.
ROOT version
| Welcome to ROOT 6.40.02 https://root.cern |
| (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Jun 10 2026, 10:43:59 |
| From tags/v6-40-02@v6-40-02 |
| With c++ (GCC) 16.1.1 20260515 (Red Hat 16.1.1-2) std202302 |
| Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
Installation method
Built from source
Operating system
Fedora 44
Additional context
The signed test may have been written this way on purpose. If so, could you explain why these points are skipped, and why only in these three loops and not in the daughter loop?
Activity
agheata commentedon Nov 23, 2026
@bauj, thanks for catching this! Those three checks are missing absolute values. This is fixed by #24298