Skip to content

Sample every physical placement in the geometry doctor's reachability audit - #16208

Merged
sawenzel merged 2 commits into
AliceO2Group:devfrom
sawenzel:swenzel/geometry-doctor-per-placement
Nov 26, 2026
Merged

sawenzel merged 2 commits into
AliceO2Group:devfrom
sawenzel:swenzel/geometry-doctor-per-placement

Conversation

@sawenzel

Copy link
Copy Markdown
Collaborator

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.

sawenzel and others added 2 commits November 26, 2026 14:21
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>
@sawenzel
sawenzel requested a review from a team as a code owner November 26, 2026 13:52
@sawenzel
sawenzel merged commit 9bdab2b into AliceO2Group:dev Nov 26, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant