Getting x position of primary particle

Hello, I simulate the e+e- ->mu+mu- interaction using a positron beam hitting a fixed target
Is there a way to get the x position of the primary e+ that produced the mu+/- ?
Thank you

Yes. You can get the full coordinate location from the G4Step at the interaction, or you can get the “vertex position” of the secondary track (G4Track::GetVertexPosition()), which tells you where it was produced.

Thank you for your reply @mkelsey