Skip to content

Commit e8f8173

Browse files
committed
Optionally add sync TPC reco mode
TPC sync. reco. mode with clusters rejection is added is if ALIEN_JDL_DOTPCSYNCMODE=1 env.var is defined. In this case the original tpc-native-clusters.root file is used as an input to TPC sync. reco. and overwritten by it.
1 parent d59baad commit e8f8173

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -491,14 +491,17 @@ def extractVertexArgs(configKeyValuesStr, finalDiamondDict):
491491
includeLocalQC=args.include_local_qc=='True' or args.include_local_qc==True
492492
includeAnalysis = args.include_analysis
493493
includeTPCResiduals=True if environ.get('ALIEN_JDL_DOTPCRESIDUALEXTRACTION') == '1' else False
494+
includeTPCSyncMode=True if environ.get('ALIEN_JDL_DOTPCSYNCMODE') == '1' else False
494495
ccdbRemap = environ.get('ALIEN_JDL_REMAPPINGS')
495496

496497
qcdir = "QC"
497498
if (includeLocalQC or includeFullQC) and not isdir(qcdir):
498499
mkdir(qcdir)
499500

500-
def getDPL_global_options(bigshm=False, ccdbbackend=True):
501-
common=" -b --run "
501+
def getDPL_global_options(bigshm=False, ccdbbackend=True, runcommand=True):
502+
common=" "
503+
if runcommand:
504+
common=common + ' -b --run '
502505
if len(args.dpl_child_driver) > 0:
503506
common=common + ' --child-driver ' + str(args.dpl_child_driver)
504507
if ccdbbackend:
@@ -1015,15 +1018,15 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
10151018
if (args.sor != -1):
10161019
globalTFConfigValues["HBFUtils.startTime"] = args.sor
10171020

1018-
def putConfigValues(listOfMainKeys=[], localCF = {}):
1021+
def putConfigValues(listOfMainKeys=[], localCF = {}, globalTFConfig = True):
10191022
"""
10201023
Creates the final --configValues string to be passed to the workflows.
10211024
Uses the globalTFConfigValues and applies other parameters on top
10221025
listOfMainKeys : list of keys to be applied from the global configuration object
10231026
localCF: a dictionary mapping key to param - possibly overrides settings taken from global config
10241027
"""
1025-
returnstring = ' --configKeyValues "'
1026-
cf = globalTFConfigValues.copy()
1028+
returnstring = ' --configKeyValues "'
1029+
cf = globalTFConfigValues.copy() if globalTFConfig else {}
10271030
isfirst=True
10281031

10291032
# now bring in the relevant keys
@@ -1284,6 +1287,27 @@ def getDigiTaskName(det):
12841287
# tpc_corr_scaling_options = ('--lumi-type 1', '')[tpcDistortionType != 0]
12851288

12861289
#<--------- TPC reco task
1290+
if includeTPCSyncMode:
1291+
tpcSyncreconeeds = tpcreconeeds.copy()
1292+
TPCSyncRECOtask=createTask(name='tpcSyncreco_'+str(tf), needs=tpcSyncreconeeds, tf=tf, cwd=timeframeworkdir, lab=["RECO"], relative_cpu=3/8, mem='16000')
1293+
TPCSyncRECOtask['cmd'] = '${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options(bigshm=True, ccdbbackend=False, runcommand=False) \
1294+
+ '--input-type clusters --output-type clusters,disable-writer ' \
1295+
+ putConfigValues()
1296+
TPCSyncRECOtask['cmd'] += ' | ${O2_ROOT}/bin/o2-gpu-reco-workflow' + getDPL_global_options(bigshm=True, ccdbbackend=True, runcommand=False) \
1297+
+ '--input-type clusters --output-type compressed-clusters-flat,clusters,send-clusters-per-sector --filtered-output-specs ' \
1298+
+ tpc_corr_scaling_options + ' ' + tpc_corr_options_mc \
1299+
+ putConfigValues(["TPCGasParam", "TPCCorrMap", "trackTuneParams"],
1300+
localCF={"GPU_proc.ompThreads":NWORKERS_TF, \
1301+
"GPU_proc.tpcWriteClustersAfterRejection":1, \
1302+
"GPU_rec_tpc.compressionTypeMask":0, \
1303+
"GPU_global.synchronousProcessing":1, \
1304+
"GPU_proc.tpcIncreasedMinClustersPerRow":500000},
1305+
globalTFConfig=False)
1306+
TPCSyncRECOtask['cmd'] += ' | ${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options(bigshm=True, ccdbbackend=False, runcommand=True) + ' --filtered-input --input-type pass-through --output-type clusters,send-clusters-per-sector '
1307+
TPCSyncRECOtask['cmd'] += ' ; mv tpc-filtered-native-clusters.root tpc-native-clusters.root'
1308+
workflow['stages'].append(TPCSyncRECOtask)
1309+
tpcreconeeds.append(TPCSyncRECOtask['name'])
1310+
12871311
TPCRECOtask=createTask(name='tpcreco_'+str(tf), needs=tpcreconeeds, tf=tf, cwd=timeframeworkdir, lab=["RECO"], relative_cpu=3/8, mem='16000')
12881312
TPCRECOtask['cmd'] = task_finalizer([
12891313
'${O2_ROOT}/bin/o2-tpc-reco-workflow',

0 commit comments

Comments
 (0)