Skip to content

Commit 8ad3ecf

Browse files
committed
Adapt o2dpg_sim_workflow.py to new TPC corr.maps
Given that the new maps are provided by the tpc-scaler device and the latter is added in the MC by the o2-tpc-reco workflow, the corrections and CTP input request should be disable when the o2-tpc-reco is used for clusterization only (correction not used). In general, all settings of o2-tpc-scaler from the anchoring workflowconfig.log should be added to options of all MC reco workflows requiring TPC corrections (except the MC-specific settings like imposing --lumi-type 1 --corrmap-lumi-mode 2), but since at the moment MC does not simulate sector edge fluctuations, we simply add --disable-sec-edge-fluc-correction.
1 parent 04450fa commit 8ad3ecf

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

MC/bin/o2dpg_sim_workflow.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,7 @@ def getDigiTaskName(det):
12801280
if not args.combine_tpc_clusterization:
12811281
# We treat TPC clusterization in multiple (sector) steps in order to
12821282
# stay within the memory limit or to parallelize over sector from outside (not yet supported within cluster algo)
1283+
# For the clusterization we disable the TPC SC corrections
12831284
tpcclustertasks=[]
12841285
sectorpertask=18
12851286
for s in range(0,35,sectorpertask):
@@ -1293,6 +1294,8 @@ def getDigiTaskName(det):
12931294
getDPL_global_options(bigshm=True),
12941295
'--input-type ' + ('digitizer','digits')[args.no_tpc_digitchunking],
12951296
'--output-type clusters,send-clusters-per-sector',
1297+
'--corrmap-lumi-mode 3',
1298+
'--disable-ctp-lumi-request',
12961299
f'--tpc-native-cluster-writer \" --outfile tpc-native-clusters-part{(int)(s/sectorpertask)}.root\"',
12971300
f'--tpc-sectors {s}-{s+sectorpertask-1}',
12981301
putConfigValues(["GPU_global",
@@ -1302,6 +1305,7 @@ def getDigiTaskName(det):
13021305
'--disable-mc' if args.no_mc_labels else None
13031306
], configname="tpcclusterizertask"
13041307
)
1308+
# RS: note that --disable-IDC-scalers should be added to options above once it is added by the CorrectionMapsOptions::addGlobalOptions)
13051309

13061310
tpcclussect['env'] = { "OMP_NUM_THREADS" : "4" , "TBB_NUM_THREADS" : "4" }
13071311
tpcclussect['semaphore'] = "tpctriggers.root"
@@ -1316,7 +1320,7 @@ def getDigiTaskName(det):
13161320
# TODO: adapt this to the case above and merge code / avoid code duplication
13171321
tpcclus = createTask(name='tpccluster_' + str(tf), needs=tpcclusterneed, tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu=NWORKERS_TF, mem='2000')
13181322
tpcclus['cmd'] = '${O2_ROOT}/bin/o2-tpc-chunkeddigit-merger --tpc-lanes ' + str(NWORKERS_TF)
1319-
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]
1323+
tpcclus['cmd'] += ' | ${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options() + ' --input-type digitizer --output-type clusters,send-clusters-per-sector --corrmap-lumi-mode 3 --disable-ctp-lumi-request ' + putConfigValues(["GPU_global","TPCGasParam","TPCCorrMap"],{"GPU_proc.ompThreads" : 1}) + ('',' --disable-mc')[args.no_mc_labels]
13201324
workflow['stages'].append(tpcclus)
13211325
tpcreconeeds.append(tpcclus['name'])
13221326

@@ -1361,10 +1365,13 @@ def getDigiTaskName(det):
13611365
if not isActive('CTP'):
13621366
# CTP digits won't be produced for this timeframe (CTP not in the readout detector list)
13631367
tpc_corr_scaling_options += ' --disable-ctp-lumi-request'
1364-
1368+
13651369
# why not simply?
13661370
# tpc_corr_scaling_options = ('--lumi-type 1', '')[tpcDistortionType != 0]
13671371

1372+
# at the moment MC is not ready for the sector edge fluctuations (RS: and does not use IDC but --disable-IDC-scalers can be added only once it is added by the CorrectionMapsOptions::addGlobalOptions)
1373+
tpc_corr_scaling_options += option_if_available('o2-tpc-reco-workflow', '--disable-sec-edge-fluc-correction', envfile=async_envfile)
1374+
13681375
#<--------- TPC reco task
13691376
if includeTPCSyncMode:
13701377
tpcSyncreconeeds = tpcreconeeds.copy()

0 commit comments

Comments
 (0)