Skip to content

Commit 1ea8f06

Browse files
committed
default to combining smaller digi in same task
- saves repeated initialization (TGeo, etc) - backed by performance numbers
1 parent 142f993 commit 1ea8f06

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494

9595
# power feature (for playing) --> does not appear in help message
9696
# help='Treat smaller sensors in a single digitization')
97-
parser.add_argument('--combine-smaller-digi', action='store_true', help=argparse.SUPPRESS)
97+
parser.add_argument('--no-combine-smaller-digi', action='store_true', help=argparse.SUPPRESS)
9898
parser.add_argument('--no-combine-dpl-devices', action='store_true', help=argparse.SUPPRESS)
9999
parser.add_argument('--combine-tpc-clusterization', action='store_true', help=argparse.SUPPRESS) #<--- useful for small productions (pp, low interaction rate, small number of events)
100100
parser.add_argument('--first-orbit', default=0, type=int, help=argparse.SUPPRESS) # to set the first orbit number of the run for HBFUtils (only used when anchoring)
@@ -706,25 +706,24 @@ def createRestDigiTask(name, det='ALLSMALLER'):
706706

707707
det_to_digitask={}
708708

709-
if args.combine_smaller_digi==True:
709+
if not args.no_combine_smaller_digi==True:
710710
det_to_digitask['ALLSMALLER']=createRestDigiTask("restdigi_"+str(tf))
711711

712712
for det in smallsensorlist:
713713
name=str(det).lower() + "digi_" + str(tf)
714-
t = det_to_digitask['ALLSMALLER'] if args.combine_smaller_digi==True else createRestDigiTask(name, det)
714+
t = det_to_digitask['ALLSMALLER'] if (not args.no_combine_smaller_digi==True) else createRestDigiTask(name, det)
715715
det_to_digitask[det]=t
716716

717-
if True or args.combine_smaller_digi==False:
718-
# detectors serving CTP need to be treated somewhat special since CTP needs
719-
# these inputs at the same time --> still need to be made better
720-
tneeds = [ContextTask['name']]
721-
t = createTask(name="ft0fv0ctp_digi_" + str(tf), needs=tneeds,
722-
tf=tf, cwd=timeframeworkdir, lab=["DIGI","SMALLDIGI"], cpu='1')
723-
t['cmd'] = ('','ln -nfs ../bkg_HitsFT0.root . ; ln -nfs ../bkg_HitsFV0.root . ;')[doembedding]
724-
t['cmd'] += '${O2_ROOT}/bin/o2-sim-digitizer-workflow ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption + ' --onlyDet FT0,FV0,CTP --interactionRate ' + str(INTRATE) + ' --incontext ' + str(CONTEXTFILE) + ' --disable-write-ini' + putConfigValuesNew() + (' --combine-devices','')[args.no_combine_dpl_devices]
725-
workflow['stages'].append(t)
726-
det_to_digitask["FT0"]=t
727-
det_to_digitask["FV0"]=t
717+
# detectors serving CTP need to be treated somewhat special since CTP needs
718+
# these inputs at the same time --> still need to be made better
719+
tneeds = [ContextTask['name']]
720+
t = createTask(name="ft0fv0ctp_digi_" + str(tf), needs=tneeds,
721+
tf=tf, cwd=timeframeworkdir, lab=["DIGI","SMALLDIGI"], cpu='1')
722+
t['cmd'] = ('','ln -nfs ../bkg_HitsFT0.root . ; ln -nfs ../bkg_HitsFV0.root . ;')[doembedding]
723+
t['cmd'] += '${O2_ROOT}/bin/o2-sim-digitizer-workflow ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption + ' --onlyDet FT0,FV0,CTP --interactionRate ' + str(INTRATE) + ' --incontext ' + str(CONTEXTFILE) + ' --disable-write-ini' + putConfigValuesNew() + (' --combine-devices','')[args.no_combine_dpl_devices]
724+
workflow['stages'].append(t)
725+
det_to_digitask["FT0"]=t
726+
det_to_digitask["FV0"]=t
728727

729728
def getDigiTaskName(det):
730729
t = det_to_digitask.get(det)

0 commit comments

Comments
 (0)