No, the vertexKE of the secondary gamma should be the KE of the nucleus before that decay is generated (i.e., the KE of the nucleus at the input to the decay process). The KE after decay would be the output KE (momentum).
It sounds like VertexKE==0 is what you should be expecting; though maybe it’s not what you wanted ![]()
Unfortunately not. For the active G4Track object, there’s only one G4Step alive at a time (it gets reused along the way). What I would do is create a lookup table or something, then in your SteppingAction when you see an nCapture process happen, loop over the secondaries of that G4Step and store their initial (track) kinetic energy in the lookup table, keyed off the track pointer (the secondaries will not have a track ID assigned yet!). Or, your SteppingAction could look for tracks with CurrentStepNumber() == 1 (brand new tracks), for which the CreatorProcess is nCapture, and then you could use trackID as the key instead of the pointer. Whichever you prefer.
There might be another way. It’s possible to have Geant4 create a G4Trajectory object for each track, which persists for at least the lifetime of the track itself. That object does store the initial KE and momentum of the track, which you can retrieve. I have not used trajectories myself in code, so unfortunately I don’t know how to retrieve the trajectory of a given track, but it ought to be documented… Looks like basic examples B2a and B2b include the use of G4Trajectory objects in EventAction, so that might get you what you would need.