Particle Tracking Total Distance Advice

Hello!

I’m trying to track the furthest distance that electrons can travel through a solid composed of two layers (thin metallic contact on a detector layer), and output the final position in the solid of each primary particle.

Could someone please advise on how I might do this? I’m a novice GEANT4 user and I’m a bit confused!