tudo-astroparticlephysics/PROPOSAL

Restructure `make_crosssection` for only-stochastic interactions

Opened this issue · 0 comments

When we want to create a crosssection object, we can use the make_crosssection function:

pp.crosssection.make_crosssection(parametrization, particle_def, medium, cuts, interpolate)

However, it the parametrization is only-stochastic, we don't need any energy cuts. If the user passes them anyways, this will cause an error since #271 has been merged.
This also means that the user has to explicitly pass a None object as a cut (or a nullptr/NULL in C++) every time he wants to create an only-stochastic cross section. While this makes clear that the parametrization is independent from the cut settings, it doesn't feel like a "good" design.

We might want to change this. Maybe we should restructure only-stochastic cross sections in general (maybe as an individual class type?). We might consider this when we implement only-stochastic propagation (e.g. neutrino propagation), which has already been mentioned here