Skip to content

Commit

Permalink
[MUON] fix data sources when only MFT and MCH are available (#2263)
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
aferrero2707 authored and Barthelemy committed Apr 26, 2024
1 parent 83e6fe9 commit 29d02fc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Modules/MUON/Common/src/TracksTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -261,9 +266,6 @@ void TracksTask::monitorData(o2::framework::ProcessingContext& ctx)
return;
}

auto tracksMCH = ctx.inputs().get<gsl::span<o2::mch::TrackMCH>>("trackMCH");
auto clusters = ctx.inputs().get<gsl::span<o2::mch::Cluster>>("trackMCHTRACKCLUSTERS");

ILOG(Debug, Devel) << "Debug: Asserted inputs" << ENDM;

mRecoCont.collectData(ctx, *mDataRequest.get());
Expand Down

0 comments on commit 29d02fc

Please sign in to comment.