@@ -407,7 +407,7 @@ struct HfTreeCreatorTccToD0D0Pi {
407407 auto trackParCovPi = getTrackParCov (trackPion);
408408 std::array<float , 3 > pVecD1New = {0 ., 0 ., 0 .};
409409 std::array<float , 3 > pVecD2New = {0 ., 0 ., 0 .};
410- std::array<float , 3 > pVecBach = {0 ., 0 ., 0 .};
410+ std::array<float , 3 > pVecSoftPi = {0 ., 0 ., 0 .};
411411
412412 // find the DCA between the D01, D02 and the bachelor track, for Tcc
413413 hCandidatesTcc->Fill (SVFitting::BeforeFit);
@@ -425,12 +425,12 @@ struct HfTreeCreatorTccToD0D0Pi {
425425 dfTcc.propagateTracksToVertex (); // propagate the softpi and D0 pair to the Tcc vertex
426426 trackD1.getPxPyPzGlo (pVecD1New); // momentum of D1 at the Tcc vertex
427427 trackD2.getPxPyPzGlo (pVecD2New); // momentum of D2 at the Tcc vertex
428- trackParCovPi.getPxPyPzGlo (pVecBach ); // momentum of pi at the Tcc vertex
428+ trackParCovPi.getPxPyPzGlo (pVecSoftPi ); // momentum of pi at the Tcc vertex
429429
430430 const auto & secVertexTcc = dfTcc.getPCACandidate ();
431431 auto chi2PCA = dfTcc.getChi2AtPCACandidate ();
432432 auto covMatrixPCA = dfTcc.calcPCACovMatrixFlat ();
433- hCovSVXX->Fill (covMatrixPCA[0 ]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line.
433+ hCovSVXX->Fill (covMatrixPCA[0 ]);
434434
435435 // get track impact parameters
436436 // This modifies track momenta!
@@ -444,12 +444,6 @@ struct HfTreeCreatorTccToD0D0Pi {
444444 trackD2.propagateToDCA (primaryVertex, bz, &impactParameterD2);
445445 trackParCovPi.propagateToDCA (primaryVertex, bz, &impactParameterSoftPi);
446446
447- // get uncertainty of the decay length
448- // double phi, theta;
449- // getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secVertexTcc, phi, theta);
450- // auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
451- // auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixPCA, phi, 0.));
452-
453447 // Retrieve properties of the two D0 candidates
454448 float yD1 = hfHelper.yD0 (candidateD1);
455449 float yD2 = hfHelper.yD0 (candidateD2);
@@ -501,13 +495,13 @@ struct HfTreeCreatorTccToD0D0Pi {
501495 massD2Daus[1 ] = MassPiPlus;
502496 }
503497
504- auto massKpipi1 = RecoDecay::m (std::array{pVecD1Prong0, pVecD1Prong1, pVecBach }, std::array{massD1Daus[0 ], massD1Daus[1 ], MassPiPlus});
505- auto massKpipi2 = RecoDecay::m (std::array{pVecD2Prong0, pVecD2Prong1, pVecBach }, std::array{massD2Daus[0 ], massD2Daus[1 ], MassPiPlus});
498+ auto massKpipi1 = RecoDecay::m (std::array{pVecD1Prong0, pVecD1Prong1, pVecSoftPi }, std::array{massD1Daus[0 ], massD1Daus[1 ], MassPiPlus});
499+ auto massKpipi2 = RecoDecay::m (std::array{pVecD2Prong0, pVecD2Prong1, pVecSoftPi }, std::array{massD2Daus[0 ], massD2Daus[1 ], MassPiPlus});
506500
507501 deltaMassD01 = massKpipi1 - massD01;
508502 deltaMassD02 = massKpipi2 - massD02;
509503
510- auto arrayMomentaDDpi = std::array{pVecD1New, pVecD2New, pVecBach };
504+ auto arrayMomentaDDpi = std::array{pVecD1New, pVecD2New, pVecSoftPi };
511505 const auto massD0D0Pi = RecoDecay::m (std::move (arrayMomentaDDpi), std::array{MassD0, MassD0, MassPiPlus});
512506 const auto deltaMassD0D0Pi = massD0D0Pi - (massD01 + massD02);
513507 const auto massD0D0Pair = RecoDecay::m (std::array{pVecD1New, pVecD2New}, std::array{MassD0, MassD0});
0 commit comments