Skip to content

Commit

Permalink
add option to set EMC busy time to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimenorman committed Dec 24, 2024
1 parent c23cfd2 commit 6cd5e64
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion MC/bin/o2dpg_sim_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@
# Matching training for machine learning
parser.add_argument('--fwdmatching-save-trainingdata', action='store_true', help='enables saving parameters at plane for matching training with machine learning')

# EMC options
parser.add_argument('--emc-remove-busy', action='store_true', help='disables EMC busy time')

args = parser.parse_args()
print (args)

Expand Down Expand Up @@ -894,6 +897,11 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
if (args.sor != -1):
globalTFConfigValues["HBFUtils.startTime"] = args.sor

# set the EMC busy time as zero if option enabled for EMC digitizer
emcBusyCF=dict()
if(args.emc_remove_busy == True):
emcBusyCF['EMCSimParam.mBusyTime'] = '0'

def putConfigValues(localCF = {}):
"""
Creates the final --configValues string to be passed to the workflows.
Expand Down Expand Up @@ -1073,7 +1081,7 @@ def createRestDigiTask(name, det='ALLSMALLER'):
FT0FV0EMCCTPDIGItask['cmd'] = ('','ln -nfs ../bkg_HitsFT0.root . ; ln -nfs ../bkg_HitsFV0.root . ;')[doembedding]
FT0FV0EMCCTPDIGItask['cmd'] += '${O2_ROOT}/bin/o2-sim-digitizer-workflow ' + getDPL_global_options() + ' -n ' + str(args.ns) + simsoption \
+ ' --onlyDet FT0,FV0,EMC,CTP --interactionRate ' + str(INTRATE) + ' --incontext ' + str(CONTEXTFILE) \
+ ' --disable-write-ini' + putConfigValuesNew(localCF={"DigiParams.seed" : str(TFSEED)}) \
+ ' --disable-write-ini' + putConfigValuesNew(localCF={"DigiParams.seed" : str(TFSEED)} | emcBusyCF) \
+ (' --combine-devices','')[args.no_combine_dpl_devices] + ('',' --disable-mc')[args.no_mc_labels] + QEDdigiargs \
+ ' --forceSelectedDets'
workflow['stages'].append(FT0FV0EMCCTPDIGItask)
Expand Down

0 comments on commit 6cd5e64

Please sign in to comment.