3 #include <Math/Point3D.h>
5 #include <TMatrixTSym.h>
6 #include <TMatrixTUtils.h>
20 for (
auto &hit :
fHits) {
21 auto hitPos = hit.GetPosition();
22 pos.SetCoordinates(pos.X() + hitPos.X(), pos.Y() + hitPos.Y(), pos.Z() + hitPos.Z());
24 return pos /
fHits.size();
32 std::array<double, 3> pos{}, hitPos{};
34 for (
const auto &hit :
fHits) {
35 hit.GetPosition().GetCoordinates(hitPos.begin());
37 for (
int i = 0; i < 3; ++i)
38 for (
int j = 0; j < 3; ++j)
39 cov[i][j] += (hitPos[i] - pos[i]) * (hitPos[j] - pos[j]) / (
fClusterSize - 1);
50 std::array<double, 3> pos{}, hitPos{};
52 for (
const auto &hit :
fHits) {
53 hit.GetPosition().GetCoordinates(hitPos.begin());
55 for (
int i = 0; i < 3; ++i)
56 for (
int j = 0; j < 3; ++j)
57 cov[i][j] += hit.GetCharge() * (hitPos[i] - pos[i]) * (hitPos[j] - pos[j]) / (
fCharge - 1);
68 std::array<double, 3> pos{}, hitPos{};
70 for (
const auto &hit :
fHits) {
71 hit.GetPosition().GetCoordinates(hitPos.begin());
73 for (
int i = 0; i < 3; ++i)
74 for (
int j = 0; j < 3; ++j)
75 cov[i][j] += hit.GetCharge() * (hitPos[i] - pos[i]) * (hitPos[j] - pos[j]) / (
fCharge - 1);