How to determine whether a particle is in an excited state

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

_Geant4 Version:_4.10.*
_Operating System:_linux
Compiler/Version:
CMake Version:


Hi,experts,
I’m new to Geant4 and I was wondering if there was a way to simulate only one decay branch of the isotope(85Kr). It seem that Geant4 can not do that.

Simulating Only One Decay Branch Using G4RadioactiveDecay - #2 by civanch

I’m working off of the rdecay01 example and looking at the decay of 85Kr, which has two decay modes that are produced at 0.4% (beta dacay to excited 85Rb) and 99% (beta decay to ground 85Rb). Now I am trying to determine whether a particle is in an excited state and output it by TTree.
can I achieve the function in UserSteppingAction?
here is my pseudo code.

const G4ParticleDefinition* particle = step->GetTrack()->GetParticleDefinition();
if(track->GetCreatorProcess()->GetProcessName()=="betadecay"){
    if(son of particle->IsExcited()){ tree.IsExcited_.push_back(true ); }
    else{                             tree.IsExcited_.push_back(false); }
}

Thanks for any help! :smiley:

I don’t think what you’re proposing here will work. Only if the Kr99* excited state is a known and defined metastable state (like Tc99m), the G4 will create it as a particle. Otherwise, the excited daughter nucleus will automatically be passed to the de-excitation code in the same step as radioactive decay.

What you’ll see in your stepping action (or SD) is the ground state Kr85, the electron and neutrino from the beta decay, and gammas from the de-excitation process. So you could include in your SteppingAction a “quick” analysis of the list of secondaries – if you see one or more gammas, then it was the excited-state channel.

Another option, if you want to simulate only the excited-state channel, would be to edit the $G4RADIOACTIVEDECAY/z36.a85 file (as suggested by Vladimir), removing the five lines for the ground-state channel.

1 Like

Thanks for your help! I will try both. :smiley:

1- be care if you edit radioactiveDecay data. The file must remain compatible with G4ENSDFSTATE and PhotonEvaporation datasets …
My experience: do not try to add or remove any lines. Only play with Intensity column.
Here, a modified z36.a85 file, in which I only changed intensity in lines 5 and 7 (shiqiang.z36a85.txt) : Kr85 decays at 100% on excited state Rb85[514.006]

2- you may wish do not touch RadioactiveDecay dataset itself.
you can create your own z36a85 file, and use UI command /process/had/rdm/setRadioactiveDecayFile
to inform the system where to find your file.

This is what is done in the attached macro :

shiqiang.z36a85.txt (1010 Bytes)
shiqiang.mac.txt (397 Bytes)
shiqiang.out.txt (2.1 KB)

1 Like

That’s really helpful!! :smiley:thanks!

Just a reminder for someone try to use /process/had/rdm/... in Geant4.10.04*, the UI command should be /grdm/... in Geant4.10*. :joy:
https://geant4-forum.web.cern.ch/t/grdm-command-not-found-in-geant4-11-1/10299/2

To come back to your initial question,
in TrackingAction::PreUserTrackingAction(), I would do something like that :
G4ParticleDefinition* particle =track->GetDefinition();
G4double charge = particle->GetPDGCharge();
// is it an G4Ions ?
if (charge > 2.) {
G4double excitationEnergy = ((const G4Ions*)(particle)) → GetExcitationEnergy();
… your code …
}

To be honest, I did not test it …

1 Like

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