Skip to content

o2-sim: Make the lean crossing locate the VecGeom default - #16166

Merged
sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:swenzel/o2sim-vecgeom-lean-default
Nov 23, 2026
Merged

sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:swenzel/o2sim-vecgeom-lean-default

Conversation

@sawenzel

@sawenzel sawenzel commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

This makes the lean crossing locate the default of G4.navmode=kVecGeom and moves the choice of VecGeom navigator for small mothers into the geometry setup. G4.vecgeomLeanLocate=false keeps the previous locate as a fallback for one release.

The effect on the event loop, serial pp, 6 seeds, same build and node:

CPU time
lean / previous locate 0.967 ± 0.003
lean / kPropagated 0.991 ± 0.004
lean / TGeo 0.809 ± 0.004

The physics agrees with TGeo as well as the previous locate does: 1 GeV photons in EMCAL 0.9999 ± 0.0007 of TGeo; pp (8 × 3000 events), Pb-Pb (2 × 20) and the aligned ITS with the parallel world (2 × 600, ITS hits 1.007 ± 0.005) within 2σ in every detector; no aborts. MID in pp is 0.948 ± 0.026 of TGeo over 8 seeds and 0.986 ± 0.032 over the 6 seeds after the first observation; a pion gun into the muon arm gives 1.006 ± 0.023.

The mechanism was merged in #16165.

Assisted by Claude Code.

@sawenzel
sawenzel requested review from a team and shahor02 as code owners November 21, 2026 10:56
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for c1c1773 at 2026-11-21 14:29:

## sw/BUILD/O2-full-system-test-latest/log
command /sw/slc9_x86-64/O2/slc9_x86-64-slc9_x86-64-local2/prodtests/full-system-test/dpl-workflow.sh had nonzero exit code 1
[6318:internal-dpl-injected-dummy-sink]: [14:28:50][ERROR] Failed binding socket internal-dpl-injected-dummy-sink.metric-feedback[0].push, address: ipc://@metric-feedback-0, reason: Address already in use
[6318:internal-dpl-injected-dummy-sink]: [14:28:50][ERROR] failed to attach channel metric-feedback[0] (bind on ipc://@metric-feedback-0)
[6318:internal-dpl-injected-dummy-sink]: [14:28:50][ERROR] 1 of the binding channels could not initialize. Initial configuration incomplete.
[6318:internal-dpl-injected-dummy-sink]: [14:28:50][FATAL] error while setting up workflow in o2-raw-file-reader-workflow: 1 of the binding channels could not initialize. Initial configuration incomplete.
[ERROR] Workflow crashed - PID 6318 (internal-dpl-injected-dummy-sink) did not exit correctly however it's not clear why. Exit code forced to 128.
[ERROR]  - Device internal-dpl-injected-dummy-sink: pid 6318 (exit 128)
[INFO]    - First error: [14:28:50][FATAL] error while setting up workflow in o2-raw-file-reader-workflow: 1 of the binding channels could not initialize. Initial configuration incomplete.
[ERROR] SEVERE: Device internal-dpl-injected-dummy-sink (6318) had at least one message above severity 7: error while setting up workflow in o2-raw-file-reader-workflow: 1 of the binding channels could not initialize. Initial configuration incomplete.


## sw/BUILD/o2checkcode-latest/log
--
========== List of errors found ==========
++ echo 'Found 0 errors and 0 warnings.'
Found 0 errors and 0 warnings.
++ [[ 0 -gt 0 ]]
++ [[ 0 -gt 0 ]]
++ [[ 0 -gt 0 ]]
++ mkdir -p /sw/INSTALLROOT/d832b1ee2cc3b935e2ae44494746c0892ac4ee40/slc9_x86-64/o2checkcode/1.0-local3/etc/modulefiles
++ alibuild-generate-module
+ HAS_BIN=
+ HAS_LIB=
+ HAS_CMAKE=
+ HAS_ROOT=
+ '[' 0 '!=' 0 ']'
+ cat
+ printf 'if ![ is-loaded '\''BASE/1.0'\'' ] {\n module load BASE/1.0\n}'
+ echo 'BUILD_REQUIRES=CMake alibuild-recipe-tools defaults-release'
BUILD_REQUIRES=CMake alibuild-recipe-tools defaults-release
+ FULL_BUILD_REQUIRES='Python-modules-list json-c MPFR FairCMakeModules ninja googlebenchmark pytorch_cpuinfo CMake O2-customization safe_int defaults-release Alice-GRID-Utils double-conversion alibuild-recipe-tools bz2 UUID date ninja-fortran'
+ echo 'FULL_BUILD_REQUIRES=Python-modules-list json-c MPFR FairCMakeModules ninja googlebenchmark pytorch_cpuinfo CMake O2-customization safe_int defaults-release Alice-GRID-Utils double-conversion alibuild-recipe-tools bz2 UUID date ninja-fortran'
FULL_BUILD_REQUIRES=Python-modules-list json-c MPFR FairCMakeModules ninja googlebenchmark pytorch_cpuinfo CMake O2-customization safe_int defaults-release Alice-GRID-Utils double-conversion alibuild-recipe-tools bz2 UUID date ninja-fortran
++ env
++ cut -f1 -d=
++ grep -v '^DEFAULT_'
++ grep -v PKGREVISION
++ grep -v ALIBUILD_RECIPE_TOOLS
++ grep REVISION
++ sed -e s/_REVISION//
+ for x in $(env | cut -f1 -d= | grep -v "^DEFAULT_" | grep -v PKGREVISION | grep -v ALIBUILD_RECIPE_TOOLS | grep REVISION | sed -e 's/_REVISION//')
++ eval 'echo $LIBFFI_REVISION'
+++ echo 14
+ REVISION_VALUE=14
++ eval 'echo $LIBFFI_VERSION'
+++ echo v3.2.1-alice1
+ VERSION_VALUE=v3.2.1-alice1
++ eval 'echo $LIBFFI_ROOT'
[0 more errors; see full log]

Full log here.

This makes the lean crossing locate the default of the relocating VecGeom navigator and moves its navigator choice into the geometry setup.

- G4.vecgeomLeanLocate now defaults to true; false keeps the previous locate as a fallback for one release.
- GeometryManager::setVecGeomBvhForSmallMothers gives volumes with one or two daughters BVHNavigatorV, replacing the per-step choice in the navigator.
- Those volumes also get BVHSafetyEstimator, the estimator BVHNavigatorV uses in the step, so ComputeSafety and the step agree.
- Their level locators are unchanged; kPropagated and the previous locate keep the simple navigator and estimator.
- The BVH navigator is installed under the same O2_VECGEOM_HAS_BVH_VNAVIGATOR guard as in buildVecGeomGeometry.
- The lean navigator checks this setting at every new track, and every caller of its constructor states the locate.
- The unit test sets the geometry up for each navigator as o2-sim does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sawenzel
sawenzel force-pushed the swenzel/o2sim-vecgeom-lean-default branch from c1c1773 to 2bdd877 Compare November 23, 2026 12:33
@sawenzel
sawenzel merged commit 9e6edb5 into AliceO2Group:dev Nov 23, 2026
9 of 12 checks passed
@sawenzel
sawenzel deleted the swenzel/o2sim-vecgeom-lean-default branch November 23, 2026 14:15
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.

2 participants