diff --git a/MC/bin/o2dpg_sim_workflow.py b/MC/bin/o2dpg_sim_workflow.py index 470e538f7..57fb0dd23 100755 --- a/MC/bin/o2dpg_sim_workflow.py +++ b/MC/bin/o2dpg_sim_workflow.py @@ -163,6 +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('--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') parser.add_argument('--fwdmatching-4-param', action='store_true', help='excludes q/pt from matching parameters') @@ -477,6 +479,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') + exit(1) +if args.tpc_mt_digitizer and args.tpc_sector_seeding: + print('o2dpg_sim_workflow: --tpc-sector-seeding is implied by --tpc-mt-digitizer') + INIFILE='' if args.ini!= '': INIFILE=' --configFile ' + args.ini @@ -1166,12 +1174,17 @@ def putConfigValues(listOfMainKeys=[], localCF = {}, globalTFConfig = True): TPCDigitask['cmd'] += '${O2_ROOT}/bin/o2-ccdb-downloadccdbfile --host http://alice-ccdb.cern.ch -p TPC/Config/RunInfoV2 --timestamp ' \ + str(args.timestamp) + ' --created-not-after ' + str(args.condition_not_after) + ' -d ${ALICEO2_CCDB_LOCALCACHE} ; ' TPCDigitask['cmd'] += '${O2_ROOT}/bin/o2-sim-digitizer-workflow ' + getDPL_global_options(bigshm=True) + ' -n ' + str(args.ns) + simsoption \ - + ' --onlyDet TPC --TPCuseCCDB --interactionRate ' + str(INTRATE) + ' --tpc-lanes ' + str(NWORKERS_TF) \ + + ' --onlyDet TPC --TPCuseCCDB --interactionRate ' + str(INTRATE) \ + ' --incontext ' + str(CONTEXTFILE) + ' --disable-write-ini --early-forward-policy always --forceSelectedDets ' \ + ' --tpc-distortion-type ' + str(tpcDistortionType) \ - + ' --n-threads-distortions 1 ' \ + putConfigValues(["TPCGasParam","TPCGEMParam","TPCEleParam","TPCITCorr","TPCDetParam"], localCF=tpcLocalCF) + if args.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: + TPCDigitask['cmd'] += ' --tpc-lanes ' + str(NWORKERS_TF) + ' --n-threads-distortions 1' + TPCDigitask['cmd'] += ('',' --tpc-sector-seeding')[args.tpc_sector_seeding] TPCDigitask['cmd'] += (' --tpc-chunked-writer','')[args.no_tpc_digitchunking] TPCDigitask['cmd'] += ('',' --disable-mc')[args.no_mc_labels] # we add any other extra command line options (power user customization) with an environment variable diff --git a/MC/utils/o2dpg_sim_metrics.py b/MC/utils/o2dpg_sim_metrics.py index c9367b7be..8d2c6d950 100755 --- a/MC/utils/o2dpg_sim_metrics.py +++ b/MC/utils/o2dpg_sim_metrics.py @@ -1235,6 +1235,7 @@ def incorporate_log_times(json_path, search_path): re.compile(r'\$\{O2DPG_DYNAMIC_NWORKER_OVERWRITE:-(\d+)\}'), # ${VAR:-N} — default value re.compile(r'(?