File indexing completed on 2025-12-15 09:42:21
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Surfaces/SurfaceBounds.hpp"
0013
0014 #include <array>
0015 #include <iosfwd>
0016 #include <vector>
0017
0018 namespace Acts {
0019
0020
0021
0022
0023 class LineBounds : public SurfaceBounds {
0024 public:
0025
0026
0027 enum BoundValues : int { eR = 0, eHalfLengthZ = 1, eSize = 2 };
0028
0029
0030
0031
0032
0033 explicit LineBounds(double r, double halfZ) noexcept(false)
0034 : m_values({r, halfZ}) {
0035 checkConsistency();
0036 }
0037
0038
0039
0040
0041 explicit LineBounds(const std::array<double, eSize>& values) noexcept(false)
0042 : m_values(values) {
0043 checkConsistency();
0044 }
0045
0046
0047 BoundsType type() const final { return eLine; }
0048
0049
0050 bool isCartesian() const final { return true; }
0051
0052
0053 SquareMatrix2 boundToCartesianJacobian(const Vector2& lposition) const final {
0054 (void)lposition;
0055 return SquareMatrix2::Identity();
0056 }
0057
0058
0059 SquareMatrix2 boundToCartesianMetric(const Vector2& lposition) const final {
0060 (void)lposition;
0061 return SquareMatrix2::Identity();
0062 }
0063
0064
0065
0066 std::vector<double> values() const final;
0067
0068
0069 bool inside(const Vector2& lposition) const final;
0070
0071
0072 Vector2 closestPoint(const Vector2& lposition,
0073 const SquareMatrix2& metric) const final;
0074
0075 using SurfaceBounds::inside;
0076
0077
0078
0079 Vector2 center() const final;
0080
0081
0082
0083
0084
0085 std::ostream& toStream(std::ostream& sl) const final;
0086
0087
0088
0089
0090 double get(BoundValues bValue) const { return m_values[bValue]; }
0091
0092 private:
0093 std::array<double, eSize> m_values;
0094
0095
0096
0097 void checkConsistency() noexcept(false);
0098 };
0099
0100 }