Skip to content

Commit 922e219

Browse files
committed
simplify/reduce digitizer creation task
1 parent 16daa02 commit 922e219

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -634,34 +634,29 @@ def putConfigValuesNew(listOfMainKeys=[], localCF = {}):
634634
# these are digitizers which are single threaded
635635
def createRestDigiTask(name, det='ALLSMALLER'):
636636
tneeds = needs=[ContextTask['name']]
637-
if det=='ALLSMALLER':
637+
commondigicmd = '${O2_ROOT}/bin/o2-sim-digitizer-workflow ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption + ' --interactionRate ' + str(INTRATE) + ' --incontext ' + str(CONTEXTFILE) + ' --disable-write-ini' + putConfigValuesNew(["MFTAlpideParam, ITSAlpideParam, ITSDigitizerParam"])
638+
639+
if det=='ALLSMALLER': # here we combine all smaller digits in one DPL workflow
638640
if usebkgcache:
639641
for d in itertools.chain(smallsensorlist, ctp_trigger_inputlist):
640642
tneeds += [ BKG_HITDOWNLOADER_TASKS[d]['name'] ]
641643
t = createTask(name=name, needs=tneeds,
642644
tf=tf, cwd=timeframeworkdir, lab=["DIGI","SMALLDIGI"], cpu=NWORKERS)
643645
t['cmd'] = ('','ln -nfs ../bkg_Hits*.root . ;')[doembedding]
644-
t['cmd'] += '${O2_ROOT}/bin/o2-sim-digitizer-workflow ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption + ' --skipDet TPC,TRD --interactionRate ' + str(INTRATE) + ' --incontext ' + str(CONTEXTFILE) + ' --disable-write-ini' + putConfigValuesNew(["MFTAlpideParam, ITSAlpideParam, ITSDigitizerParam"])
645-
workflow['stages'].append(t)
646-
return t
647-
648-
elif det=='TOF':
649-
if usebkgcache:
650-
tneeds += [ BKG_HITDOWNLOADER_TASKS[det]['name'] ]
651-
t = createTask(name=name, needs=tneeds,
652-
tf=tf, cwd=timeframeworkdir, lab=["DIGI","SMALLDIGI"], cpu='1')
653-
t['cmd'] = ('','ln -nfs ../bkg_Hits' + str(det) + '.root . ;')[doembedding]
654-
t['cmd'] += '${O2_ROOT}/bin/o2-sim-digitizer-workflow --use-ccdb-tof ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption + ' --onlyDet ' + str(det) + ' --interactionRate ' + str(INTRATE) + ' --incontext ' + str(CONTEXTFILE) + ' --disable-write-ini' + putConfigValuesNew(["MFTAlpideParam, ITSAlpideParam, ITSDigitizerParam"])
646+
t['cmd'] += commondigicmd + ' --skipDet TPC,TRD '
647+
t['cmd'] += ' --ccdb-tof-sa'
655648
workflow['stages'].append(t)
656649
return t
657650

658-
else:
651+
else: # here we create individual digitizers
659652
if usebkgcache:
660653
tneeds += [ BKG_HITDOWNLOADER_TASKS[det]['name'] ]
661654
t = createTask(name=name, needs=tneeds,
662655
tf=tf, cwd=timeframeworkdir, lab=["DIGI","SMALLDIGI"], cpu='1')
663656
t['cmd'] = ('','ln -nfs ../bkg_Hits' + str(det) + '.root . ;')[doembedding]
664-
t['cmd'] += '${O2_ROOT}/bin/o2-sim-digitizer-workflow ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption + ' --onlyDet ' + str(det) + ' --interactionRate ' + str(INTRATE) + ' --incontext ' + str(CONTEXTFILE) + ' --disable-write-ini' + putConfigValuesNew(["MFTAlpideParam, ITSAlpideParam, ITSDigitizerParam"])
657+
t['cmd'] += commondigicmd + ' --onlyDet ' + str(det)
658+
if det == 'TOF':
659+
t['cmd'] += ' --ccdb-tof-sa'
665660
workflow['stages'].append(t)
666661
return t
667662

0 commit comments

Comments
 (0)