EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IntersectionHelper2D.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file IntersectionHelper2D.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
11 #include <utility>
12 
15 
16 namespace Acts {
17 namespace detail {
18 
28  static Intersection2D intersectSegment(const Vector2D& s0, const Vector2D& s1,
29  const Vector2D& origin,
30  const Vector2D& dir);
31 
40  static std::pair<Intersection2D, Intersection2D> intersectEllipse(
41  double Rx, double Ry, const Vector2D& origin, const Vector2D& dir);
42 
50  static inline std::pair<Intersection2D, Intersection2D> intersectCircle(
51  double R, const Vector2D& origin, const Vector2D& dir) {
52  return intersectEllipse(R, R, origin, dir);
53  }
54 
55 }; // struct IntersectionHelper2D
56 
57 } // namespace detail
58 } // namespace Acts