19 const Vector2& dir,
bool boundCheck) {
20 using Line = Eigen::ParametrizedLine<ActsScalar, 2>;
21 using Plane = Eigen::Hyperplane<ActsScalar, 2>;
24 ActsScalar det = edge.x() * dir.y() - edge.y() * dir.x();
30 auto d =
line.intersectionParameter(Plane::Through(s0, s1));
32 Vector2 intersection(origin + d * dir);
35 auto edgeToSol = intersection - s0;
36 if (edgeToSol.dot(edge) < 0. or edgeToSol.norm() > (edge).
norm()) {
37 status = Intersection2D::Status::unreachable;
43 std::array<Acts::Intersection2D, 2>
50 const Vector2& alt) -> std::array<Acts::Intersection2D, 2> {
57 if (std::abs(solD) < std::abs(altD)) {
58 return {
Intersection2D(sol, solD, Intersection2D::Status::reachable),
61 return {
Intersection2D(alt, altD, Intersection2D::Status::reachable),
73 return createSolution(sol, alt);
76 Intersection2D::Status::reachable),
80 }
else if (std::abs(dir.y()) <
s_epsilon) {
87 return createSolution(sol, alt);
90 Intersection2D::Status::reachable),
108 return {
Intersection2D(sol, solD, Intersection2D::Status::reachable),
115 return createSolution(sol, alt);
123 auto intersections = intersectCircle(R, origin, dir);
124 for (
const auto& candidate : intersections) {
125 if (candidate.pathLength() > 0.) {
127 if (phi > phiMin and phi < phiMax) {