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

Adapt transformation function for PhotoPairInterpolant #383

Open Jean1995 opened 9 months ago

Jean1995 commented 9 months ago

This is an attempt at solving issue #382

The first approach that brought better results was to adapt the transformation function in x for the interpolation tables.

At the moment, the nodes in x in the interpolation tables are distributed linearly in the logarithmic room. However, as x is always between 0 and 1, and symmetric around 0.5, this transformation rule is not really suitable here. Therefore, I have changed the notes to be linear in x.

For large energies, this significantly improves the results. For small energies, there are still some problems, although the distribution at least looks more symmetric now.

I have also implemented functions to use the CrossSectionIntegral instead of CrossSectionInterpol functions for the secondary calculators of PhotoPairProduction, see #382, so I am able to make comparisons.

Improvements

Here are the sampled distributions for the current master and with this PR. Note that the computation time stays identical.

1e5 MeV Photons:

Old distributions:

image

New distributions:

image

10 MeV photons:

Old distributions:

image

New distributions:

image

2 MeV photons:

Here one can still see a significant deviation between Integral and Interpol.

Old distributions:

image

New distributions:

image

Jean1995 commented 9 months ago

Attention: For whatever reasons, tests are having problems at the moment...