Skip to content

Commit 1b35063

Browse files
authored
[PWGCF] Add new process function to femto producer (#18376)
1 parent bb0c1e7 commit 1b35063

5 files changed

Lines changed: 27 additions & 15 deletions

File tree

‎PWGCF/Femto/Core/cascadeHistManager.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -719,9 +719,6 @@ class CascadeHistManager
719719
case modes::McOrigin::kPhysicalPrimary:
720720
mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(McDir) + HIST(getHistName(kPrimary, HistTable)), cascadeCandidate.pt(), cascadeCandidate.cascadeCosPa());
721721
break;
722-
case modes::McOrigin::kFromWrongCollision:
723-
mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(McDir) + HIST(getHistName(kFromWrongCollision, HistTable)), cascadeCandidate.pt(), cascadeCandidate.cascadeCosPa());
724-
break;
725722
case modes::McOrigin::kFromMaterial:
726723
mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(McDir) + HIST(getHistName(kFromMaterial, HistTable)), cascadeCandidate.pt(), cascadeCandidate.cascadeCosPa());
727724
break;

‎PWGCF/Femto/Core/kinkHistManager.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,6 @@ class KinkHistManager
599599
case modes::McOrigin::kPhysicalPrimary:
600600
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(McDir) + HIST(getHistName(kPrimary, HistTable)), kinkCandidate.pt(), kinkCandidate.kinkAngle());
601601
break;
602-
case modes::McOrigin::kFromWrongCollision:
603-
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(McDir) + HIST(getHistName(kFromWrongCollision, HistTable)), kinkCandidate.pt(), kinkCandidate.kinkAngle());
604-
break;
605602
case modes::McOrigin::kFromMaterial:
606603
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(McDir) + HIST(getHistName(kFromMaterial, HistTable)), kinkCandidate.pt(), kinkCandidate.kinkAngle());
607604
break;

‎PWGCF/Femto/Core/mcParticleHistManager.h‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,10 @@ class McParticleHistManager
213213
if (mPlotOrigins) {
214214
// NOTE: kNoMcParticle and kMissidentified are kept here only for enum/histogram
215215
// symmetry with TrackHist — they describe reco-vs-truth mismatches that cannot
216-
// occur for a pure MC-truth particle, so these bins are expected to stay empty
217-
// unless the producer assigns those origin codes for some other reason
218-
// (e.g. pileup-associated particles tagged as kFromWrongCollision).
216+
// occur for a pure MC-truth particle, so these bins are expected to stay empty.
217+
// kFromWrongCollision is not handled here at all: mcBuilder.h's getOrigin() never
218+
// assigns it (only kPhysicalPrimary/kFromSecondaryDecay/kFromMaterial), so it would
219+
// be dead code the same way it was in the per-candidate hist managers.
219220
mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kOrigin, HistTable)), mcParticle.origin());
220221
switch (static_cast<modes::McOrigin>(mcParticle.origin())) {
221222
case modes::McOrigin::kNoMcParticle:
@@ -224,9 +225,6 @@ class McParticleHistManager
224225
case modes::McOrigin::kPhysicalPrimary:
225226
mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kPrimary, HistTable)), mcParticle.pt());
226227
break;
227-
case modes::McOrigin::kFromWrongCollision:
228-
mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kFromWrongCollision, HistTable)), mcParticle.pt());
229-
break;
230228
case modes::McOrigin::kFromMaterial:
231229
mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kFromMaterial, HistTable)), mcParticle.pt());
232230
break;

‎PWGCF/Femto/Core/v0HistManager.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -716,9 +716,6 @@ class V0HistManager
716716
case modes::McOrigin::kPhysicalPrimary:
717717
mHistogramRegistry->fill(HIST(v0Prefix) + HIST(McDir) + HIST(getHistName(kPrimary, HistTable)), v0Candidate.pt(), v0Candidate.cosPa());
718718
break;
719-
case modes::McOrigin::kFromWrongCollision:
720-
mHistogramRegistry->fill(HIST(v0Prefix) + HIST(McDir) + HIST(getHistName(kFromWrongCollision, HistTable)), v0Candidate.pt(), v0Candidate.cosPa());
721-
break;
722719
case modes::McOrigin::kFromMaterial:
723720
mHistogramRegistry->fill(HIST(v0Prefix) + HIST(McDir) + HIST(getHistName(kFromMaterial, HistTable)), v0Candidate.pt(), v0Candidate.cosPa());
724721
break;

‎PWGCF/Femto/TableProducer/femtoProducer.cxx‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,29 @@ struct FemtoProducer {
669669
}
670670
PROCESS_SWITCH(FemtoProducer, processTracksV0sCascadesRun3PbPbWithEventShape, "Provide tracks, v0s and cascades in PbPb collisions with event shape information", false);
671671

672+
void processTracksV0sCascadesPhotonsRun3PbPbWithEventShape(rawinputs::Run3PbPbCollisionsWithEventShape::iterator const& col,
673+
o2::aod::BCsWithTimestamps const& bcs,
674+
rawinputs::Run3FullPidTracks const& tracks,
675+
rawinputs::Run3Vzeros const& v0s,
676+
rawinputs::Run3Cascades const& cascades,
677+
o2::aod::V0PhotonsKF const& photons,
678+
o2::aod::V0Legs const& v0legs)
679+
{
680+
if (!processCollisions<modes::System::kPbPb_Run3>(col, bcs, tracks)) {
681+
return;
682+
}
683+
auto tracksWithItsPid = o2::soa::Attach<rawinputs::Run3FullPidTracks, o2::aod::pidits::ITSNSigmaEl, o2::aod::pidits::ITSNSigmaPi, o2::aod::pidits::ITSNSigmaKa,
684+
o2::aod::pidits::ITSNSigmaPr, o2::aod::pidits::ITSNSigmaDe, o2::aod::pidits::ITSNSigmaTr, o2::aod::pidits::ITSNSigmaHe>(tracks);
685+
processTracks<modes::System::kPbPb_Run3>(col, tracksWithItsPid);
686+
processV0s<modes::System::kPbPb_Run3>(col, tracks, v0s);
687+
processCascades<modes::System::kPbPb_Run3>(col, tracks, cascades);
688+
// V0PhotonsKF/V0Legs carry a plain CollisionId column (not a framework index column), so they
689+
// are not auto-grouped by the DPL binder and must be sliced manually, same as EMPhotonFilter.cxx
690+
auto photonsThisCol = photons.sliceBy(perColRecoPCMPhotons, col.globalIndex());
691+
processPhotons<modes::System::kPbPb_Run3>(col, photonsThisCol, v0legs);
692+
}
693+
PROCESS_SWITCH(FemtoProducer, processTracksV0sCascadesPhotonsRun3PbPbWithEventShape, "Provide tracks, v0s, cascades and PCM photons in PbPb collisions with event shape information", false);
694+
672695
void processTracksKinksRun3pp(rawinputs::Run3PpCollisions::iterator const& col,
673696
o2::aod::BCsWithTimestamps const& bcs,
674697
rawinputs::Run3FullPidTracks const& tracks,

0 commit comments

Comments
 (0)