Skip to content

Upgrade to latest g4hepem #375

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

Merged

Conversation

SeverinDiederichs
Copy link
Collaborator

@SeverinDiederichs SeverinDiederichs commented Apr 1, 2025

This PR updates AdePT such that it can use the latest version of G4HepEm.
It enables to use the perRegion parameters in G4HepEm.

Furthermore, the positron cut is now used from G4HepEm. The ApplyCut value is taken directly from G4HepEm and not via a global constant. Some default parameters are set correctly. This fixes a bug, as before, if the MinimalMSCStepLimit was set, the results were wrong and it could even lead to stalls.

This PR will also require updating the CI to the latest tagged version of G4HepEm.

In fact, the fix of the incorrect default parameters changed and fixed the physics:
Screenshot from 2025-04-07 15-45-08

@SeverinDiederichs SeverinDiederichs force-pushed the upgrade_to_latest_g4hepem branch from 18633c3 to 31cbce4 Compare April 1, 2025 15:20
@phsft-bot
Copy link

Can one of the admins verify this patch?

@SeverinDiederichs SeverinDiederichs force-pushed the upgrade_to_latest_g4hepem branch from 2b21932 to 7ffe5ef Compare April 2, 2025 07:04
@@ -412,17 +415,38 @@ void CopySurfaceModelToGPU()
#endif
}

G4HepEmState *InitG4HepEm()
G4HepEmState *InitG4HepEm(G4HepEmConfig *hepEmConfig)
Copy link
Contributor

Choose a reason for hiding this comment

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

Since these calls are a bit more complex now we could think of eventually moving them to a common header

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Noted in the codimd

Copy link
Contributor

@JuanGonzalezCaminero JuanGonzalezCaminero left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you for the changes!

@SeverinDiederichs SeverinDiederichs merged commit 0506df3 into apt-sim:master Apr 3, 2025
3 checks passed
@SeverinDiederichs SeverinDiederichs deleted the upgrade_to_latest_g4hepem branch April 3, 2025 08:32
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