Skip to content

Commit 26c07a1

Browse files
[PWGLF] Fix primary particle selection for predictions (#17189)
Co-authored-by: SCHOTTER Romain <47983209+romainschotter@users.noreply.github.com>
1 parent 7adb521 commit 26c07a1

1 file changed

Lines changed: 3 additions & 24 deletions

File tree

PWGLF/Tasks/QC/mcParticlePrediction.cxx

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,9 @@ struct McParticlePrediction {
496496
continue;
497497
}
498498

499-
// if (!particle.isPhysicalPrimary()) {
500-
// continue;
501-
// }
499+
if (!particle.isPhysicalPrimary()) {
500+
continue;
501+
}
502502

503503
TParticlePDG* p = pdgDB->GetParticle(particle.pdgCode());
504504
if (p) {
@@ -513,27 +513,6 @@ struct McParticlePrediction {
513513
continue;
514514
}
515515

516-
// Check if particle has daughters (not a final state particle)
517-
auto daughters = particle.daughters_as<aod::McParticles>();
518-
bool isValid = false;
519-
520-
if (daughters.size() > 0) {
521-
isValid = true;
522-
for (const auto& daughter : daughters) {
523-
if (!daughter.isPhysicalPrimary()) {
524-
isValid = false;
525-
break;
526-
}
527-
}
528-
} else {
529-
// Final state particle - check if particle itself is physical primary
530-
isValid = particle.isPhysicalPrimary();
531-
}
532-
533-
if (!isValid) {
534-
continue;
535-
}
536-
537516
histos.fill(HIST("particles/vtx/x"), particle.vx());
538517
histos.fill(HIST("particles/vtx/y"), particle.vy());
539518
histos.fill(HIST("particles/vtx/z"), particle.vz() - mcCollision.posZ());

0 commit comments

Comments
 (0)