From 03af1ed6ca194acbb18ceefbe1e6c1f9c59fa1b6 Mon Sep 17 00:00:00 2001 From: Ernst Hellbar Date: Fri, 21 Aug 2026 12:44:03 +0200 Subject: [PATCH] GLO VTX: add missing protection against accessing MC labels of background events --- Modules/GLO/src/VertexingQcTask.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/GLO/src/VertexingQcTask.cxx b/Modules/GLO/src/VertexingQcTask.cxx index bfc1fcc353..bbc6284c26 100644 --- a/Modules/GLO/src/VertexingQcTask.cxx +++ b/Modules/GLO/src/VertexingQcTask.cxx @@ -215,7 +215,7 @@ void VertexingQcTask::monitorData(o2::framework::ProcessingContext& ctx) mTimeUncVsNContrib->Fill(nContr, timeUnc); mBeamSpot->Fill(x, y); - if (mUseMC && mcLbl[i].isSet()) { // make sure the label was set + if (mUseMC && mcLbl[i].isSet() && mcLbl[i].getSourceID() == 0) { // make sure the label was set and to use only the underlying event auto header = mMCReader.getMCEventHeader(mcLbl[i].getSourceID(), mcLbl[i].getEventID()); auto purity = mcLbl[i].getCorrWeight(); auto mult = header.GetNPrim();