From 29d02fcbd60451eec6ba45b2502127e28922671e Mon Sep 17 00:00:00 2001 From: aferrero2707 Date: Fri, 26 Apr 2024 16:29:41 +0200 Subject: [PATCH] [MUON] fix data sources when only MFT and MCH are available (#2263) The case where only MFT and MCH tracks are available was not correctly handled by the TracksTask, since the standalone MFT and MCH tracks were not added to the list of requested data sources for the reco container. This led to fatal exceptions like this during the processing: ``` stderr: what(): [MuonTrack(GlobalFwdTrack)] bad MFT track index: iMFT=1417 tracksMFT.size()=0 ``` --- Modules/MUON/Common/src/TracksTask.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Modules/MUON/Common/src/TracksTask.cxx b/Modules/MUON/Common/src/TracksTask.cxx index 63b4832d2e..626f52e844 100644 --- a/Modules/MUON/Common/src/TracksTask.cxx +++ b/Modules/MUON/Common/src/TracksTask.cxx @@ -48,6 +48,11 @@ GID::mask_t adaptSource(GID::mask_t src) src.set(GID::Source::MCH); src.set(GID::Source::MID); } + if (src[GID::Source::MFTMCH] == 1) { + // ensure we request the individual tracks as we use their information in the plotter + src.set(GID::Source::MFT); + src.set(GID::Source::MCH); + } if (src[GID::Source::MCHMID] == 1) { // ensure we request the individual tracks as we use their information in the plotter src.set(GID::Source::MCH); @@ -261,9 +266,6 @@ void TracksTask::monitorData(o2::framework::ProcessingContext& ctx) return; } - auto tracksMCH = ctx.inputs().get>("trackMCH"); - auto clusters = ctx.inputs().get>("trackMCHTRACKCLUSTERS"); - ILOG(Debug, Devel) << "Debug: Asserted inputs" << ENDM; mRecoCont.collectData(ctx, *mDataRequest.get());