-
Notifications
You must be signed in to change notification settings - Fork 100
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
Set verbose true for G4EmSaturation to printout Birks coefficient. #134
Conversation
Please fill the releaseNotes block |
I have added the release notes, and rebased to the current master HEAD. |
DDG4/src/Geant4StepHandler.cpp
Outdated
@@ -125,6 +125,7 @@ double Geant4StepHandler::birkAttenuation() const { | |||
const G4Track* trk = step->GetTrack(); | |||
const G4ParticleDefinition* particle = trk->GetDefinition(); | |||
const G4MaterialCutsCouple* couple = trk->GetMaterialCutsCouple(); | |||
s_emSaturation.SetVerbose(true); |
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.
a) SetVerbose takes an int, http://www-geant4.kek.jp/Reference/10.02.p02/classG4EmSaturation.html
b) It would be better to set the argument in line 117 to 1
, and only call SetVerbose(1)
for older geant versions. by putting the call in the if/else pre-processor block.
Then we can avoid calling this function for every step at least in newer geant4 versions.
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 have updated it as you suggested.
Should I keep this pull request as the current?
Or should I remove this pull request, and generate a new one to include the last update only?
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.
SetVerbose
is still called with a boolean instead of an int.
You could "squash" the two commits into one and force push to this branch, e.g., by using git rebase --interactive
Now I have the updated pull request after squash. |
Thanks! |
Added printout information for user to check the Birks Law usage at ddsim/Geant4 runtime.
It will printout only once in the first event like this.
G4EmSaturation::FindBirksCoefficient Birks coefficient for G4_POLYSTYRENE 0.07943 mm/MeV
BEGINRELEASENOTES
ENDRELEASENOTES