Skip to content

Fix two bugs in the relocating VecGeom navigator - #16260

Open
sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:vecgeom-nav-crossing-fixes
Open

sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:vecgeom-nav-crossing-fixes

Conversation

@sawenzel

@sawenzel sawenzel commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

This is fixing two bugs in the relocating VecGeom navigator (G4.navmode=kVecGeom) that showed up in the kVecGeom GRID validation.

With the parallel world, ComputeSafety clipped the safety to the caller's bound. Geant4 then saw smaller safeties everywhere, which changed the transport far from any parallel-world node and gave a 4 % deficit of TPC tracks with at least 150 clusters, mostly slow secondary protons. With the full safety, the transport with and without the parallel world is identical away from the nodes. On 23 GRID seeds the deficit is gone: secondary protons +7.0 ± 2.4 %, bulk unchanged.

In a field, Geant4 can end a step a little short of the face it crosses. The next step from that point was then a zero-step exit, followed by a 1 nm visit to the mother volume. At the TPC inner field cage this produced a spurious TPC track reference for about 8 % of slow near-radial protons. Such a zero step is now redone from where the step direction enters the volume. In a 2000-event proton gun the spurious references go from 8 % to 0.

Both fixes come with unit tests. Navigation with kTGeo and kG4 is not affected. Note that the wider safety search may cost about 2 % CPU in pp with the parallel world; this is not settled yet.

Fixes https://its.cern.ch/jira/browse/O2-7358
Relates to https://its.cern.ch/jira/browse/O2-7355

This fixes the safety of the relocating VecGeom navigator with the parallel world and adds a unit test.

- The nodes were searched only up to the caller's bound, and the safety never exceeded it.
- Tracks far from any node were therefore transported differently, which caused the deficit of TPC tracks with at least 150 clusters.
- The node search now goes up to the full safety.

https://its.cern.ch/jira/browse/O2-7358
…ator

This fixes a spurious zero-length step after a crossing in the relocating VecGeom navigator and adds unit tests.

- In a field Geant4 can end a step slightly short of the face it crosses.
- The lean locate finds the next volume beyond the face, so the next step from Geant4's point was a zero-step exit and a 1 nm visit to the mother.
- At the TPC inner field cage this gave a spurious TPC track reference for about 8 % of slow near-radial protons.
- Such a zero step is now redone from where the step direction enters the volume.

https://its.cern.ch/jira/browse/O2-7355
@sawenzel
sawenzel requested a review from a team as a code owner December 2, 2026 11:39

This branch has not been deployed

No deployments
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