Skip to content

Commit a6771ec

Browse files
authored
[PWGCF] FemtoUniverse cascade task -- added pair cleaner for track-cascade case (#8543)
1 parent 85fae98 commit a6771ec

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

PWGCF/FemtoUniverse/Core/FemtoUniversePairCleaner.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,19 @@ class FemtoUniversePairCleaner
100100
return false;
101101
}
102102
return part1.globalIndex() != part2.globalIndex();
103+
} else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kCascade) {
104+
/// Track-Cascade combination part1 is hadron and part2 is cascade
105+
if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kCascade) {
106+
LOG(fatal) << "FemtoUniversePairCleaner: passed arguments don't agree with FemtoUniversePairCleaner instantiation! Please provide first argument kTrack candidate and second argument kCascade candidate.";
107+
return false;
108+
}
109+
// Getting cascade children for part2
110+
const auto& posChild = particles.iteratorAt(part2.index() - 3);
111+
const auto& negChild = particles.iteratorAt(part2.index() - 2);
112+
const auto& bachelor = particles.iteratorAt(part2.index() - 1);
113+
if (part1.globalIndex() == posChild.globalIndex() || part1.globalIndex() == negChild.globalIndex() || part1.globalIndex() == bachelor.globalIndex()) {
114+
return false;
115+
}
103116
} else if constexpr (mPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kD0) {
104117
/// Track-D0 combination part1 is hadron and part2 is D0
105118
if (part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kD0) {

0 commit comments

Comments
 (0)