Adapt transformation function for PhotoPairInterpolant #383
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: