Skip to content

canIntersect: miss cylinder crossings when the field is tilted from the cylinder axis #238

Open

Description

@RobMina

Problem

canIntersect (Geometry/Intersect.hh) decides whether a helix–cylinder intersection is possible by testing whether the helix circle and the cylinder circle are nested only at the two ends of the query. If the field (bnom) is tilted from the cylinder axis, the helix axis drifts across the query and the circles can be nested in the middle even when both ends fail the cut.

In oksuzian's random comparison on #235, this accounts for 1,038 of 28,083 long-cylinder queries (same count before and after #235 — not touched by that PR). For those misses, the angle between field and cylinder axis has median ~165 mrad and minimum ~1.2 mrad. Example: end separations 160.3 mm and 151.96 mm vs cut |R_cyl − R_bend| − tol = 152.4 mm, yet the helix goes 5.4 mm into the cylinder in between.

Mu2e cylinders along z take this branch whenever a piece loops inside the query, so a piece whose bnom is tilted from z can lose a crossing (IPA / DS shells under bfcorr).

Suggested direction

Sample the nesting test at more times along the query (or along the drifting axis), or replace the two-end test with a bound that accounts for the maximum lateral drift of the axis over the range. Needs a unit / random harness like the #235 comparison.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions