Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid stuck particles #341

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Avoid stuck particles #341

wants to merge 2 commits into from

Conversation

Jean1995
Copy link
Member

@Jean1995 Jean1995 commented Jan 20, 2023

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)

@Jean1995 Jean1995 added the bug label Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant