@@ -56,11 +56,21 @@ float checkResults(o2::utils::TreeStreamRedirector& outs, std::string& treeName,
5656 double dst = TMath::Sqrt (df[0 ] * df[0 ] + df[1 ] * df[1 ] + df[2 ] * df[2 ]);
5757 distMin = dst < distMin ? dst : distMin;
5858 auto parentTrack = fitter.createParentTrackParCov (ic);
59- // float genX
59+ const std::array<float , 3 > genPos{static_cast <float >(vgen[0 ]), static_cast <float >(vgen[1 ]), static_cast <float >(vgen[2 ])};
60+ const std::array<float , 3 > genMom{static_cast <float >(genPar.Px ()), static_cast <float >(genPar.Py ()), static_cast <float >(genPar.Pz ())};
61+ o2::track::TrackPar genParentTrack (genPos, genMom, parentTrack.getCharge (), false );
62+ genParentTrack.rotateParam (parentTrack.getAlpha ());
63+ std::array<float , o2::track::kLabCovMatSize > parentCovGlo{};
64+ const bool hasParentCovGlo = parentTrack.getCovXYZPxPyPzGlo (parentCovGlo);
65+ const double pullX = hasParentCovGlo && parentCovGlo[0 ] > 0 .f ? df[0 ] / TMath::Sqrt (parentCovGlo[0 ]) : 0 .;
66+ const double pullY = hasParentCovGlo && parentCovGlo[2 ] > 0 .f ? df[1 ] / TMath::Sqrt (parentCovGlo[2 ]) : 0 .;
67+ const double pullZ = hasParentCovGlo && parentCovGlo[5 ] > 0 .f ? df[2 ] / TMath::Sqrt (parentCovGlo[5 ]) : 0 .;
6068 outs << treeName.c_str () << " cand=" << ic << " ncand=" << nCand << " nIter=" << nIter << " chi2=" << chi2
6169 << " genPart=" << genPar << " recPart=" << moth
6270 << " genX=" << vgen[0 ] << " genY=" << vgen[1 ] << " genZ=" << vgen[2 ]
6371 << " dx=" << df[0 ] << " dy=" << df[1 ] << " dz=" << df[2 ] << " dst=" << dst
72+ << " pullX=" << pullX << " pullY=" << pullY << " pullZ=" << pullZ
73+ << " genParentTrack=" << genParentTrack
6474 << " useAbsDCA=" << absDCA << " useWghDCA=" << useWghDCA << " parent=" << parentTrack;
6575 for (int i = 0 ; i < fitter.getNProngs (); i++) {
6676 outs << treeName.c_str () << fmt::format (" prong{}=" , i).c_str () << fitter.getTrack (i, ic);
0 commit comments