-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix Geant4 step limiter when ionization is disabled #920
Conversation
… just the interaction length) when ionization is disabled in Geant4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch @amandalund ! I will wait on @mrguilima or @stognini to compare the results before merging.
@@ -85,6 +86,7 @@ GeantPhysicsList::GeantPhysicsList(Options const& options) : options_(options) | |||
em_parameters.SetMscEnergyLimit(100 * CLHEP::TeV); | |||
} | |||
em_parameters.SetApplyCuts(options.apply_cuts); | |||
this->SetDefaultCutValue(options.default_cutoff * CLHEP::cm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this forcefully override any cutoff value defined originally by the gdml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not positive about that... but at least I don't think it will change the current behavior: G4RunManagerKernel::InitializePhysics()
calls physicsList->SetCuts()
. The default SetCuts()
method in G4VUserPhysicsList
calls SetDefaultCutValue()
, so since we don't have our own SetCuts()
method it will be called either way. So all this should do is possibly change the default from 1 mm to something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that means that we have to add the SetCuts()
function in the near future, when we actually start using the secondary production thresholds correctly.
@stognini would this change have to be adapted to the separate validation code? |
Here is the summary after some testings today and discussing the results with @amandalund:
|
Yes. I am pushing that update to the |
I believe the difference @mrguilima is seeing between Geant4 and Celeritas in the bremsstrahlung step length is because the step is only being limited by the distance to interaction (and not the range) in our Geant4 apps. When a process is registered to the physics list, the default process ordering is used (this specifies in what order the processes' at rest, along-step, and post-step
GPIL
/DoIt
methods are called by the stepping manager, and whether any of them are inactive). The along-step methods for ionization are active and for bremsstrahlung are inactive by default, since the ionization dE/dx and range tables will contain the contributions from all energy loss processes. When ionization is missing, we need to activate the along-step for brems—that is done here in ourGeantPhysicsList
. I also added an option to set the default cutoff value (mainly for debugging).@mrguilima could you update the geant validation app with this change and see if the brems results improve?