Skip to content
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

ApplyCuts (rebase) #334

Merged
merged 13 commits into from
Jan 17, 2025
Merged

Conversation

SeverinDiederichs
Copy link
Collaborator

@SeverinDiederichs SeverinDiederichs commented Jan 15, 2025

This PR adds the ApplyCuts used by G4 in AdePT. It is based and supersedes PR #317. The ApplyCuts value is read from Geant4 and can be toggled via /process/em/applyCuts true

Note that currently the positron cut is not yet available in G4HepEm (but will be shortly), and we use just use the electron cut. This will be fixed soon.

The restructuring of the scoring is now fully functional.

The run time shows that the ApplyCuts works as intended and accelerates the simulation. Since the scoring was also effected, the table also shows the results with ApplyCuts = false, which shows just the new scoring implementation

Setting 4 ttbar 1 threads CMS (no Bfield) 1e4 10 GeV electrons Em3
master 90.4422 s 76.5938 s
new scoring 90.3233 s 75.4082 s
new scoring + ApplyCuts 87.3564 s 60.8005 s

Additionally, the update of the time for gammas was incorrect (as it would have been skipped if a boundary was hit), this is also fixed.

The physics validation looks really good using the ApplyCuts both in G4 and AdePT (for 10^7 primaries, note the smaller y axis for the errors):
Screenshot from 2025-01-16 16-08-49

To Do:

  • Proper physics validation
  • Update high statistics benchmark to use ApplyCuts

@SeverinDiederichs SeverinDiederichs added the in_physics Category: In physics label Jan 15, 2025
@phsft-bot
Copy link

Can one of the admins verify this patch?

@agheata agheata merged commit 25d9e22 into apt-sim:master Jan 17, 2025
2 checks passed
@SeverinDiederichs SeverinDiederichs deleted the apply_cut_rebase branch January 17, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in_physics Category: In physics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants