Rdecay01 example not sampling multiple sources

Hi there,

I converted example Rdecay01 (changed PrimaryGen and Runaction) to use GPS instead of ParticleGun so that I could generate multiple ion sources and decay their full chains. Does anyone know why the analysis output only records the last written particle source?

for example a macro of:

macro for rdecay01

/control/verbose 2
/run/verbose 1

/rdecay01/fullChain true

/gps/source/intensity 1.
/gps/particle ion
/gps/ion 90 232
/gps/pos/type Volume
/gps/pos/shape Para
/gps/pos/centre 0. 0. 0. cm
/gps/pos/halfx 10. m
/gps/pos/halfy 10. m
/gps/pos/halfz 10. m
/gps/pos/confine matrix_physical

/gps/source/add 1.
/gps/particle ion
/gps/ion 19 40
/gps/pos/type Volume
/gps/pos/shape Para
/gps/pos/centre 0. 0. 0. cm
/gps/pos/halfx 10. m
/gps/pos/halfy 10. m
/gps/pos/halfz 10. m
/gps/pos/confine matrix_physical

/run/printProgress 10
/run/beamOn 10

Will always return the last listed ion (in this case K40):

Any ideas how I can return the breakdown of all the sources (ie 5 x Th , 5 x K40 etc)? I’m pretty confident that the both sources are being generated; just not recorded in the output.

Cheers,

Ed

_Geant4 Version:_11.2.2
_Operating System:_Windows 11 Pro 23H2 / WSL2
_Compiler/Version:_11.4
_CMake Version:_3.22.1


It is only a problem of printing the title : a run of rdecay01 was not supposed to have different primary ions.
with /run/printProgress 1, you will see that the two decay chains are correct and correctly printed !

Thanks for the suggestion! I tried this but it has not changed anything.

Any other ideas on how to make the rdecay01 example run multiple gps sources and print the breakdown of the events?