-
Notifications
You must be signed in to change notification settings - Fork 50
Fixes stuck particles in far backward hadron beampipe #903
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
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
src/BeamPipeChain_geo.cpp
Outdated
// Start at the join between the first two pipes ending at the join between the last two pipes N-1 | ||
if (thetas[i - 1] == thetas[i]) { | ||
double bendAngle = thetas[i] - thetas[i - 1]; | ||
if (std::abs(bendAngle) < 0.00001) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Optional) Use explicit units, maybe in mrad.
Is there a way we can catch these overlaps without waiting until someone sees a warning in a Geant4 simulation? Smaller tolerance on the tgeo-based overlap check? |
I believe this snuck through because currently the effected beampipes are only in the extended geometry which isn't tested automatically. |
This is a test for #903 (comment)
Are we sure this fixes the issue? Both this |
I believe the particles aren't getting stuck in tiny overlaps anymore but there is another, apparently, smaller issue with larger overlaps still present. Waiting for one of the CI simulations to run to confirm this. |
Briefly, what does this PR introduce?
Appears to fix #902.
Tiny torus segments were being created where the alignment of one tube didn't match the next due to floating point rounding errors. Below a limit of 0.01 mrad difference now is rounded down to 0.
Length of
Pipe_to_Q1APR
has also been fixed so it correctly joins with the central beampipe.Most of this may be reworked again after #893 and #838
What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
Does this PR change default behavior?