diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx index 7eee98d1f62..76a3c989494 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx @@ -882,40 +882,48 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { /// \tparam isMC: enables Monte Carlo truth specific histograms /// \param groupPartsOne partition for the first particle passed by the process function /// \param groupPartsTwo partition for the second particle passed by the process function - template + template void doFractionsMCTruth(PartitionType groupPartsOne, PartitionType groupPartsTwo, int ContType) { - - for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - - int pdgCodePartOne = static_cast(p1.pidCut()); - const auto& pdgParticleOne = pdg->GetParticle(pdgCodePartOne); - int pdgCodePartTwo = static_cast(p2.pidCut()); - const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo); - switch (ContType) { - case 1: { + switch (ContType) { + case 1: { + for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { + int pdgCodePartOne = static_cast(p1.pidCut()); + const auto& pdgParticleOne = pdg->GetParticle(pdgCodePartOne); + int pdgCodePartTwo = static_cast(p2.pidCut()); + const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo); if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { - continue; + mixedMultRegistryPM.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar()); } - mixedMultRegistryPM.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar()); - break; } - case 2: { + break; + } + case 2: { + for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsOne))) { + int pdgCodePartOne = static_cast(p1.pidCut()); + const auto& pdgParticleOne = pdg->GetParticle(pdgCodePartOne); + int pdgCodePartTwo = static_cast(p2.pidCut()); + const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo); if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == trackonefilter.confPDGCodePartOne)) { - continue; + mixedMultRegistryPP.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar()); } - mixedMultRegistryPP.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar()); - break; } - case 3: { + break; + } + case 3: { + for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsTwo, groupPartsTwo))) { + int pdgCodePartOne = static_cast(p1.pidCut()); + const auto& pdgParticleOne = pdg->GetParticle(pdgCodePartOne); + int pdgCodePartTwo = static_cast(p2.pidCut()); + const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo); if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == tracktwofilter.confPDGCodePartTwo) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) { - continue; + mixedMultRegistryMM.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar()); } - mixedMultRegistryMM.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar()); } - default: - break; + break; } + default: + break; } } @@ -942,13 +950,13 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { auto groupPartsOne = partsOneMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex(), cache); auto groupPartsTwo = partsTwoMCTruth->sliceByCached(aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex(), cache); if (processPair.cfgProcessPM) { - doFractionsMCTruth(groupPartsOne, groupPartsTwo, 1); + doFractionsMCTruth(groupPartsOne, groupPartsTwo, 1); } if (processPair.cfgProcessPP) { - doFractionsMCTruth(groupPartsOne, groupPartsOne, 2); + doFractionsMCTruth(groupPartsOne, groupPartsOne, 2); } if (processPair.cfgProcessMM) { - doFractionsMCTruth(groupPartsTwo, groupPartsTwo, 3); + doFractionsMCTruth(groupPartsTwo, groupPartsTwo, 3); } } }