From ce9bcf8b9a5e2fbc9b26bced19c5ede9793b9b91 Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Fri, 13 Nov 2026 14:24:40 +0100 Subject: [PATCH] Make the multithreaded TPC digitizer the default This makes the multithreaded TPC digitizer the default in the MC workflow. - `--no-tpc-mt-digitizer` restores one digitizer process per lane. - `--no-tpc-digitchunking` also selects the lane mode, since the multithreaded device needs chunking. - `--tpc-mt-digitizer` is still accepted. https://its.cern.ch/jira/browse/O2-7309 Co-Authored-By: Claude Opus 5.5 --- MC/bin/o2dpg_sim_workflow.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/MC/bin/o2dpg_sim_workflow.py b/MC/bin/o2dpg_sim_workflow.py index 7361b289a..b1c44b7d2 100755 --- a/MC/bin/o2dpg_sim_workflow.py +++ b/MC/bin/o2dpg_sim_workflow.py @@ -163,7 +163,8 @@ parser.add_argument('--tpc-distortion-type', default=0, type=int, help='Simulate distortions in the TPC (0=no distortions, 1=distortions without scaling, 2=distortions with CTP scaling)') parser.add_argument('--tpc-corrmap-lumi-mode', default=2, type=int, help='TPC corrections mode (0=linear, 1=derivative, 2=derivative for special MC maps') parser.add_argument('--ctp-scaler', default=0, type=float, help='CTP raw scaler value used for distortion simulation') -parser.add_argument('--tpc-mt-digitizer', action='store_true', help='Digitize TPC in one multithreaded device instead of one process per lane (needs TPC digit chunking)') +parser.add_argument('--no-tpc-mt-digitizer', action='store_true', help='Digitize TPC with one process per lane instead of one multithreaded device') +parser.add_argument('--tpc-mt-digitizer', action='store_true', help=argparse.SUPPRESS) # the default now; kept for compatibility parser.add_argument('--tpc-sector-seeding', action='store_true', help='Seed the TPC digitizer per sector so that the digits do not depend on the number of lanes') # Global Forward reconstruction configuration parser.add_argument('--fwdmatching-assessment-full', action='store_true', help='enables complete assessment of global forward reco') @@ -482,10 +483,12 @@ def extractVertexArgs(configKeyValuesStr, finalDiamondDict): print('o2dpg_sim_workflow: Error! generator name not provided') exit(1) -if args.tpc_mt_digitizer and args.no_tpc_digitchunking: - print('o2dpg_sim_workflow: Error! --tpc-mt-digitizer needs TPC digit chunking') +# the multithreaded TPC digitizer is the default; it needs TPC digit chunking +tpc_mt_digitizer = not args.no_tpc_mt_digitizer and not args.no_tpc_digitchunking +if args.tpc_mt_digitizer and not tpc_mt_digitizer: + print('o2dpg_sim_workflow: Error! --tpc-mt-digitizer conflicts with --no-tpc-mt-digitizer or --no-tpc-digitchunking') exit(1) -if args.tpc_mt_digitizer and args.tpc_sector_seeding: +if tpc_mt_digitizer and args.tpc_sector_seeding: print('o2dpg_sim_workflow: --tpc-sector-seeding is implied by --tpc-mt-digitizer') INIFILE='' @@ -1185,7 +1188,7 @@ def putConfigValues(listOfMainKeys=[], localCF = {}, globalTFConfig = True): + ' --tpc-distortion-type ' + str(tpcDistortionType) \ + putConfigValues(["TPCGasParam","TPCGEMParam","TPCEleParam","TPCITCorr","TPCDetParam"], localCF=tpcLocalCF) - if args.tpc_mt_digitizer: + if tpc_mt_digitizer: # one device with NWORKERS_TF threads; it always seeds per sector TPCDigitask['cmd'] += ' --tpc-digi-threads ' + str(NWORKERS_TF) + ' --n-threads-distortions ' + str(NWORKERS_TF) else: