From 96d66e5a0b4b00a90da9683510728d73f3b94f3b Mon Sep 17 00:00:00 2001 From: Shirajum Monira Date: Wed, 15 Nov 2023 21:16:21 +0100 Subject: [PATCH 1/2] fixed track-v0 pair check --- PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h b/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h index b8fb1afce44..34359882e7c 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h @@ -72,17 +72,18 @@ class FemtoUniversePairCleaner } return part1.globalIndex() != part2.globalIndex(); } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) { - /// Track-V0 combination + /// Track-V0 combination part1 is hadron and part2 is v0 if (part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kV0) { LOG(fatal) << "FemtoUniversePairCleaner: passed arguments don't agree with FemtoUniversePairCleaner instantiation! Please provide second argument kV0 candidate."; return false; } + // Getting v0 (part2) children const auto& posChild = particles.iteratorAt(part2.index() - 2); const auto& negChild = particles.iteratorAt(part2.index() - 1); - if (part1.globalIndex() != posChild.globalIndex() && part2.globalIndex() != negChild.globalIndex()) { - return true; - } + if (part1.globalIndex() == posChild.globalIndex() || part1.globalIndex() == negChild.globalIndex()) { return false; + } + return part1.globalIndex() != part2.globalIndex(); } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kPhi) { /// Track-Phi combination part1 is Phi and part 2 is hadron if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kPhi) { From 1ed132f74044aba003ae30283fa594e2f853e735 Mon Sep 17 00:00:00 2001 From: Shirajum Monira Date: Wed, 15 Nov 2023 21:34:27 +0100 Subject: [PATCH 2/2] clang-format check done --- PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h b/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h index 34359882e7c..165bdcea6e6 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h @@ -81,7 +81,7 @@ class FemtoUniversePairCleaner const auto& posChild = particles.iteratorAt(part2.index() - 2); const auto& negChild = particles.iteratorAt(part2.index() - 1); if (part1.globalIndex() == posChild.globalIndex() || part1.globalIndex() == negChild.globalIndex()) { - return false; + return false; } return part1.globalIndex() != part2.globalIndex(); } else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kPhi) {