Skip to content

o2-sim: VecGeom parallel world for a misaligned ITS - #16134

Open
sawenzel wants to merge 1 commit into
AliceO2Group:devfrom
sawenzel:swenzel/o2sim-vecgeom-parallelworld
Open

sawenzel wants to merge 1 commit into
AliceO2Group:devfrom
sawenzel:swenzel/o2sim-vecgeom-parallelworld

Conversation

@sawenzel

@sawenzel sawenzel commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

VecGeom parallel world for simulation with a misaligned ITS

This PR introduces a parallel world for G4.navmode=kVecGeom, the VecGeom counterpart of the TGeoParallelWorld that gives the aligned ITS chips, sensors and metal stacks priority over the main hierarchy. This is an important step towards using VecGeom navigation in simulations with a misaligned geometry.

It is enabled with the existing switch GeometryManagerParam.useParallelWorld=true, as for TGeo, and follows the same rules: the node added first holds the point, and a track inside a node sees no other node. The nodes are searched with a VecGeom IndexedBVH. It is available for the default kRelocating navigator; kPropagated refuses the parallel world.

The validation uses ITS + PIPE with the ITS alignment from CCDB. A unit test compares locate and ray entry with TGeoParallelWorld on a toy geometry with misaligned, overlapping chips. In Pythia8 pp events the parallel world recovers the ITS hits lost with alignment, for both navigators:

ITS hits relative to the ideal geometry TGeo VecGeom
aligned, no parallel world 0.72 0.70
aligned, parallel world 0.99 0.99

With the parallel world, VecGeom gives 0.999 ± 0.005 of the TGeo hit count in 1500 events, and for 5000 muons 99.6 % of the (muon, chip) pairs are the same.

Note that nothing changes when the parallel world is not requested: the hit counts per event and detector are identical to before. When it is used, it costs about 3–4 % of CPU time in an ITS + PIPE simulation, against about 5 % for TGeo.

In the full-detector validation with ITS alignment and the parallel world (2 × 600 pp events), VecGeom gives 1.005 of the TGeo ITS hits and no event aborts, and its event loop takes 0.83–0.84 of the TGeo CPU time.

In summary: G4.navmode=kVecGeom can now be run with ITS alignment and the parallel world, with ITS hits in agreement with TGeo navigation.

Assisted by Claude Code.

@sawenzel
sawenzel force-pushed the swenzel/o2sim-vecgeom-parallelworld branch 3 times, most recently from d50502e to 82f0ba6 Compare November 18, 2026 14:50
This commit lets G4.navmode=kVecGeom run with GeometryManagerParam.useParallelWorld and adds a unit test.

- VecGeomParallelWorld holds the prioritised placements of the TGeo parallel world with a VecGeom IndexedBVH over their boxes.
- The relocating navigator gives a node that holds the point priority in every locate, and limits step and safety by the nodes while the track is outside them.
- The rules are those of TGeoParallelWorld: the node added first wins, and inside a node the others are not seen.
- The propagating navigator still refuses the parallel world.
- The walk from a Geant4 path to a VecGeom state moves into VecGeomG4Map, where the parallel world reuses it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@sawenzel
sawenzel force-pushed the swenzel/o2sim-vecgeom-parallelworld branch from 82f0ba6 to 637cac8 Compare November 19, 2026 10:07
@sawenzel
sawenzel marked this pull request as ready for review November 19, 2026 10:07
@sawenzel
sawenzel requested a review from a team as a code owner November 19, 2026 10:07

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