From 420119df24ab2cffdb6d2e165d938457d10dcce7 Mon Sep 17 00:00:00 2001 From: Matthias Kleiner Date: Mon, 12 Oct 2026 20:41:38 +0800 Subject: [PATCH] MC: optional MC truth in the TPC residuals (ALIEN_JDL_DOTPCRESIDUALEXTRACTIONMC) With ALIEN_JDL_DOTPCRESIDUALEXTRACTIONMC=1 (on top of ALIEN_JDL_DOTPCRESIDUALEXTRACTION=1) the residual extraction and aggregation tasks run with --enable-mc, which stores the MC truth of the residual tracks as branch trkMC of the trackData tree. Off by default; needs an O2 version whose residual writer and reader carry the MC truth. Co-Authored-By: Claude Opus 5.5 --- MC/bin/o2dpg_sim_workflow.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MC/bin/o2dpg_sim_workflow.py b/MC/bin/o2dpg_sim_workflow.py index 54352b80a..445b67ddf 100755 --- a/MC/bin/o2dpg_sim_workflow.py +++ b/MC/bin/o2dpg_sim_workflow.py @@ -534,6 +534,8 @@ def extractVertexArgs(configKeyValuesStr, finalDiamondDict): includeAnalysis = args.include_analysis includeTPCResiduals=True if environ.get('ALIEN_JDL_DOTPCRESIDUALEXTRACTION') == '1' else False includeTPCSyncMode=True if environ.get('ALIEN_JDL_DOTPCSYNCMODE') == '1' else False +# store the MC truth of the residual tracks (branch trkMC of the trackData tree); needs an O2 version with --enable-mc +includeTPCResidualsMC=True if environ.get('ALIEN_JDL_DOTPCRESIDUALEXTRACTIONMC') == '1' else False qcdir = "QC" if (includeLocalQC or includeFullQC) and not isdir(qcdir): @@ -1875,7 +1877,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', + '--enable-mc' if includeTPCResidualsMC else '' ]) workflow['stages'].append(SCDCALIBtask) @@ -1898,7 +1901,8 @@ def getDigiTaskName(det): '--enable-track-input', '--output-dir ./', '--output-type ' + scdaggreg_outputtype, - '--meta-output-dir /dev/null' + '--meta-output-dir /dev/null', + '--enable-mc' if includeTPCResidualsMC else '' ]) workflow['stages'].append(SCDAGGREGtask)