Removing particle gun verbosity

Geant4 Version: 11.2.0
Operating System: Windows 10 + WSL 2.0
Compiler/Version: gcc 11.4.0
CMake Version: 3.22.1


I am sampling the momentum of a particle from a gaussian distribution at each event. In doing so, everytime the moment is sampled the following lines are being printed:

G4ParticleGun::mu-
 was defined in terms of KineticEnergy: 0.000679258GeV
 is now defined in terms Momentum: 0.0118651GeV/c

Since I’m running a lot of events per run these prints become very annoying. Is there a way to stop them? I don’t seem to find any /verbose command that removes this prints.

My particle gun is a G4ParticleGun.

HI there,

I’m encountering the exact same issue, were you able to find a solution to it please ?

Many thanks,

Sorry, I didn’t find any solution

@Oussama_Elkhiar

I suggest you to look this thread. Might be of your interest.

In my case it worked pretty well.

Regards
Vijay