/gps/source/list results are not correct (?)

Hi there,

I’ve noticed a strange behaviour when issuing the command /gps/source/list.

Before I run any other /gps/ command, the command mentioned above returns the following:

/gps/source/list
The number of particle sources is: 1
 Multiple Vertex sources: 0 Flat Sampling flag: 0
    source 0 with intensity: 1
         Num Particles: 1; Particle type: geantino
         Energy: 1 MeV
         Direction: (0,0,-1); Position: 0 0 0 fm 
         Angular Distribution: planar
         Energy Distribution: Mono
         Position Distribution Type: Point; Position Shape: NULL

I then issue the command to execute my source.mac:

/control/execute source.mac

/gps/particle alpha
/gps/energy 20 MeV
/gps/direction 0. 0. 1.
/gps/pos/centre 0. 0. -0.1 um

And when issuing once again the /gps/source/list command, this is what is retrieved:

/gps/source/list
The number of particle sources is: 1
 Multiple Vertex sources: 0 Flat Sampling flag: 0
    source 0 with intensity: 1
         Num Particles: 1; Particle type: alpha
         Energy: 1 MeV
         Direction: (0,0,1); Position: 0 0 -100 nm 
         Angular Distribution: planar
         Energy Distribution: Mono
         Position Distribution Type: Point; Position Shape: NULL

I draw particular attention to the energy presented, which does not correspond to the command I ran earlier (/gps/energy 20 MeV), but both the direction and the particle are updated. Is this the correct behaviour? I have experienced this on Geant4.10.07.p02 and I installed version 11, but the results were the same (the code and results I present here are from G4.11)

If I then increase the tracking verbosity and run /run/beamOn 1, I see that the particle has the correct energy


G4Track Information: Particle = alpha, Track ID = 1, Parent ID = 0


Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
0 0 0 -0.0001 20 0 0 0 World initStep
1 0 0 -1.76e-19 20 4.15e-06 0.0001 0.0001 MylarFoil Transportation
2 -5.48e-09 9.37e-10 0.005 19.8 0.176 0.005 0.0051 ScintillatorFoil Transportation
3 -2.9e-05 -2.41e-05 0.015 19.5 0.338 0.01 0.0151 Biofoil Transportation
4 -0.00011 -9.15e-05 0.04 18.1 1.4 0.025 0.0401 World Transportation
5 -0.00011 -9.15e-05 0.04 18.1 1.5e-08 2.84e-07 0.0401 Cell Transportation
6 -0.000123 -9.66e-05 0.0415 18 0.0632 0.0015 0.0416 Nucleus Transportation
7 -0.000194 -0.000119 0.0485 17.8 0.26 0.00699 0.0486 Cell Transportation
8 -0.000211 -0.000128 0.05 17.7 0.0523 0.00151 0.0501 World Transportation
9 -0.000358 -0.00021 0.0639 17.7 0.000881 0.0139 0.064 World ionIoni
10 -0.00055 -0.000316 0.082 17.7 0.00115 0.0181 0.0821 OutOfWorld Transportation