From faa43437a62d2023df378ee8a0f3ef41f879b01e Mon Sep 17 00:00:00 2001 From: Matthias Kleiner Date: Tue, 20 Oct 2026 17:41:31 +0200 Subject: [PATCH] MC: store the MC truth in the TPC residuals whenever MC labels are on With ALIEN_JDL_DOTPCRESIDUALEXTRACTION=1 the residual extraction and aggregation tasks run with --enable-mc unless --no-mc-labels is given, since the MC truth needs the MC labels of the ITS, TPC and ITS-TPC tracks. It stores the MC truth of the residual tracks as branch trkMC of the trackData tree. The option is passed only if the O2 version used for the reconstruction provides it. Co-Authored-By: Claude Opus 5.5 --- MC/bin/o2dpg_sim_workflow.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/MC/bin/o2dpg_sim_workflow.py b/MC/bin/o2dpg_sim_workflow.py index 54352b80a..adac4e5af 100755 --- a/MC/bin/o2dpg_sim_workflow.py +++ b/MC/bin/o2dpg_sim_workflow.py @@ -1866,6 +1866,9 @@ def getDigiTaskName(det): '--tracking-sources-map-extraction', default_value='ITS-TPC')) + # store the MC truth of the residual tracks (branch trkMC of the trackData tree) whenever MC labels are available + scdcalib_mc_option = '' if args.no_mc_labels else option_if_available('o2-tpc-scdcalib-interpolation-workflow', '--enable-mc', envfile=async_envfile) + SCDCALIBtask = createTask(name='scdcalib_'+str(tf), needs=[PVFINDERtask['name']], tf=tf, cwd=timeframeworkdir, lab=["CALIB"], mem='4000') SCDCALIBtask['cmd'] = task_finalizer( [ '${O2_ROOT}/bin/o2-tpc-scdcalib-interpolation-workflow', @@ -1875,7 +1878,8 @@ def getDigiTaskName(det): '--tracking-sources ' + scdcalib_track_sources, '--tracking-sources-map-extraction ' + scdcalib_track_extraction, '--sec-per-slot 1 ', - '--send-track-data' + '--send-track-data', + scdcalib_mc_option ]) workflow['stages'].append(SCDCALIBtask) @@ -1898,7 +1902,8 @@ def getDigiTaskName(det): '--enable-track-input', '--output-dir ./', '--output-type ' + scdaggreg_outputtype, - '--meta-output-dir /dev/null' + '--meta-output-dir /dev/null', + scdcalib_mc_option ]) workflow['stages'].append(SCDAGGREGtask)