Problem 2207

Summary: /gps/source/list prints erroneous energy
Product: Geant4 Reporter: John.Allison
Component: eventAssignee: asai
Status: RESOLVED DUPLICATE    
Severity: minor    
Priority: P4    
Version: other   
Hardware: All   
OS: All   

Description John.Allison 2019-12-01 17:26:33 CET
After

  /gps/energy 99 eV

or whatever

  /gps/source/list

gives

  The number of particle sources is: 1
  ...
  Energy: 1 MeV
  ...

Somewhere along the line, in G4GeneralParticleSource::ListSource(), instead of the current energy, it invokes the default energy via G4Cache.

Fortunately, the output of /gps/source/list is just wrong. The energy actually used is, as far as I can see, the energy set in /gps/energy.
Comment 1 asai 2020-01-31 00:58:42 CET

*** This problem has been marked as a duplicate of problem 2136 ***
Comment 2 asai 2020-01-31 01:05:25 CET
If you still need to see the updated values before BeamOn, use /run/workersProcessCmds command that flashes all commands to worker threads.
Comment 3 John.Allison 2020-01-31 10:52:59 CET
/run/workersProcessCmds doesn't make any difference.

It's only the energy, as far as I can see, that is not correctly listed.