diff --git a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx index a0ef2af5aa0..62f5e93d830 100644 --- a/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx +++ b/PWGLF/Tasks/GlobalEventProperties/studyPnch.cxx @@ -357,6 +357,9 @@ struct StudyPnch { if (RecCol.globalIndex() != mcCollision.bestCollisionIndex()) { continue; } + if (!RecCol.has_mcCollision()) { + continue; + } auto recTracksPart = RecTracks.sliceBy(perCollision, RecCol.globalIndex()); auto multrec = countNTracksMcCol(recTracksPart, RecCol); if (multrec > 0) {