Skip to content

Commit ce9bcf8

Browse files
sawenzelclaude
andcommitted
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 <noreply@anthropic.com>
1 parent c97ed0e commit ce9bcf8

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎MC/bin/o2dpg_sim_workflow.py‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@
163163
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)')
164164
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')
165165
parser.add_argument('--ctp-scaler', default=0, type=float, help='CTP raw scaler value used for distortion simulation')
166-
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)')
166+
parser.add_argument('--no-tpc-mt-digitizer', action='store_true', help='Digitize TPC with one process per lane instead of one multithreaded device')
167+
parser.add_argument('--tpc-mt-digitizer', action='store_true', help=argparse.SUPPRESS) # the default now; kept for compatibility
167168
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')
168169
# Global Forward reconstruction configuration
169170
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):
482483
print('o2dpg_sim_workflow: Error! generator name not provided')
483484
exit(1)
484485

485-
if args.tpc_mt_digitizer and args.no_tpc_digitchunking:
486-
print('o2dpg_sim_workflow: Error! --tpc-mt-digitizer needs TPC digit chunking')
486+
# the multithreaded TPC digitizer is the default; it needs TPC digit chunking
487+
tpc_mt_digitizer = not args.no_tpc_mt_digitizer and not args.no_tpc_digitchunking
488+
if args.tpc_mt_digitizer and not tpc_mt_digitizer:
489+
print('o2dpg_sim_workflow: Error! --tpc-mt-digitizer conflicts with --no-tpc-mt-digitizer or --no-tpc-digitchunking')
487490
exit(1)
488-
if args.tpc_mt_digitizer and args.tpc_sector_seeding:
491+
if tpc_mt_digitizer and args.tpc_sector_seeding:
489492
print('o2dpg_sim_workflow: --tpc-sector-seeding is implied by --tpc-mt-digitizer')
490493

491494
INIFILE=''
@@ -1185,7 +1188,7 @@ def putConfigValues(listOfMainKeys=[], localCF = {}, globalTFConfig = True):
11851188
+ ' --tpc-distortion-type ' + str(tpcDistortionType) \
11861189
+ putConfigValues(["TPCGasParam","TPCGEMParam","TPCEleParam","TPCITCorr","TPCDetParam"],
11871190
localCF=tpcLocalCF)
1188-
if args.tpc_mt_digitizer:
1191+
if tpc_mt_digitizer:
11891192
# one device with NWORKERS_TF threads; it always seeds per sector
11901193
TPCDigitask['cmd'] += ' --tpc-digi-threads ' + str(NWORKERS_TF) + ' --n-threads-distortions ' + str(NWORKERS_TF)
11911194
else:

0 commit comments

Comments
 (0)