Problem 2207 - /gps/source/list prints erroneous energy
Summary: /gps/source/list prints erroneous energy
Status: RESOLVED DUPLICATE of problem 2136
Alias: None
Product: Geant4
Classification: Unclassified
Component: event (show other problems)
Version: other
Hardware: All All
: P4 minor
Assignee: asai
URL:
Depends on:
Blocks:
 
Reported: 2019-12-01 17:26 CET by John.Allison
Modified: 2020-01-31 10:52 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
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.