Skip to content

Conversation

@SeverinDiederichs
Copy link
Collaborator

@SeverinDiederichs SeverinDiederichs commented Oct 3, 2025

This initializes an empty secondary vector when returning a GPU step to the CPU. This is needed such that the access to the secondary does not crash:

  const std::vector<const G4Track*>  *secondaryVector = aStep->GetSecondaryInCurrentStep();
  secondaryVector->size(); <- currently crashes as it is a nullPtr

With this PR the secondary vector is available, just empty.

This PR is needed to run Athena with the Sim_tf transform.

@SeverinDiederichs SeverinDiederichs added the enhancement Type: New feature or request label Oct 3, 2025
@phsft-bot
Copy link

Can one of the admins verify this patch?

@SeverinDiederichs
Copy link
Collaborator Author

With the latest Athena version, this does not seem to be needed for now, but I'll keep it open for a bit to confirm with the other experiment frameworks that indeed it is no problem.

With this PR, the check for secondaries in a step would not be a nullptr access anymore, preventing potential crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Type: New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants