Resolve the TRD chamber by name when chamber assemblies have no volume id - #15873
Merged
Merged
Conversation
…e id This fixes the TRD initialisation abort under native Geant4 navigation (G4.navmode=kG4). - The VGM conversion collapses the chamber assemblies UT00-UT29, which then have no Geant4 volume id, and buildVolumeIdTables aborted with "TRD volume UT00 has no usable volume id". - In that case the chamber is read from the assembly name that CurrentVolOffName still reports. - TGeo and VecGeom keep the integer lookup; their TRD hits are bit-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bazinski
approved these changes
Sep 30, 2026
Collaborator
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 fixes an abort at TRD initialisation when o2-sim runs with native Geant4 navigation (
G4.navmode=kG4), which serves as the independent reference when validating the TGeo and VecGeom navigation modes.The integer volume-id lookup introduced for the TRD hits used the ids of the chamber assemblies
UT00–UT29. The VGM conversion to Geant4 collapses assemblies, so they have no volume id and initialisation stopped withTRD volume UT00 has no usable volume id. In that case the chamber is now read from the assembly name, which geant4_vmc still reports. TGeo and VecGeom keep the integer lookup, and their TRD hits are bit-identical.With native Geant4, 500 pp events give the TGeo TRD hit count (ratio 1.001) and hit the same 521 chambers.
Assisted by Claude Code.