Repository navigation
Sample every physical placement in the geometry doctor's reachability audit - #16208
Merged
sawenzel merged 2 commits intoNov 26, 2026
Merged
Conversation
This fixes a crash of the multithreaded reachability audit of o2-sim-geometry-doctor on aligned geometries. - An aligned geometry read from file has pending voxel rebuilds and assembly bounding boxes. - TGeo does both on the first query, which is not thread safe, and the workers corrupted the voxels. - They are now done once before sampling starts. - The workers claim their navigators one at a time, because TGeoManager::ThreadId() reads its thread map without a lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… audit This adds a per-placement pass to the reachability audit of o2-sim-geometry-doctor and adds a unit test. - The audit sampled each node object only in its first path. - A shared volume shadowed in another instance was therefore not seen, e.g. the MCH DE 600 and DE 612 gas in the aligned geometry. - Every placement now gets --placement-samples points (default 16). - A placement that loses a point is re-sampled with --reachability-samples. - Seeds come from the daughter indices on the path, so the result does not depend on --reachability-jobs. - Findings are grouped by the deepest ancestor placed once, with its alignable symbolic name. - The new file <prefix>-reachability.json lists the findings of both passes. - --reachability-baseline reports only findings that are new with respect to another geometry's file. - With a baseline, the exit code is 3 only for a new dead sensitive placement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This improves the overlap detection of o2-sim-geometry-doctor, so that it also finds volumes made unreachable by alignment.
So far the reachability audit sampled each node object only in its first placement. A shared volume that is shadowed in another instance was therefore not seen. With the run 536683 alignment, for example, the MCH chamber 6 slats DE 600 and DE 612 lie inside the Nomex support panel, and TGeo never locates their gas, so these two DEs record no hits in MC. ROOT's CheckOverlaps does not report it either, because the volumes involved are assemblies.
Every physical placement is now sampled with a few points (
--placement-samples, default 16), and a placement that loses a point is re-sampled at full precision. The findings go to<prefix>-reachability.json, grouped by detection element or module. With--reachability-baseline, only findings that are new with respect to another geometry are reported, which makes the tool usable as a quick check of a new alignment object against the ideal geometry.On the full aligned ALICE geometry (5.4 M placements) the audit takes 12 s on 56 threads and 34 s on 8. It finds 353 dead placements, 7 of them sensitive: exactly the DE 600 and DE 612 gas.
The first commit fixes an intermittent crash of the multithreaded audit on aligned geometries: TGeo rebuilds voxels and assembly bounding boxes lazily on first use, which is not thread safe.
Assisted by Claude Code.