Skip to content

Commit

Permalink
PWGCF:FemtoUniverse - MCTruth update
Browse files Browse the repository at this point in the history
  • Loading branch information
kgwizdzi committed Oct 18, 2024
1 parent 66e5ed7 commit a38da9f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ struct femtoUniverseProducerMCTruthTask {
for (uint32_t pdg : tmpPDGCodes) {
if (pdgCode == 333) {
pass = true;
} else if (pdgCode == 421) {
pass = true;
} else if (static_cast<int>(pdg) == static_cast<int>(pdgCode)) {
if (particle.isPhysicalPrimary())
pass = true;
Expand Down
7 changes: 4 additions & 3 deletions PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,9 @@ struct femtoUniversePairTaskTrackD0 {
}
// filling QA plots for D0 mesons' negative daughters (pi-)
if (daughD0D0bar.mLambda() == -1 && daughD0D0bar.mAntiLambda() == 1) {
qaRegistry.fill(HIST("D0_pos_daugh/pt"), daughD0D0bar.pt());
qaRegistry.fill(HIST("D0_pos_daugh/eta"), daughD0D0bar.eta());
qaRegistry.fill(HIST("D0_pos_daugh/phi"), daughD0D0bar.phi());
qaRegistry.fill(HIST("D0_neg_daugh/pt"), daughD0D0bar.pt());
qaRegistry.fill(HIST("D0_neg_daugh/eta"), daughD0D0bar.eta());
qaRegistry.fill(HIST("D0_neg_daugh/phi"), daughD0D0bar.phi());
}
// filling QA plots for D0bar mesons' positive daughters (pi+)
if (daughD0D0bar.mLambda() == 1 && daughD0D0bar.mAntiLambda() == -1) {
Expand Down Expand Up @@ -578,6 +578,7 @@ struct femtoUniversePairTaskTrackD0 {
for (auto& d0candidate : groupPartsD0) {
trackHistoPartD0D0bar.fillQA<isMC, false>(d0candidate);
}

float tpcNSigmaPr, tofNSigmaPr, tpcNSigmaPi, tofNSigmaPi, tpcNSigmaKa, tofNSigmaKa;

if (!ConfTrack.ConfIsSame) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct femtoUniversePairTaskTrackTrackMcTruth {

/// Partition for particle 1
Partition<aod::FDParticles> partsOne = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) &&
aod::femtouniverseparticle::pt < ConfPtHighPart1 && aod::femtouniverseparticle::pt > ConfPtLowPart1&& nabs(aod::femtouniverseparticle::eta) < ConfEtaMax;
(aod::femtouniverseparticle::pt < ConfPtHighPart1) && (aod::femtouniverseparticle::pt > ConfPtLowPart1) && (nabs(aod::femtouniverseparticle::eta) < ConfEtaMax);

/// Histogramming for particle 1
FemtoUniverseParticleHisto<aod::femtouniverseparticle::ParticleType::kMCTruthTrack, 1> trackHistoPartOne;
Expand All @@ -71,7 +71,7 @@ struct femtoUniversePairTaskTrackTrackMcTruth {

/// Partition for particle 2
Partition<aod::FDParticles> partsTwo = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kMCTruthTrack)) &&
aod::femtouniverseparticle::pt < ConfPtHighPart2 && aod::femtouniverseparticle::pt > ConfPtLowPart2&& nabs(aod::femtouniverseparticle::eta) < ConfEtaMax;
(aod::femtouniverseparticle::pt < ConfPtHighPart2) && (aod::femtouniverseparticle::pt > ConfPtLowPart2) && (nabs(aod::femtouniverseparticle::eta) < ConfEtaMax);

/// Histogramming for particle 2
FemtoUniverseParticleHisto<aod::femtouniverseparticle::ParticleType::kMCTruthTrack, 2> trackHistoPartTwo;
Expand Down Expand Up @@ -176,23 +176,43 @@ struct femtoUniversePairTaskTrackTrackMcTruth {
}
}
/// Now build the combinations
for (auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsTwo))) {
// track cleaning
if (!pairCleaner.isCleanPair(p1, p2, parts)) {
continue;
if (!ConfIsSame) {
// Build the combinations for pairs of non-identical particles
for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) {
// track cleaning
if (!pairCleaner.isCleanPair(p1, p2, parts)) {
continue;
}
if ((!ConfNoPDGPartOne && p2.pidcut() != ConfPDGCodePartOne) || (!ConfNoPDGPartTwo && p1.pidcut() != ConfPDGCodePartTwo)) {
continue;
}
if (swpart)
sameEventCont.setPair<isMC>(p1, p2, multCol, ConfUse3D);
else
sameEventCont.setPair<isMC>(p2, p1, multCol, ConfUse3D);

swpart = !swpart;
}
if ((!ConfNoPDGPartOne && p2.pidcut() != ConfPDGCodePartOne) || (!ConfNoPDGPartTwo && p1.pidcut() != ConfPDGCodePartTwo)) {
continue;
} else {
// Build the combinations for pairs of identical pairs
for (auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsTwo))) {
// track cleaning
if (!pairCleaner.isCleanPair(p1, p2, parts)) {
continue;
}
if ((!ConfNoPDGPartOne && p2.pidcut() != ConfPDGCodePartOne) || (!ConfNoPDGPartTwo && p1.pidcut() != ConfPDGCodePartTwo)) {
continue;
}
if (swpart)
sameEventCont.setPair<isMC>(p1, p2, multCol, ConfUse3D);
else
sameEventCont.setPair<isMC>(p2, p1, multCol, ConfUse3D);

swpart = !swpart;
}
}
if (swpart)
sameEventCont.setPair<isMC>(p1, p2, multCol, ConfUse3D);
else
sameEventCont.setPair<isMC>(p2, p1, multCol, ConfUse3D);

swpart = !swpart;
}
}


/// process function for to call doSameEvent with Data
/// \param col subscribe to the collision table (Data)
/// \param parts subscribe to the femtoUniverseParticleTable
Expand Down

0 comments on commit a38da9f

Please sign in to comment.