57 const std::array<DiscretePhi0, 2>& phi0Vec = houghBox.getBounds<DiscretePhi0>();
58 const std::array<DiscreteCurv, 2>& curv = houghBox.getBounds<DiscreteCurv>();
60 std::array<float, 2> xRot;
61 xRot[0] = x * phi0Vec[0]->x() + y * phi0Vec[0]->y();
62 xRot[1] = x * phi0Vec[1]->x() + y * phi0Vec[1]->y();
64 const bool isNonCurler =
static_cast<float>(curv[1]) <=
m_curlCurv and
static_cast<float>(curv[0]) >= -
m_curlCurv;
65 const bool onlyPositiveArm = isNonCurler;
66 if (onlyPositiveArm) {
68 if (xRot[0] < 0 and xRot[1] < 0)
return TrackingUtilities::ESign::c_Invalid;
71 std::array<float, 2> yRotPlusL;
72 yRotPlusL[0] = -x * phi0Vec[0]->y() + y * phi0Vec[0]->x() + l;
73 yRotPlusL[1] = -x * phi0Vec[1]->y() + y * phi0Vec[1]->x() + l;
75 const float r2 = x * x + y * y - l * l;
76 std::array<float, 2> r2TimesHalfCurv;
77 r2TimesHalfCurv[0] = r2 * (
static_cast<float>(curv[0]) / 2.0);
78 r2TimesHalfCurv[1] = r2 * (
static_cast<float>(curv[1]) / 2.0);
81 std::array<float, 4> dist;
83 dist[0b00] = r2TimesHalfCurv[0] - yRotPlusL[0];
84 dist[0b10] = r2TimesHalfCurv[0] - yRotPlusL[1];
86 dist[0b01] = r2TimesHalfCurv[1] - yRotPlusL[0];
87 dist[0b11] = r2TimesHalfCurv[1] - yRotPlusL[1];