Skip to content

Commit b61cf4a

Browse files
committed
Tentative improvement of 3-body decay cov. matrix creation
1 parent b1bac33 commit b61cf4a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

DataFormats/Reconstruction/src/Decay3Body.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ using namespace o2::dataformats;
1616
Decay3Body::Decay3Body(const std::array<float, 3>& xyz, const std::array<float, 3>& pxyz, const std::array<float, 6>& covxyz, const Track& tr0, const Track& tr1, const Track& tr2, o2::track::PID pid)
1717
: mProngs{tr0, tr1, tr2}
1818
{
19-
std::array<float, 21> cov{}, cov1{}, cov2{};
20-
tr0.getCovXYZPxPyPzGlo(cov);
19+
std::array<float, 21> cov{}, cov0{}, cov1{}, cov2{};
20+
tr0.getCovXYZPxPyPzGlo(cov0);
2121
tr1.getCovXYZPxPyPzGlo(cov1);
2222
tr2.getCovXYZPxPyPzGlo(cov2);
23-
for (int i = 0; i < 21; i++) {
24-
cov[i] += cov1[i] + cov2[i];
25-
}
23+
constexpr int MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
2624
for (int i = 0; i < 6; i++) {
2725
cov[i] = covxyz[i];
26+
cov[MomInd[i]] = cov0[MomInd[i]] + cov1[MomInd[i]] + cov2[MomInd[i]];
2827
}
2928
this->set(xyz, pxyz, cov, tr0.getCharge() + tr1.getCharge() + tr2.getCharge(), true, pid);
3029
}

0 commit comments

Comments
 (0)