Analysis Software
Documentation for sPHENIX simulation 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 
13 
14 #include <array>
15 
16 namespace Acts {
17 namespace detail {
18 
28  static Intersection2D intersectSegment(const Vector2& s0, const Vector2& s1,
29  const Vector2& origin,
30  const Vector2& dir,
31  bool boundCheck = false);
32 
41  static std::array<Intersection2D, 2> intersectEllipse(ActsScalar Rx,
42  ActsScalar Ry,
43  const Vector2& origin,
44  const Vector2& dir);
45 
53  static inline std::array<Intersection2D, 2> intersectCircle(
54  ActsScalar R, const Vector2& origin, const Vector2& dir) {
55  return intersectEllipse(R, R, origin, dir);
56  }
57 
70  ActsScalar phiMax,
71  const Vector2& origin,
72  const Vector2& dir);
73 
74 }; // struct IntersectionHelper2D
75 
76 } // namespace detail
77 } // namespace Acts