UImanager overwrites the primary gun data?

Say I am firing a beam of electrons and I have already have set the parameter in my generator.cc file as


Now say if I apply the follwing command:

/gun/energy 18 keV

In the UImanager. Would that overwrite my original particle energy for the rest of the session?

It depends on the order. If you initialize the ParticleGun in your generator constructor, then the UI command will override it. If you have the explicit SetParticleEnergy call in your generator’s GeneratePrimaries() function, then the function will override the UI command.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.