we are planing to do a ML training for the signal of long kaon decay, but in our framework, we want to see the specific decay branch KL->3pi^0. So is it possible for us to retrieve the decay products, cut out other branches like decay into muon or charged pions and only keep the branch into 3 neutral pions using some Step Action user class functions?
Thank you for your help
That’s easy. In your Stepping Action, look at the list of secondaries. You’ll want to do lots of filtering first: particle type is one of K0L, K0 or anti-K0; track is in the fStopAndKill state, and the particle has secondaires. Then loop over the secondaries and see that there are exactly three pi0’s.
If you don’t want to track those secondaries or anything, then you can set the fKillSecondaries state. Check the documentation and examples for specifics (we don’t use this in our simulation, so I’m working from memory here).
Thank you for the reply and I’ve tried for that and got some results. But I do not know if the results correct. So is there any function for a verbose switch I could use to see the full event information? Like which particles it decayed to and what happened to them where?