Computing Probability of Scattering Direction (Hadronic Physics)

When an elastic hadronic process occurs the particles momentum is changed based on the scattering interaction (which is based on the cross sections). Is it possible to reverse engineer the probability of the scattering such that I could find the chance for scattering of a specific angle? I have been looking in depth through the source code and think that what I am looking for is probably part of the G4ParticleHPElasticFS class, but that data is private to the class. Are there any other hooks and/or methods at getting to the data I would need?

For reference, the goal is to be able to calculate the probability of a particle scattering a specific angle such that it would interact with a detector in order to compute a next event estimator flux.

I think trying to extract that sort of macroscopic parameter from the code would be difficult/impossible. An incident projectile could scatter more than once in your target before exiting on the way to a detector. If you extract the microscopic (single interaction) angular distribution, you’d have to convolute that to get a macroscopic direction.

What you could do, relatively “easily”, is use either a SteppingAction, or a spherical scorer centered on your target, and just record the outgoing direction for many events. That’ll give you the macroscopic angular distribution you want.

I fully expect the incident particle to scatter several times, but what I am interested in is getting the single interaction angular distribution each time the particle does scatter. I realize that several processes can be applied on top of each other to give the end result.

Note that I could achieve this by assuming hard shell elastic collisions, taking the cross section from Geant4 and computing the probability of scattering through an angle, however this doesn’t seem to be the way the final state momentum direction is picked in Geant4 (at least as far as I can tell).

Okay, if you’re interested in the single interaction distribution, you’re probably best off using a SteppingAction to get that, by comparing the pre-step and post-step direction vectors, where the post-step “process which limited the step” is hElastic (I think that’s the right name string).