Skip to content

Commit

Permalink
Each timeframe starts at the next timeframe orbit boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
sawenzel committed Sep 21, 2021
1 parent baf36c7 commit a969da0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions MC/bin/o2dpg_sim_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,14 +457,18 @@ def getDPL_global_options(bigshm=False):

simsoption=' --sims ' + ('bkg,'+signalprefix if doembedding else signalprefix)

# each digitization should be done for a different bunch crossing range, depending on the timeframe id
orbitsPerTF = 256
startOrbit = (tf-1)*orbitsPerTF
globaldigitizeroptions = '--configKeyValues "HBFUtils.orbitFirstSampled=' + str(startOrbit) \
+ ';HBFUtils.nHBFPerTF=' + str(orbitsPerTF) + '"'

# This task creates the basic setup for all digitizers! all digitization configKeyValues need to be given here
# ContextTask=createTask(name='digicontext_'+str(tf), needs=[SGNtask['name'], LinkGRPFileTask['name']], tf=tf,
# cwd=timeframeworkdir, lab=["DIGI"], cpu='1')
# ContextTask['cmd'] = 'o2-sim-digitizer-workflow --only-context --interactionRate ' + str(INTRATE) + ' ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption
# workflow['stages'].append(ContextTask)
ContextTask = createTask(name='digicontext_'+str(tf), needs=[SGNtask['name'], LinkGRPFileTask['name']], tf=tf, cwd=timeframeworkdir, lab=["DIGI"], cpu='1')
# this is just to have the digitizer ini file
ContextTask['cmd'] = 'o2-sim-digitizer-workflow --only-context --interactionRate ' + str(INTRATE) + ' ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption
ContextTask['cmd'] = 'o2-sim-digitizer-workflow --only-context --interactionRate ' + str(INTRATE) \
+ ' ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption \
+ ' ' + globaldigitizeroptions

# in case of embedding we engineer the context directly and allow the user to provide an embedding pattern
# The :r flag means to shuffle the background events randomly
Expand Down

0 comments on commit a969da0

Please sign in to comment.