Skip to content

Conversation

@SeverinDiederichs
Copy link
Collaborator

@SeverinDiederichs SeverinDiederichs commented Dec 8, 2025

This small PR fixes the handling of the G4Touchable when tracks are returned to G4.
As the UserStackingAction might check on the Touchable or NextTouchable, they must be set before giving it back to G4. This caused a crash in CMSSW.

At the same time, previously, every step was located in G4 when given to AdePT via SetInitialStep (see https://gitlab.cern.ch/geant4/geant4/-/blob/master/source/tracking/src/G4SteppingManager.cc?ref_type=heads#L309-L326). Now, this is called only for initial Steps (step number == 0).

This change slightly improves performance for offloading only the HCAL and ECAL in example1 using the CMS2018 geometry.

Also a minor cleaning was done: the FillG4NavigationHistory now receives a const reference instead of by value.

@SeverinDiederichs SeverinDiederichs added the bug Type: Something isn't working label Dec 8, 2025
@phsft-bot
Copy link

Can one of the admins verify this patch?

@SeverinDiederichs SeverinDiederichs merged commit 17fa606 into apt-sim:master Dec 15, 2025
3 checks passed
@SeverinDiederichs SeverinDiederichs deleted the fix_touchable_handling branch December 15, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Type: Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants