Skip to content

Commit

Permalink
Improved the verbose configuration to avoid calling 'SetVerbose' for …
Browse files Browse the repository at this point in the history
…every step in newer geant4 versions.
  • Loading branch information
shaojunlu committed Mar 27, 2017
1 parent 36426f6 commit d31b416
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DDG4/src/Geant4StepHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ G4ThreeVector Geant4StepHandler::globalToLocalG4(const G4ThreeVector& global) c
/// Apply BirksLaw
double Geant4StepHandler::birkAttenuation() const {
#if G4VERSION_NUMBER >= 1001
static G4EmSaturation s_emSaturation(0);
static G4EmSaturation s_emSaturation(1);
#else
static G4EmSaturation s_emSaturation();
s_emSaturation.SetVerbose(true);
#endif

double energyDeposition = step->GetTotalEnergyDeposit();
Expand All @@ -125,7 +126,6 @@ double Geant4StepHandler::birkAttenuation() const {
const G4Track* trk = step->GetTrack();
const G4ParticleDefinition* particle = trk->GetDefinition();
const G4MaterialCutsCouple* couple = trk->GetMaterialCutsCouple();
s_emSaturation.SetVerbose(true);
double engyVis = s_emSaturation.VisibleEnergyDeposition(particle,
couple,
length,
Expand Down

0 comments on commit d31b416

Please sign in to comment.