Preventing De-exititation of exited states of atoms


I’m working on a simulation using Geant4 where I want to pick the decays that are happening in the simulation based on lifetime of the particle. If the lifetime is longer than a given value I want to stop the decay chain.
For Radioactive particles this worked fine by using for the G4ParticleDefinition:: SetPDGLifetime(-1). This stopped all decays of the radioactive particles.

This however did not work for the exited states in the simulation.
I simulated Cs137 decay which first goes to Ba137[661.659] before releasing its characteristic 662KeV photon and going to Ba137. The only way I could find to stop the exited state from decaying is to stop the track from propagating by SetTrackStatus(fStopAndKill).

I would however like to propagate these states without them “relaxing” to their non-exited state.

Does anyone have an idea how I can do this?
(note: I already tried setting SetPDGStable(true) or deleting its decay table but neither worked)



Geant4 creates ions dynamically when they are needed in a simulation. You may need to add a user action that disables the decays for dynamically created ions and their excited states as they are created by Geant4 during your simulation.


particle properties are static, should not be changed by user code.

If in your setup you need stop simulation after some time you need to use one of available limiters. There are G4NeutronKiller attached to each reference Physics List, one of parameters is the time window. More general is G4UserLimit, which may be attached to a logical volume and enabled in G4StepLimiterPhysics is attached to user PhysicsLIst.

Please, seach inside Geant4 examples various limiters.