_Geant4 Version:_geant4-v11.0.3
_Operating System:_macOS Monterey 12.6
_Compiler/Version:_Apple clang version 14.0.0 (clang-1400.0.29.102) gcc
_CMake Version:_3.24.3
— Hello all, I’m searching for an opportunity to identify primary particles (various ions), starting from the general particle source, in my target region using the Stepping Action. I know that that the track ID for primary particles is always 1, but as ions can “lose” their track ID of 1 after certain interactions (from Geant4 Course at PTB) while they still should be considered as primary particles, this method is not sufficient. Is there some general approach so get the information: from source: yes/no? I would like to simply change the ion in my gps macro without the need to write down all particle types in the Stepping Action or changing the line
step->GetTrack()->GetParticleDefinition()->GetParticleName() == "alpha"
for each ion I specify in the gps.
Thank you very much!