From d31b41666e8c31b0cec9fcd94606528e979183af Mon Sep 17 00:00:00 2001 From: Shaojun Lu Date: Mon, 27 Mar 2017 12:16:10 +0200 Subject: [PATCH] Improved the verbose configuration to avoid calling 'SetVerbose' for every step in newer geant4 versions. --- DDG4/src/Geant4StepHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DDG4/src/Geant4StepHandler.cpp b/DDG4/src/Geant4StepHandler.cpp index 59872624a..2da647a7a 100644 --- a/DDG4/src/Geant4StepHandler.cpp +++ b/DDG4/src/Geant4StepHandler.cpp @@ -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(); @@ -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,