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

Set verbose true for G4EmSaturation to printout Birks coefficient. #134

Merged
merged 1 commit into from
Mar 27, 2017

Conversation

shaojunlu
Copy link
Contributor

@shaojunlu 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
Copy link
Member

Please fill the releaseNotes block

@shaojunlu
Copy link
Contributor Author

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);
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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

@shaojunlu
Copy link
Contributor Author

Now I have the updated pull request after squash.

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

Thanks!

@shaojunlu shaojunlu deleted the devel branch March 28, 2017 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants