From 917eeecefdea74eb04736989993c728569b40069 Mon Sep 17 00:00:00 2001 From: Benjamin Huth <37871400+benjaminhuth@users.noreply.github.com> Date: Wed, 1 Feb 2023 17:04:12 +0100 Subject: [PATCH] refactor: Suppress large printout of Geant4 (#1791) This PR suppresses the large printout of physics parameters at the beginning of each Sequencer run by default. --- Examples/Algorithms/Geant4/src/Geant4Simulation.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Examples/Algorithms/Geant4/src/Geant4Simulation.cpp b/Examples/Algorithms/Geant4/src/Geant4Simulation.cpp index 3624dd33a9a..560ac994c7d 100644 --- a/Examples/Algorithms/Geant4/src/Geant4Simulation.cpp +++ b/Examples/Algorithms/Geant4/src/Geant4Simulation.cpp @@ -17,7 +17,10 @@ #include #include +#include #include +#include +#include #include #include #include @@ -29,6 +32,7 @@ #include #include #include +#include namespace { /// Helper method to add the user actions @@ -84,6 +88,13 @@ ActsExamples::Geant4Simulation::Geant4Simulation( G4EventManager::GetEventManager()->GetStackManager()->SetVerboseLevel( geantVerboseLevel); + // Suppress the printing of physics information. +#if G4VERSION_NUMBER >= 1100 + G4HadronicParameters::Instance()->SetVerboseLevel(0); + G4HadronicProcessStore::Instance()->SetVerbose(0); + G4EmParameters::Instance()->SetIsPrintedFlag(true); +#endif + // Set the detector construction m_cfg.runManager->SetUserInitialization(m_cfg.detectorConstruction);