You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// we build the neutral track to then build the cascade
734
+
std::array<float, 21> covV = {0.};
735
+
constexprint MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
715
736
for (int i = 0; i < 6; i++) {
716
-
covV0Pos[i] = v0.positionCovMat()[i];
737
+
covV[MomInd[i]] = v0.momentumCovMat()[i];
738
+
covV[i] = v0.positionCovMat()[i];
717
739
}
718
-
trackParCovV0DaughPos.propagateTo(posTrackX, bz); // propagate the track to the X closest to the V0 vertex
719
-
trackParCovV0DaughNeg.propagateTo(negTrackX, bz); // propagate the track to the X closest to the V0 vertex
740
+
auto trackV0 = o2::track::TrackParCov(vertexV0, momentumV0, covV, 0, true);
741
+
trackV0.setAbsCharge(0);
742
+
trackV0.setPID(o2::track::PID::K0);
720
743
721
-
// we build the neutral track to then build the cascade
722
-
// auto trackV0 = o2::dataformats::V0(vertexV0, momentumV0, {0, 0, 0, 0, 0, 0}, trackParCovV0DaughPos, trackParCovV0DaughNeg); // build the V0 track (indices for v0 daughters set to 0 for now)
723
-
auto trackV0 = o2::dataformats::V0(vertexV0, momentumV0, covV0Pos, trackParCovV0DaughPos, trackParCovV0DaughNeg); // build the V0 track (indices for v0 daughters set to 0 for now)
724
-
std::array<float, 3> pVecV0 = {0., 0., 0.};
725
-
std::array<float, 3> pVecBach = {0., 0., 0.};
726
-
std::array<float, 3> pVecCand = {0., 0., 0.};
744
+
int nCand2 = 0;
727
745
try {
728
-
if (df.process(trackV0, trackParCovBach) == 0) {
729
-
continue;
730
-
} else {
731
-
}
732
-
} catch (const std::runtime_error& error) {
746
+
nCand2 = df.process(trackV0, trackParCovBach);
747
+
} catch (...) {
733
748
continue;
734
749
}
735
-
df.propagateTracksToVertex(); // propagate the bachelor and V0 to the Lambdac vertex
736
-
trackV0.getPxPyPzGlo(pVecV0); // momentum of D0 at the Lambdac vertex
737
-
trackParCovBach.getPxPyPzGlo(pVecBach); // momentum of proton at the Lambdac vertex
trackParCovV0DaughPos.propagateTo(posTrackX, bz); // propagate the track to the X closest to the V0 vertex
783
+
trackParCovV0DaughNeg.propagateTo(negTrackX, bz); // propagate the track to the X closest to the V0 vertex
784
+
785
+
// we build the neutral track to then build the cascade
786
+
// auto trackV0 = o2::dataformats::V0(vertexV0, momentumV0, {0, 0, 0, 0, 0, 0}, trackParCovV0DaughPos, trackParCovV0DaughNeg); // build the V0 track (indices for v0 daughters set to 0 for now)
787
+
auto trackV0 = o2::dataformats::V0(vertexV0, momentumV0, covV0Pos, trackParCovV0DaughPos, trackParCovV0DaughNeg); // build the V0 track (indices for v0 daughters set to 0 for now)
788
+
std::array<float, 3> pVecV0 = {0., 0., 0.};
789
+
std::array<float, 3> pVecBach = {0., 0., 0.};
790
+
std::array<float, 3> pVecCand = {0., 0., 0.};
791
+
try {
792
+
if (df.process(trackV0, trackParCovBach) == 0) {
793
+
continue;
794
+
} else {
795
+
}
796
+
} catch (const std::runtime_error& error) {
797
+
continue;
798
+
}
799
+
df.propagateTracksToVertex(); // propagate the bachelor and V0 to the Lambdac vertex
800
+
trackV0.getPxPyPzGlo(pVecV0); // momentum of D0 at the Lambdac vertex
801
+
trackParCovBach.getPxPyPzGlo(pVecBach); // momentum of proton at the Lambdac vertex
0 commit comments