File indexing completed on 2025-12-16 09:25:35
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include <cmath>
0012 #include <optional>
0013
0014 namespace ActsTests {
0015
0016 struct SpacePoint {
0017
0018 float m_x{};
0019 float m_y{};
0020 float m_z{};
0021 float m_r{};
0022 int layer{};
0023 float varianceR{};
0024 float varianceZ{};
0025 std::optional<float> m_t;
0026 std::optional<float> varianceT;
0027
0028
0029 SpacePoint() = default;
0030
0031
0032 SpacePoint(float x, float y, float z, float r, int l, float varR, float varZ,
0033 std::optional<float> t, std::optional<float> varT)
0034 : m_x(x),
0035 m_y(y),
0036 m_z(z),
0037 m_r(r),
0038 layer(l),
0039 varianceR(varR),
0040 varianceZ(varZ),
0041 m_t(t),
0042 varianceT(varT) {}
0043
0044
0045 float x() const { return m_x; }
0046 float y() const { return m_y; }
0047 float z() const { return m_z; }
0048 float r() const { return m_r; }
0049 std::optional<float> t() const { return m_t; }
0050
0051
0052 friend bool operator==(const SpacePoint &a, const SpacePoint &b) {
0053 return std::abs(a.m_x - b.m_x) < 1e-6 && std::abs(a.m_y - b.m_y) < 1e-6 &&
0054 std::abs(a.m_z - b.m_z) < 1e-6;
0055 }
0056 };
0057
0058 }