Skip to content

Commit 2bec214

Browse files
committed
Feat: remove dead code path
1 parent dc12526 commit 2bec214

4 files changed

Lines changed: 4 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;

0 commit comments

Comments
 (0)