Clean AdePTPhysics definition#497
Merged
SeverinDiederichs merged 6 commits intoapt-sim:masterfrom Mar 3, 2026
Merged
Conversation
|
Can one of the admins verify this patch? |
Collaborator
Author
SeverinDiederichs
left a comment
There was a problem hiding this comment.
Improve comments
JuanGonzalezCaminero
approved these changes
Mar 3, 2026
Contributor
JuanGonzalezCaminero
left a comment
There was a problem hiding this comment.
Thank you for the changes!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This improves and clarifies the
AdePTPhysics:Previously, the
AdePTPhysicswere added as an additional physics constructor to the PhysicsList, right after the G4EmStandard physics. However, this gave the impression that one could add them similarly to other G4Em physics lists, but that is not the case, as theAdePTPhysicsconstructor was calling this:resetting all parameters that other options might have set.
Thus, the clean way is to add the
AdePTTrackingManagerdirectly inside anG4EmStandardPhysics_AdePTand_HepEm. This can be done in a relatively clean way by deriving directly from theG4EmStandardPhysics.Now, it is clear that the AdePTPhysics list only replaces the G4EmStandardPhysics and is not equivalent with any other physics constructors.
This could be extended to other physics constructors as well.
NOTE: This PR does change the physics output and therefore is marked as unstable in the drift test.
In fact, the new implementation uncovers the issues of the original approach:
In
G4EmStandardPhysicsthe following flags are set:UseGeneralProcess = true FluctuationType = Urbanhowever, the
param->SetDefaults();from the previousAdePTPhysicssets it toUseGeneralProcess = false FluctuationType = UniversalThe drift test passes again if those flags are enforced as a regression via:
in the macro.
It was verified that this PR