1 #ifndef RecoPixelVertexingPixelTripletsCircleEq_H
2 #define RecoPixelVertexingPixelTripletsCircleEq_H
28 constexpr
CircleEq(
T x1,
T y1,
T x2,
T y2,
T x3,
T y3) {
compute(x1, y1, x2, y2, x3, y3); }
73 auto x1p = noflip ? x1 - x2 : y1 - y2;
74 auto y1p = noflip ? y1 - y2 : x1 - x2;
75 auto d12 = x1p * x1p + y1p * y1p;
76 auto x3p = noflip ? x3 - x2 : y3 - y2;
77 auto y3p = noflip ? y3 - y2 : x3 - x2;
78 auto d32 = x3p * x3p + y3p * y3p;
80 auto num = x1p * y3p - y1p * x3p;
81 auto det = d12 * y3p - d32 * y1p;
83 auto st2 = (d12 * x3p - d32 * x1p);
84 auto seq = det * det + st2 * st2;
86 auto be2 = -st2 * al2;
87 auto ct =
T(2.) *
num * al2;
92 m_c = noflip ? ct : -ct;
93 m_alpha = noflip ? al2 : -be2;
94 m_beta = noflip ? be2 : -al2;
constexpr std::pair< T, T > cosdir(T x, T y) const
Abs< T >::type abs(const T &t)
constexpr void compute(T x1, T y1, T x2, T y2, T x3, T y3)
constexpr auto radius() const
constexpr std::pair< T, T > center() const
constexpr CircleEq(T x1, T y1, T x2, T y2, T x3, T y3)
constexpr T dca(T x, T y) const
constexpr std::pair< T, T > cosdir() const
constexpr auto curvature() const