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:
New distributions:
10 MeV photons:
Old distributions:
New distributions:
2 MeV photons:
Here one can still see a significant deviation between Integral and Interpol.
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:
New distributions:
10 MeV photons:
Old distributions:
New distributions:
2 MeV photons:
Here one can still see a significant deviation between Integral and Interpol.
Old distributions:
New distributions: