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.
Testing #338, I encountered (another) bug in the Propagator which can cause it to stuck.
The problem is the following situation: We do a large propagation step (in this case: 5000 km (!) in air) towards a border.
Since the step is very big, our particle is not exactly on the sector border in this step (remember that PROPOSAL saves distances in cm), but just slightly before the detector (~ 1e-7 cm). Since we have already propagated very far, we can't properly distinguish between the position before and after the sector border - Adding this remaining distance to the particle position doesn't actually change the particle position anymore.
Apparently, this is working again when we add a very small extra distance to our propagation step (GEOMETRY_PRECISION, 1e-9) so that we are always behind the sector border after a propagation step.
I have added a UnitTest, which got stuck within the first 5 particles without the bugfix, but runs through now.
I don't think that this should break other stuff, since the particle position resolution (which is relevant for other, non-geometric calculations) is much higher (1e-4cm)