Custom cross-section for hadronic processes

Hello Aleksei!
Thanks a lot for the useful feedback!
I think in my case even the approach described in your wiki (G4DiscreteProcess) is an overkill. I have decided to try to implement my custom cross-sections using the SteppingAction. The reason is that I do not need to track any reaction products. But essentially, the idea is the same you are proposing:
Calculate the mean free path for the current material based on the step length and use the random generator to check if the process should be triggered (in this case the particle is killed).
Thanks again!
Andrey