Skip to content

Commit 4515c81

Browse files
Add particle charge and rapidity checks in prediction
1 parent bcfbd3c commit 4515c81

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

PWGLF/Tasks/QC/mcParticlePrediction.cxx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,19 @@ struct McParticlePrediction {
500500
continue;
501501
}
502502

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+
503516
histos.fill(HIST("particles/vtx/x"), particle.vx());
504517
histos.fill(HIST("particles/vtx/y"), particle.vy());
505518
histos.fill(HIST("particles/vtx/z"), particle.vz() - mcCollision.posZ());

0 commit comments

Comments
 (0)