@@ -85,6 +85,7 @@ constexpr double betheBlochDefault[1][6]{{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32
8585static const std::vector<std::string> betheBlochParNames{"p0", "p1", "p2", "p3", "p4", "resolution"};
8686
8787constexpr int Li4PDG = o2::constants::physics::Pdg::kLithium4;
88+ constexpr int H3LPDG = o2::constants::physics::Pdg::kHyperTriton;
8889constexpr int ProtonPDG = PDG_t::kProton;
8990constexpr int PionPDG = PDG_t::kPiPlus;
9091constexpr int He3PDG = o2::constants::physics::Pdg::kHelium3;
@@ -869,7 +870,7 @@ struct he3HadronFemto {
869870 mothers.push_back(mother.globalIndex());
870871 if (std::abs(mother.pdgCode()) == Li4PDG) {
871872 flag |= ParticleFlags::kFromLi4;
872- } else if (std::abs(mother.pdgCode()) == o2::constants::physics::Pdg::kHyperTriton ) {
873+ } else if (std::abs(mother.pdgCode()) == H3LPDG ) {
873874 flag |= ParticleFlags::kFromHypertriton;
874875 } else {
875876 flag |= ParticleFlags::kFromOtherDecays;
@@ -887,7 +888,7 @@ struct he3HadronFemto {
887888 mothers.push_back(mother.globalIndex());
888889 if (std::abs(mother.pdgCode()) == Li4PDG) {
889890 flag |= ParticleFlags::kFromLi4;
890- } else if (std::abs(mother.pdgCode()) == o2::constants::physics::Pdg::kHyperTriton ) {
891+ } else if (std::abs(mother.pdgCode()) == H3LPDG ) {
891892 flag |= ParticleFlags::kFromHypertriton;
892893 } else {
893894 flag |= ParticleFlags::kFromOtherDecays;
@@ -896,7 +897,7 @@ struct he3HadronFemto {
896897 }
897898 }
898899
899- void searchForCommonMotherTrack(std::vector<unsigned int>& motherHe3Idxs, std::vector<unsigned int>& motherHadIdxs, McIter& motherParticle, bool & isMixedPair, const int motherPdgCode)
900+ void searchForCommonMotherTrack(const std::vector<unsigned int>& motherHe3Idxs, const std::vector<unsigned int>& motherHadIdxs, const aod::McParticles& mcParticles, McIter& motherParticle, He3HadCandidate& he3Hadcand , bool & isMixedPair, const int motherPdgCode)
900901 {
901902 std::unordered_set<unsigned int> motherHe3SetIdxs(motherHe3Idxs.begin(), motherHe3Idxs.end());
902903 for (const auto& motherHadIdx : motherHadIdxs) {
@@ -1057,14 +1058,14 @@ struct he3HadronFemto {
10571058
10581059 } else if ((he3Hadcand.flagsHe3 & ParticleFlags::kFromLi4) && (he3Hadcand.flagsHad & ParticleFlags::kFromLi4)) {
10591060
1060- searchForCommonMotherTrack(motherHe3Idxs, motherHadIdxs, motherParticle, isMixedPair, Li4PDG);
1061+ searchForCommonMotherTrack(motherHe3Idxs, motherHadIdxs, mcParticles, motherParticle, he3Hadcand , isMixedPair, Li4PDG);
10611062 if (!isMixedPair) {
10621063 he3Hadcand.flags |= Flags::kBothFromLi4;
10631064 }
10641065
10651066 } else if ((he3Hadcand.flagsHe3 & ParticleFlags::kFromHypertriton) && (he3Hadcand.flagsHad & ParticleFlags::kFromHypertriton)) {
10661067
1067- searchForCommonMotherTrack(motherHe3Idxs, motherHadIdxs, motherParticle, isMixedPair, o2::constants::physics::Pdg::kHyperTriton );
1068+ searchForCommonMotherTrack(motherHe3Idxs, motherHadIdxs, mcParticles, motherParticle, he3Hadcand, isMixedPair, H3LPDG );
10681069 if (!isMixedPair) {
10691070 he3Hadcand.flags |= Flags::kBothFromHypertriton;
10701071 }
0 commit comments