Skip to content

Commit ca15ef7

Browse files
committed
Adding TPC configKeyValues for setting reconstruction paramters
1 parent 868db81 commit ca15ef7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162
parser.add_argument('--fwdmatching-assessment-full', action='store_true', help='enables complete assessment of global forward reco')
163163
parser.add_argument('--fwdmatching-4-param', action='store_true', help='excludes q/pt from matching parameters')
164164
parser.add_argument('--fwdmatching-cut-4-param', action='store_true', help='apply selection cuts on position and angular parameters')
165+
parser.add_argument('--tpc-reco-confkeyvalues', default=";", help="configKeyValues passed to the tpc-reco-workflow")
165166

166167
# Matching training for machine learning
167168
parser.add_argument('--fwdmatching-save-trainingdata', action='store_true', help='enables saving parameters at plane for matching training with machine learning')
@@ -1246,7 +1247,7 @@ def getDigiTaskName(det):
12461247
tpcclustertasks.append(taskname)
12471248
tpcclussect = createTask(name=taskname, needs=tpcclusterneed, tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='2', mem='8000')
12481249
digitmergerstr = '${O2_ROOT}/bin/o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s)+'-'+str(s+sectorpertask-1) + ' --tpc-lanes ' + str(NWORKERS_TF) + ' | '
1249-
tpcclussect['cmd'] = (digitmergerstr,'')[args.no_tpc_digitchunking] + ' ${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options(bigshm=True) + ' --input-type ' + ('digitizer','digits')[args.no_tpc_digitchunking] + ' --output-type clusters,send-clusters-per-sector --tpc-native-cluster-writer \" --outfile tpc-native-clusters-part'+ str((int)(s/sectorpertask)) + '.root\" --tpc-sectors ' + str(s)+'-'+str(s+sectorpertask-1) + ' ' + putConfigValues(["GPU_global"], {"GPU_proc.ompThreads" : 4}) + ('',' --disable-mc')[args.no_mc_labels]
1250+
tpcclussect['cmd'] = (digitmergerstr,'')[args.no_tpc_digitchunking] + ' ${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options(bigshm=True) + ' --input-type ' + ('digitizer','digits')[args.no_tpc_digitchunking] + ' --output-type clusters,send-clusters-per-sector --tpc-native-cluster-writer \" --outfile tpc-native-clusters-part'+ str((int)(s/sectorpertask)) + '.root\" --tpc-sectors ' + str(s)+'-'+str(s+sectorpertask-1) + ' ' + (putConfigValues(["GPU_global"], {"GPU_proc.ompThreads" : 4})).replace("--configKeyValues \"", "--configKeyValues \"" + args.tpc_reco_confkeyvalues + ";") + ('',' --disable-mc')[args.no_mc_labels]
12501251
tpcclussect['env'] = { "OMP_NUM_THREADS" : "4" , "TBB_NUM_THREADS" : "4" }
12511252
tpcclussect['semaphore'] = "tpctriggers.root"
12521253
tpcclussect['retry_count'] = 2 # the task has a race condition --> makes sense to retry
@@ -1259,7 +1260,7 @@ def getDigiTaskName(det):
12591260
else:
12601261
tpcclus = createTask(name='tpccluster_' + str(tf), needs=tpcclusterneed, tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu=NWORKERS_TF, mem='2000')
12611262
tpcclus['cmd'] = '${O2_ROOT}/bin/o2-tpc-chunkeddigit-merger --tpc-lanes ' + str(NWORKERS_TF)
1262-
tpcclus['cmd'] += ' | ${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options() + ' --input-type digitizer --output-type clusters,send-clusters-per-sector ' + putConfigValues(["GPU_global","TPCGasParam","TPCCorrMap"],{"GPU_proc.ompThreads" : 1}) + ('',' --disable-mc')[args.no_mc_labels]
1263+
tpcclus['cmd'] += ' | ${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options() + ' --input-type digitizer --output-type clusters,send-clusters-per-sector ' + (putConfigValues(["GPU_global","TPCGasParam","TPCCorrMap"],{"GPU_proc.ompThreads" : 1})).replace("--configKeyValues \"", "--configKeyValues \"" + args.tpc_reco_confkeyvalues + ";") + ('',' --disable-mc')[args.no_mc_labels]
12631264
workflow['stages'].append(tpcclus)
12641265
tpcreconeeds.append(tpcclus['name'])
12651266

@@ -1338,7 +1339,7 @@ def getDigiTaskName(det):
13381339
"TPCCorrMap",
13391340
"GPU_rec_tpc",
13401341
"trackTuneParams"],
1341-
{"GPU_proc.ompThreads":NWORKERS_TF} | tpcLocalCFreco),
1342+
{"GPU_proc.ompThreads":NWORKERS_TF} | tpcLocalCFreco).replace("--configKeyValues \"", "--configKeyValues \"" + args.tpc_reco_confkeyvalues + ";"),
13421343
('',' --disable-mc')[args.no_mc_labels],
13431344
tpc_corr_scaling_options,
13441345
tpc_corr_options_mc,

0 commit comments

Comments
 (0)