Skip to content

Commit eda1f4a

Browse files
authored
PWGCF:FemtoUniverse - MCTruth update (AliceO2Group#8054)
* PWGCF:FemtoUniverse - MCTruth update * PWGCF:FemtoUniverse - fixing errors
1 parent 64ff951 commit eda1f4a

File tree

3 files changed

+41
-19
lines changed

3 files changed

+41
-19
lines changed

PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerMCTruthTask.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ struct femtoUniverseProducerMCTruthTask {
170170
for (uint32_t pdg : tmpPDGCodes) {
171171
if (pdgCode == 333) {
172172
pass = true;
173+
} else if (pdgCode == 421) {
174+
pass = true;
173175
} else if (static_cast<int>(pdg) == static_cast<int>(pdgCode)) {
174176
if (particle.isPhysicalPrimary())
175177
pass = true;

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,9 @@ struct femtoUniversePairTaskTrackD0 {
483483
}
484484
// filling QA plots for D0 mesons' negative daughters (pi-)
485485
if (daughD0D0bar.mLambda() == -1 && daughD0D0bar.mAntiLambda() == 1) {
486-
qaRegistry.fill(HIST("D0_pos_daugh/pt"), daughD0D0bar.pt());
487-
qaRegistry.fill(HIST("D0_pos_daugh/eta"), daughD0D0bar.eta());
488-
qaRegistry.fill(HIST("D0_pos_daugh/phi"), daughD0D0bar.phi());
486+
qaRegistry.fill(HIST("D0_neg_daugh/pt"), daughD0D0bar.pt());
487+
qaRegistry.fill(HIST("D0_neg_daugh/eta"), daughD0D0bar.eta());
488+
qaRegistry.fill(HIST("D0_neg_daugh/phi"), daughD0D0bar.phi());
489489
}
490490
// filling QA plots for D0bar mesons' positive daughters (pi+)
491491
if (daughD0D0bar.mLambda() == 1 && daughD0D0bar.mAntiLambda() == -1) {
@@ -556,7 +556,7 @@ struct femtoUniversePairTaskTrackD0 {
556556
}
557557
}
558558
} // It is the end of the for loop over D0bar mesons
559-
} // It is the end of the for loop over all candidates
559+
} // It is the end of the for loop over all candidates
560560
}
561561
PROCESS_SWITCH(femtoUniversePairTaskTrackD0, processSideBand, "Enable processing side-band methode", false);
562562

@@ -578,6 +578,7 @@ struct femtoUniversePairTaskTrackD0 {
578578
for (auto& d0candidate : groupPartsD0) {
579579
trackHistoPartD0D0bar.fillQA<isMC, false>(d0candidate);
580580
}
581+
581582
float tpcNSigmaPr, tofNSigmaPr, tpcNSigmaPi, tofNSigmaPi, tpcNSigmaKa, tofNSigmaKa;
582583

583584
if (!ConfTrack.ConfIsSame) {

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMcTruth.cxx

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct femtoUniversePairTaskTrackTrackMcTruth {
5757

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

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

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

7676
/// Histogramming for particle 2
7777
FemtoUniverseParticleHisto<aod::femtouniverseparticle::ParticleType::kMCTruthTrack, 2> trackHistoPartTwo;
@@ -176,23 +176,42 @@ struct femtoUniversePairTaskTrackTrackMcTruth {
176176
}
177177
}
178178
/// Now build the combinations
179-
for (auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsTwo))) {
180-
// track cleaning
181-
if (!pairCleaner.isCleanPair(p1, p2, parts)) {
182-
continue;
183-
}
184-
if ((!ConfNoPDGPartOne && p2.pidcut() != ConfPDGCodePartOne) || (!ConfNoPDGPartTwo && p1.pidcut() != ConfPDGCodePartTwo)) {
185-
continue;
179+
if (!ConfIsSame) {
180+
// Build the combinations for pairs of non-identical particles
181+
for (auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) {
182+
// track cleaning
183+
if (!pairCleaner.isCleanPair(p1, p2, parts)) {
184+
continue;
185+
}
186+
if ((!ConfNoPDGPartOne && p2.pidcut() != ConfPDGCodePartOne) || (!ConfNoPDGPartTwo && p1.pidcut() != ConfPDGCodePartTwo)) {
187+
continue;
188+
}
189+
if (swpart)
190+
sameEventCont.setPair<isMC>(p1, p2, multCol, ConfUse3D);
191+
else
192+
sameEventCont.setPair<isMC>(p2, p1, multCol, ConfUse3D);
193+
194+
swpart = !swpart;
186195
}
187-
if (swpart)
188-
sameEventCont.setPair<isMC>(p1, p2, multCol, ConfUse3D);
189-
else
190-
sameEventCont.setPair<isMC>(p2, p1, multCol, ConfUse3D);
196+
} else {
197+
// Build the combinations for pairs of identical pairs
198+
for (auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsOne, groupPartsTwo))) {
199+
// track cleaning
200+
if (!pairCleaner.isCleanPair(p1, p2, parts)) {
201+
continue;
202+
}
203+
if ((!ConfNoPDGPartOne && p2.pidcut() != ConfPDGCodePartOne) || (!ConfNoPDGPartTwo && p1.pidcut() != ConfPDGCodePartTwo)) {
204+
continue;
205+
}
206+
if (swpart)
207+
sameEventCont.setPair<isMC>(p1, p2, multCol, ConfUse3D);
208+
else
209+
sameEventCont.setPair<isMC>(p2, p1, multCol, ConfUse3D);
191210

192-
swpart = !swpart;
211+
swpart = !swpart;
212+
}
193213
}
194214
}
195-
196215
/// process function for to call doSameEvent with Data
197216
/// \param col subscribe to the collision table (Data)
198217
/// \param parts subscribe to the femtoUniverseParticleTable

0 commit comments

Comments
 (0)