tudo-astroparticlephysics / PROPOSAL

Monte Carlo Simulation propagating charged Leptons through Media as C++ Library
GNU Lesser General Public License v3.0
35 stars 21 forks source link

Electron-positron pair production: Numerical instable energy asymmetry sampling #382

Open Jean1995 opened 9 months ago

Jean1995 commented 9 months ago

For electron-positron pair production by photons: When sampling the energy asymmetry x = E_electron / (E_electron + E_positron), one would expect a symmetric distribution.

If I sample a distribution for x, however, this is not fulfilled. See this example where I sample x for a photon energy of 10 MeV:

image

Same problem for Tsai instead of KochMotz:

image

The issue persists when going to higher energies, here for a photon energy of 1e5 MeV:

image

image

In each case, X Interpol refers to the secondary calculation using the CrossSectionInterpol functions, while X Integral refers to calculations based on the CrossSectionIntegral functions. The integral calculations seems to be fine, while only the interpol calculations behave incorrectly.

Jean1995 commented 9 months ago

Related to #349 and #345

Jean1995 commented 9 months ago

I have openened a PR (#383) where I attempted a fix. This at least fixes the issue for high-energies (where pairproduction is also the dominant process), but it is not able to completely fix the problem at lower energies.

Please feel free to add suggestions for improvements