Skip to content

Conversation

simonge
Copy link
Contributor

@simonge simonge commented Jul 3, 2025

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:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

Does this PR change default behavior?

@simonge simonge linked an issue Jul 3, 2025 that may be closed by this pull request
@simonge simonge changed the title Fixes for stuck particles Fixes stuck particles in far backward hadron beampipe Jul 3, 2025
// 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) {
Copy link
Contributor

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.

@wdconinc
Copy link
Contributor

wdconinc commented Jul 3, 2025

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?

@simonge
Copy link
Contributor Author

simonge commented Jul 4, 2025

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.

veprbl added a commit that referenced this pull request Jul 5, 2025
@github-actions github-actions bot added the topic: infrastructure Regarding build system, CI, CD label Jul 8, 2025
@veprbl
Copy link
Member

veprbl commented Jul 8, 2025

Are we sure this fixes the issue? Both this
https://github.com/eic/epic/actions/runs/16149508034/job/45578171919?pr=903
and
https://github.com/eic/epic/actions/runs/16148429398/job/45573677085
show two issues for Pipe_Q1APR_to_B1PR_assembly

@simonge
Copy link
Contributor Author

simonge commented Jul 8, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: far-backward topic: infrastructure Regarding build system, CI, CD
Development

Successfully merging this pull request may close these issues.

Navigation issue in far-backward
3 participants