Location of Muon Decay

Hello, I am working on a project where I am simulating example muons and I am trying to figure out where they decay inside our detector, if at all. We already have a running simulator using Geant4 and I want to know how to modify it so that I can get this information. Does anyone know the easiest way to do this or would anyone have any example projects which I could take a look at? Thanks!

A very simple way would be to write either a SteppingAction or a SensitiveDetector attached to your detector (assuming you only care about muon decays within that specific volume). Look for the step which belongs to a muon, which is fStopAndKill (i.e., after decay), and get the post-step position.

1 Like