Skip to content

Commit bcfbd3c

Browse files
authored
Simplify particle validation logic
Removed checks for particle charge and validity, retaining only the physical primary check.
1 parent 1b66373 commit bcfbd3c

1 file changed

Lines changed: 1 addition & 35 deletions

File tree

PWGLF/Tasks/QC/mcParticlePrediction.cxx

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -496,41 +496,7 @@ struct McParticlePrediction {
496496
continue;
497497
}
498498

499-
// if (!particle.isPhysicalPrimary()) {
500-
// continue;
501-
// }
502-
503-
TParticlePDG* p = pdgDB->GetParticle(particle.pdgCode());
504-
if (p) {
505-
if (std::abs(p->Charge()) > chargetolerance) {
506-
histos.fill(HIST("particles/eta/charged"), particle.eta());
507-
} else {
508-
histos.fill(HIST("particles/eta/neutral"), particle.eta());
509-
}
510-
}
511-
512-
if (std::abs(particle.y()) >= rapidityCut) {
513-
continue;
514-
}
515-
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) {
499+
if (!particle.isPhysicalPrimary()) {
534500
continue;
535501
}
536502

0 commit comments

Comments
 (0)