Skip to content

o2-sim: Fix zero-step kills and event aborts in VecGeom navigation - #16151

Open
sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:swenzel/o2sim-vecgeom-nav2
Open

sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:swenzel/o2sim-vecgeom-nav2

Conversation

@sawenzel

Copy link
Copy Markdown
Collaborator

This fixes two remaining problems of the VecGeom navigator (G4.navmode=kVecGeom) found in the full-detector validation against TGeo navigation.

The first is a bug where electrons were killed between touching layers. After a crossing, the navigator located the track along the direction after the step, which multiple scattering can turn back into the volume just left. The track then ended in the mother air with a zero-length step and died at its cut. The crossing is now located along the direction of the step, as the Geant4 navigator does. In the MFT, the electrons killed this way after the carbonBaseWithHole layer go from 439 to 4 (TGeo: 7), and the MFT pion-gun hits from 0.994 to 1.001 of TGeo.

The second is a bug where events were aborted for tracks tangent to a face between a volume with field and one without (2 of 20 Pb-Pb events, at RB24). The stuck-track push was also applied to the chord step of the field propagator, which then missed the crossing. Only steps along the momentum are lengthened now, and the push is capped at 10 µm.

Unit tests cover both cases. Together with the MCH geometry fix and the ITS parallel world (#16134), 2 × 3000 pp, 2 × 20 Pb-Pb and aligned-ITS events give no aborts, and ITS, TPC, TRD and MFT hits and energy agree with TGeo within 1.5σ, EMC within 1 %. The TOF energy is 4 % above TGeo and 0.97 ± 0.02 of native Geant4 navigation, which is itself 8 % above TGeo there.

Assisted by Claude Code.

sawenzel and others added 2 commits November 18, 2026 09:52
…vigator

This fixes a problem in the VecGeom navigator and adds a unit test.

- The locate after a crossing used the direction after the step, which multiple scattering can turn back into the volume just left.
- The track was then put into the mother of two touching layers with a zero-length step, where electrons below the cut of the air were killed.
- The crossing is now located along the direction of the step that found it, as the Geant4 navigator does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This fixes event aborts of the VecGeom navigator for tracks tangent to a face between a volume with a magnetic field and one without, and adds a unit test.

- The field propagator crosses such a face along its chord and the following straight step leaves it again, so the track alternates between the two volumes with zero-length steps.
- The stuck-track push was also added to the chord step, which the propagator takes for a miss, so the crossing never happened and the event was aborted after 25 zero steps.
- Now only steps along the momentum are lengthened once both kinds have occurred.
- The push is capped at 10 um, below the thinnest layers of the detectors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sawenzel
sawenzel requested a review from a team as a code owner November 18, 2026 14:50

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