26 outer.yCoordinate - inner.yCoordinate,
27 outer.zCoordinate - inner.zCoordinate);
34 const SVector3f delta = p - line.originPoint;
35 const float proj = ROOT::Math::Dot(delta, line.cosinesDirector);
36 const SVector3f residual = delta - proj * line.cosinesDirector;
37 return ROOT::Math::Dot(residual, residual);
48 const float norm2 = ROOT::Math::Dot(
n,
n);
55 return ROOT::Math::Dot(residual, residual);
59 const float numerator = ROOT::Math::Dot(delta,
n);
60 return (numerator * numerator) / norm2;
71 const SVector3f delta = line.originPoint - p;
72 const float proj = ROOT::Math::Dot(line.cosinesDirector, delta);
73 const SVector3f residual = delta - proj * line.cosinesDirector;
77 m(0, 0) = residual(0);
78 m(1, 1) = residual(1);
79 m(2, 2) = residual(2);
80 m(0, 1) = std::hypot(
m(0, 0),
m(1, 1));
81 m(0, 2) = std::hypot(
m(0, 0),
m(2, 2));
82 m(1, 2) = std::hypot(
m(1, 1),
m(2, 2));
94 LOGP(info,
"\tLine: originPoint = ({}, {}, {}), cosinesDirector = ({}, {}, {}) ts={}+-{}",
97 mTime.getTimeStamp(),
mTime.getTimeStampError());
112 const double det = ROOT::Math::Dot(d, d);
115 for (
int i = 0;
i < 3; ++
i) {
116 for (
int j =
i;
j < 3; ++
j) {
122 const double dDotO = ROOT::Math::Dot(d, o);
123 for (
int i = 0;
i < 3; ++
i) {
133 if (secondLabel > 0) {
134 mLabels.push_back(secondLabel);
153 if (lineLabels.size() < 2) {
157 mLabels.reserve(lineLabels.size());
158 mTime = lines[lineLabels[0]].mTime;
160 const auto lineLabel = lineLabels[
index];
162 mTime += lines[lineLabel].mTime;
176 const auto lineLabel = lineLabels[
index];
211 return mRMS2 == rhs.mRMS2 &&
212 mVertex == rhs.mVertex &&
213 mLabels == rhs.mLabels &&
214 mAvgDistance2 == rhs.mAvgDistance2;
void accumulate(const Line &line)
bool operator==(const ClusterLines &rhs) const noexcept
auto getSize() const noexcept
void add(const int lineLabel, const Line &line)
std::vector< int > mLabels
std::array< float, 3 > mVertex
void computeClusterCentroid()
GLenum GLint GLint * precision
SVector3f cosinesDirector
static float getDistance2FromPoint(const Line &line, const std::array< float, 3 > &point)
bool isEmpty() const noexcept
static float getDCA2(const Line &, const Line &, const float precision=constants::Tolerance)
static float getDCA(const Line &, const Line &, const float precision=constants::Tolerance)
ROOT::Math::SVector< float, 3 > SVector3f
static float getDistanceFromPoint(const Line &line, const std::array< float, 3 > &point)
static SMatrix3f getDCAComponents(const Line &line, const std::array< float, 3 > &point)