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

Merged
merged 1 commit into from Mar 27, 2017

Conversation

Projects
None yet
2 participants
@shaojunlu
Contributor

shaojunlu commented Mar 24, 2017

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

  • Set verbose true for G4EmSaturation to printout Birks coefficient.

ENDRELEASENOTES

@andresailer

This comment has been minimized.

Member

andresailer commented Mar 24, 2017

Please fill the releaseNotes block

@shaojunlu shaojunlu force-pushed the shaojunlu:devel branch from a5c424a to 36426f6 Mar 27, 2017

@shaojunlu

This comment has been minimized.

Contributor

shaojunlu commented Mar 27, 2017

I have added the release notes, and rebased to the current master HEAD.

@@ -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);

This comment has been minimized.

@andresailer

andresailer Mar 27, 2017

Member

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.

This comment has been minimized.

@shaojunlu

shaojunlu Mar 27, 2017

Contributor

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?

This comment has been minimized.

@andresailer

andresailer Mar 27, 2017

Member

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

@shaojunlu shaojunlu force-pushed the shaojunlu:devel branch from d31b416 to 2716524 Mar 27, 2017

@shaojunlu

This comment has been minimized.

Contributor

shaojunlu commented Mar 27, 2017

Now I have the updated pull request after squash.

@andresailer andresailer merged commit b705051 into AIDASoft:master Mar 27, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@andresailer

This comment has been minimized.

Member

andresailer commented Mar 27, 2017

Thanks!

@shaojunlu shaojunlu deleted the shaojunlu:devel branch Mar 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment