Verbosity in sources listing

Geant4 Version: 10.7.1
Operating System: CentOS 7.9 x86_64
Compiler/Version: 6.3.1 20170523 (GCC)
_CMake Version:_3.17.3

Hi, I am adding source in a macro with :

/control/foreach configure_source.mac pname “mu-”
/gps/source/add 1
/gps/source/set 1
/control/foreach configure_source.mac pname “mu+”

where configure_source.mac is :

/gps/particle {pname}
/gps/ang/type beam1d
/gps/ang/sigma_r 2.0 deg
/gps/ene/mono 10.0 GeV

After I do /gps/source/list and get

The number of particle sources is: 2
Multiple Vertex sources: 0 Flat Sampling flag: 0
source 0 with intensity: 1
Num Particles: 1; Particle type: mu-
Energy: 1 MeV
Direction: (0,0,-1); Position: 54.3839 0 139.794 m
Angular Distribution: beam1d
Energy Distribution: Mono
Position Distribution Type: Point; Position Shape: NULL
source 1 with intensity: 1
Num Particles: 1; Particle type: mu+
Energy: 1 MeV
Direction: (0,0,-1); Position: 54.3839 0 139.794 m
Angular Distribution: beam1d
Energy Distribution: Mono
Position Distribution Type: Point; Position Shape: NULL

The printed energy is not correct. But running I see it is ok:

→ Event 0 starts.


  • G4Track Information: Particle = mu+, Track ID = 1, Parent ID = 0

Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
0 5.44e+04 0 1.4e+05 1e+04 0 0 0 Atmosphere initStep
1 1.02e+03 -185 1.2e+05 1e+04 1.97e-21 5.69e+04 5.69e+04 Ground Transportation
2 1.02e+03 -185 1.2e+05 1e+04 9.72e-26 2.81 5.69e+04 Atmosphere Transportation


  • G4Track Information: Particle = mu-, Track ID = 1, Parent ID = 0

Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
0 5.44e+04 0 1.4e+05 1e+04 0 0 0 Atmosphere initStep
1 1.38e+03 -22.6 1.2e+05 1e+04 1.95e-21 5.66e+04 5.66e+04 Ground Transportation
2 1.37e+03 -22.6 1.2e+05 1e+04 9.58e-26 2.77 5.66e+04 Atmosphere Transportation