yes, you are right.
as you say: the current particle “b” i am interested in can be obtained from " track->GetParticleDefinition()->GetParticleName() ”.
at the same time, i want to know how the particle “b” is produced,
so first i get the physics process from “track->GetCreatorProcess()”.
then through the process, the target nucleus can be obtained from “process->GetTargetNucleus()”.
but how to obtain the incident particle “a”?
the incident particle “a” can be obtained from the process “track->GetCreatorProcess()”?
By the time particle b exists and you’re recording it, particle a has already been deleted (G4 does not keep G4Track instances around after they are stopped-and-killed).
If you have a stepping action, instead of catching particle b, you could look for the step where particle a is being killed, and record the information there.