Skip to content

Commit 148d5fd

Browse files
committed
Fix momentum order in mass calculation
1 parent d452e8a commit 148d5fd

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

PWGHF/TableProducer/trackIndexSkimCreator.cxx

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3494,15 +3494,15 @@ struct HfTrackIndexSkimCreatorLfCascades {
34943494
}
34953495

34963496
/// Method to perform selections for Xic 3-prong candidates before vertex reconstruction
3497-
/// \param pVecTrack0 is the momentum array of the first daughter track
3498-
/// \param pVecTrack1 is the momentum array of the second daughter track
3499-
/// \param pVecTrack2 is the momentum array of the third daughter track
3497+
/// \param pVecXi is the momentum array of the Xi daughter track
3498+
/// \param pVecPi1 is the momentum array of the first pion daughter track
3499+
/// \param pVecPi2 is the momentum array of the second pion daughter track
35003500
template <typename T1>
3501-
bool isPreselectedCandidateXic(T1 const& pVecTrack0, T1 const& pVecTrack1, T1 const& pVecTrack2)
3501+
bool isPreselectedCandidateXic(T1 const& pVecXi, T1 const& pVecPi1, T1 const& pVecPi2)
35023502
{
35033503
// pt
35043504
if (config.ptMinXicplusLfCasc > 0.f) {
3505-
const auto pt = RecoDecay::pt(pVecTrack0, pVecTrack1, pVecTrack2) + config.ptTolerance; // add tolerance because of no reco decay vertex
3505+
const auto pt = RecoDecay::pt(pVecXi, pVecPi1, pVecPi2) + config.ptTolerance; // add tolerance because of no reco decay vertex
35063506
if (pt < config.ptMinXicplusLfCasc) {
35073507
return false;
35083508
}
@@ -3512,7 +3512,7 @@ struct HfTrackIndexSkimCreatorLfCascades {
35123512
if (config.massXiPiPiMin >= 0. && config.massXiPiPiMax > 0.) {
35133513
const double invMassMin = config.massXiPiPiMin;
35143514
const double invMassMax = config.massXiPiPiMax;
3515-
const auto arrMom = std::array{pVecTrack0, pVecTrack1, pVecTrack2};
3515+
const auto arrMom = std::array{pVecXi, pVecPi1, pVecPi2};
35163516
const auto invMass2 = RecoDecay::m2(arrMom, arrMass3Prong[hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi]);
35173517
if (invMass2 < invMassMin * invMassMin || invMass2 >= invMassMax * invMassMax) {
35183518
return false;
@@ -3839,16 +3839,15 @@ struct HfTrackIndexSkimCreatorLfCascades {
38393839
if (nVtxFrom3ProngFitterXiHyp > 0) {
38403840
df2.propagateTracksToVertex();
38413841
if (df2.isPropagateTracksToVertexDone()) {
3842-
std::array<float, 3> pVec1{0.};
3843-
std::array<float, 3> pVec2{0.};
3844-
const std::array<float, 3> pVec3{pVecCasc}; // Use the Xi track for the 3-prong calculations.
3842+
std::array<float, 3> pVecPi1{};
3843+
std::array<float, 3> pVecPi2{};
38453844
// get bachelor momenta at the Xic vertex
3846-
df2.getTrack(0).getPxPyPzGlo(pVec1);
3847-
df2.getTrack(1).getPxPyPzGlo(pVec2);
3848-
const auto pVecCand = RecoDecay::pVec(pVec1, pVec2, pVec3);
3845+
df2.getTrack(0).getPxPyPzGlo(pVecPi1);
3846+
df2.getTrack(1).getPxPyPzGlo(pVecPi2);
3847+
const auto pVecCand = RecoDecay::pVec(pVecCasc, pVecPi1, pVecPi2);
38493848
const auto ptCand = RecoDecay::pt(pVecCand);
3850-
const std::array<float, 3> primaryVertex{collision.posX(), collision.posY(), collision.posZ()}; // primary vertex
3851-
const auto& secondaryVertex = df2.getPCACandidate(); // secondary vertex
3849+
const std::array primaryVertex{collision.posX(), collision.posY(), collision.posZ()}; // primary vertex
3850+
const auto& secondaryVertex = df2.getPCACandidate(); // secondary vertex
38523851

38533852
registry.fill(HIST("hRejpTStatusXicPlusToXiPiPi"), 0);
38543853
if (ptCand >= config.ptMinXicplusLfCasc) {
@@ -3861,7 +3860,7 @@ struct HfTrackIndexSkimCreatorLfCascades {
38613860

38623861
// fill histograms
38633862
if (config.fillHistograms) {
3864-
const std::array<std::array<float, 3>, 3> arr3Mom = {pVec1, pVec2, pVec3};
3863+
const std::array arr3Mom{pVecCasc, pVecPi1, pVecPi2};
38653864
const auto mass3Prong = RecoDecay::m(arr3Mom, arrMass3Prong[hf_cand_casc_lf::DecayType3Prong::XicplusToXiPiPi]);
38663865
registry.fill(HIST("hMassXicPlusToXiPiPi"), mass3Prong);
38673866
registry.fill(HIST("hPtCutsXicPlusToXiPiPi"), ptCand);

0 commit comments

Comments
 (0)