Skip to content

Commit 90885e0

Browse files
authored
[PWGEM] PhotonMeson: Fix pcm-qc-mc processGen crash (#16590)
1 parent 64d591f commit 90885e0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,9 @@ struct PCMQCMC {
774774
if (cfgResolDetailPlots) {
775775
fRegistry.fill(HIST("Generated/hPtEtaPhi"), mctrack.pt(), mctrack.eta(), mctrack.phi()); // fill for all generated photons before any kinematic cut
776776
}
777+
if (mctrack.daughtersIds().size() == 0) {
778+
continue;
779+
}
777780
auto daughter = mcparticles.iteratorAt(mctrack.daughtersIds()[0]); // choose ele or pos.
778781
float rxy_gen_e = std::sqrt(std::pow(daughter.vx(), 2) + std::pow(daughter.vy(), 2));
779782
float phi_cp = std::atan2(daughter.vy(), daughter.vx());

0 commit comments

Comments
 (0)