Reduce verbosity of the output

Geant4 Version: 11.02
Operating System: Linux
_Compiler/Version:_11.4.0
_CMake Version:_3.26.1


I build a simulation based on the B2a example, using a G4ParticleGun to create the initial particles.
The Primary Generator reads the initial particles from a root file.
Everything works fine, the only issue is, that the output is quite verbose, to a level where in certain scenarios the G4out to the console slows down the simulation:

G4WT0 > → Event 0 starts with initial seeds (99050691,16604257).
G4WT0 > G4ParticleGun::mu-
G4WT0 > was defined in terms of KineticEnergy: 1GeV
G4WT0 > is now defined in terms Momentum: 0.262523GeV/c
G4WT0 > G4ParticleGun::proton
G4WT0 > was defined in terms of KineticEnergy: 0.0360342GeV
G4WT0 > is now defined in terms Momentum: 0.288524GeV/c
G4WT0 > G4ParticleGun::neutron
G4WT0 > was defined in terms of KineticEnergy: 0.0433024GeV
G4WT0 > is now defined in terms Momentum: 0.426778GeV/c

Is there a way to disable these outputs of the worker threads?

The messages are come from these lines: source/event/src/G4ParticleGun.cc · master · geant4 / geant4 · GitLab

I’d guess that the modifications are setting both the momentum and kinetic energy, so the messages can’t be disabled, but you can choose either to set the momentum/energy depending on what’s coming from the input file.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.