Skip to content

Add nuclear processes in AdePT #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

SeverinDiederichs
Copy link
Collaborator

@SeverinDiederichs SeverinDiederichs commented May 20, 2025

This PR adds the nuclear processes in AdePT.

This PR introduces a LeakStatus, which describes for which reason a particle is leaked (e.g., because it hit GammaNuclear or because it left the GPU region). Then, in the Geant4IntegrationLayer, when leaked tracks are handled and given back to Geant4, the nuclear processes are invoked.
Therefore, the AdePTGeant4Integration layer now holds a pointer (not-owned) to the specialized G4HepEmTrackingManager, that is a member of the AdePTTrackingManager. The G4HepEmTrackingManager holds a pointer to the thread-local hadronic processes. Since there is only a single AdePTTransport instance in async AdePT, each thread must initialize its own Integration layer (this needed to be outsourced), such that it points to the correct G4HepEmTrackingManager (with the corresponding pointer to the thread-local hadronic process).

Physics validation for async AdePT:
Screenshot from 2025-05-22 09-32-01

Physics validation for sync AdePT:
Screenshot from 2025-05-22 09-32-15

Performance measurement using 32 threads for 2000 events à 100 e- with 10 GeV being shot at testEm3:

Mode with nuclear without nuclear cost (%)
Sync AdePT 233.403 s 218.304 -6.92%
Async AdePT 163.869 s 163.406 -0.28%
G4HepEm 377.132 s 377.184 +0.01%

Note: Cannot be merged until we upgrade the CI to the latest version of G4HepEm, CI will fail at the moment.

To Do:

  • Run high statistics validation for sync and async (1e7)
  • Update CI baseline file to include nuclear processes
  • performance measurements
  • do validation when not using nuclear processes in physics list
  • update CI to use latest G4HepEm, after that one is tagged (all additions are added in G4HepEm, just waiting for the tag)

@phsft-bot
Copy link

Can one of the admins verify this patch?

@SeverinDiederichs SeverinDiederichs force-pushed the add_nuclear_processes branch 3 times, most recently from ca0e84e to a305276 Compare May 28, 2025 14:05
Copy link
Contributor

@agheata agheata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for this important feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants