Skip to content

Commit 57a1086

Browse files
committed
transport candidate back to decay vertex after topological constraint
1 parent d517cf1 commit 57a1086

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,11 +497,10 @@ struct HfCandidateCreator3Prong {
497497
const float chi2topo = kfCalculateChi2ToPrimaryVertex(kfCandPKPi, kfpV);
498498

499499
if (applyTopoConstraint) { // constraints applied after chi2topo getter - to preserve unbiased value of chi2topo
500-
kfCandPKPi.SetProductionVertex(KFPV);
501-
kfCandPiKP.SetProductionVertex(KFPV);
502-
kfCandPiKPi.SetProductionVertex(KFPV);
503-
kfCandKKPi.SetProductionVertex(KFPV);
504-
kfCandPiKK.SetProductionVertex(KFPV);
500+
for (auto& kfCand : std::array<KFParticle*, 5>{&kfCandPKPi, &kfCandPiKP, &kfCandPiKPi, &kfCandKKPi, &kfCandPiKK}) {
501+
kfCand->SetProductionVertex(KFPV);
502+
kfCand->TransportToDecayVertex();
503+
}
505504
}
506505

507506
KFParticle kfPairKPi;

0 commit comments

Comments
 (0)