Add a reachability check to the geometry doctor and restore the ZEM geometry - #15750
Open
sawenzel wants to merge 3 commits into
Open
Add a reachability check to the geometry doctor and restore the ZEM geometry#15750sawenzel wants to merge 3 commits into
sawenzel wants to merge 3 commits into
Conversation
This fixes the ZEM calorimeters being placed outside their mother volume, so that they are simulated again. - ZEM and its 27 support volumes were placed in caveRB24 at global z 748 to 858 cm, while caveRB24 begins at z = 864.6 cm, so TGeo could not reach them and they produced no hits. - The barrel volume has owned that z range since commit 5166902, so the 29 placements go there, with the +30 cm offset the barrel carries in the cave. - shCaveTR3 in Cave.cxx grows from R = 80 to R = 105 cm, which the ZEM box walls at R = 95.7 cm need. 105 cm is what caveRB24 had in that range before. - ZEM is not built when FoCal is active, because every point of ZEM lies inside the FOCAL box. - 50 events of 20 muons at 200 GeV into 4.6 < eta < 5.3 give 0 ZDC hits before and 250 ZEM hits at z 757 to 784 cm after. - CheckOverlaps on caveRB24 goes from 29 extrusions to 0. https://its.cern.ch/jira/browse/O2-7156 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This adds a check that every placement occupies the space it was built in, and a --reachability-only mode that runs it without a magnetic field. - For each node object the tool draws points inside the placement's own shape and asks TGeoManager::FindNode whether the navigator comes back through it. - A placement the navigator never reaches carries no material and produces no hits; one it reaches only in part is shadowed by an overlapping sibling. - The full ALICE geometry takes 3 s: 73761 node objects visited, 65526 sampled. - On dev it reports 244 unreachable placements, 239 of which are ZEM. - The exit code is 3 when anything is unreachable. https://its.cern.ch/jira/browse/O2-7156 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Collaborator
|
Thanks for spotting. Indeed, only with the proposed changes ZEM creates hits. |
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 PR improves the geometry doctor with a fast reachability check and restores the ZEM material in the simulation geometry (fixing https://its.cern.ch/jira/browse/O2-7156). The new check tests whether volumes can actually be reached by the navigator, making it possible to detect placements that are present in the geometry but effectively invisible to transport. It runs on the full ALICE geometry in a few seconds and can be used as a build-time check.
The same check also revealed that the ZEM calorimeters were placed outside the volume from which they could be reached. The ZEM geometry has been moved to the
barrelvolume, removing the resulting extrusions and restoring ZEM hits in simulation. The new position is also consistent with the available survey measurements.Reachability check in the geometry doctor
The new check asks a simple question for each volume: can the navigator actually reach the space occupied by this volume?
For each node, the geometry doctor samples points inside its own shape and checks whether
FindNode()reaches the corresponding volume. A volume that cannot be reached at all does not contribute material to transport and cannot produce hits. If only part of a volume can be reached, it is usually blocked by an overlapping sibling or an extruding placement.The check does not require a magnetic field. On the full ALICE geometry it takes about three seconds:
The default sampling is already sufficient for a quick check of the full geometry, while
--reachability-samplescan be used when more statistics are needed.Restoring the ZEM geometry
The reachability check identified the ZEM problem. ZEM and its 27 support volumes were placed inside
caveRB24, between z = 748 and 858 cm. However, thecaveRB24volume starts at z = 864.6 cm, so the navigator could never enter the ZEM geometry.The
barrelvolume already owns this z range, so the ZEM volumes are now placed there instead. The existing +30 cm offset of the barrel is used, avoiding another hard-coded z position.shCaveTR3is also expanded from R = 80 to R = 105 cm to provide enough space for the ZEM box walls, which extend to R = 95.7 cm.ZEM is only constructed for layouts that contain it, so this change does not affect the FoCal geometries.
The change was tested with Run 3 (
--detectorList ALICE2) using 50 events of 20 muons at 200 GeV with 4.6 < eta < 5.3:CheckOverlapsoncaveRB24CheckOverlapsonbarrelThe 29 placements moved into
barrelare now inside the volume without overlapping any solid sibling. They were checked using 100,000 sample points per placement.There is also an independent validation against the detector survey. The 2014 survey (EDMS 1512802, sigma = 0.5 mm) measured the ZEM box corners at |x| = 14.92–14.95 cm and z = 756.29–851.32 cm. The new geometry places the box at x = 14.940 cm and z = 756.50–851.50 cm, within about 2 mm of the surveyed position. This is comparable to the movement observed between the 2009 and 2014 surveys.
Overall, the change adds a fast way to detect unreachable geometry and restores the ZEM material to transport, giving the expected ZDC hits while removing the previous
caveRB24extrusions.