Add two tests dealing with 0_mb cross sections in Cascade and ProcessSequence
This PR adapts the ProcessSequence in such a way that when we call selectInteraction()
with cx_select
and cx_sum
being zero, we don't automatically call the first interaction process anymore. Instead, we call no interaction process at all. This situation occurred for shower simulations if, due to continuous energy losses, the total cross section became zero after a continuous step. See #584 (closed) for details.
Furthermore, I have adapted the procedure in Cascade.inl
. When we determine that a discrete interaction is the limiting process (i.e. either a decay or an interaction), we have always deleted the original particle from the stack so far. With this change, we actually check first whether interaction
has returned that the particle actually interacted, or whether decay
has returned that the particle actually did decay. Note that the ProcessSequence will return ProcessReturn::Decayed
or ProcessReturn::Interacted
if it was able to call the doDecay
or doInteraction
method. This should always be the case, unless we have the situation that I have described in the first paragraph.
I have also added two UnitTests which check this beavior, see my commit messages or the comments in the code for more information about them. The tests should fail on the current master (first commit), but succeed with the changes from this PR (second commit).
This PR also does preparations necessary to solve #584 (closed), although this is not necessarily the highest priority.
Mainly, it is important because it closes #584 (closed).