Skip to content

Commit b503a3f

Browse files
EloviyoShirajum Monira
andauthored
PWGCF FemtoUniverse PairCleaner update for track-v0 (#3877)
* fixed track-v0 pair check * clang-format check done --------- Co-authored-by: Shirajum Monira <shirajum.monira@cernch>
1 parent f9a2923 commit b503a3f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,18 @@ class FemtoUniversePairCleaner
7272
}
7373
return part1.globalIndex() != part2.globalIndex();
7474
} else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kV0) {
75-
/// Track-V0 combination
75+
/// Track-V0 combination part1 is hadron and part2 is v0
7676
if (part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kV0) {
7777
LOG(fatal) << "FemtoUniversePairCleaner: passed arguments don't agree with FemtoUniversePairCleaner instantiation! Please provide second argument kV0 candidate.";
7878
return false;
7979
}
80+
// Getting v0 (part2) children
8081
const auto& posChild = particles.iteratorAt(part2.index() - 2);
8182
const auto& negChild = particles.iteratorAt(part2.index() - 1);
82-
if (part1.globalIndex() != posChild.globalIndex() && part2.globalIndex() != negChild.globalIndex()) {
83-
return true;
83+
if (part1.globalIndex() == posChild.globalIndex() || part1.globalIndex() == negChild.globalIndex()) {
84+
return false;
8485
}
85-
return false;
86+
return part1.globalIndex() != part2.globalIndex();
8687
} else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kPhi) {
8788
/// Track-Phi combination part1 is Phi and part 2 is hadron
8889
if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kPhi) {

0 commit comments

Comments
 (0)