Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions MC/bin/o2dpg_sim_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,21 @@ def load_external_config(configfile):
return config

anchorConfig = {}
anchorConfig_generic = { "ConfigParams": create_sim_config(args) }
if args.anchor_config != '':
print ("** Using external config **")
anchorConfig = load_external_config(args.anchor_config)
# adjust the anchorConfig with keys from the generic config, not mentioned in the external config
# (useful for instance for digitization parameters or others not usually mentioned in async reco)
for key in anchorConfig_generic["ConfigParams"]:
if not key in anchorConfig["ConfigParams"]:
print (f"Transcribing key {key} from generic config into final config")
anchorConfig["ConfigParams"][key] = anchorConfig_generic["ConfigParams"][key]

else:
# we load a generic config
print ("** Using generic config **")
anchorConfig = { "ConfigParams": create_sim_config(args) }
anchorConfig = anchorConfig_generic
# we apply additional external user choices for the configuration
# this will overwrite config from earlier stages
if args.overwrite_config != '':
Expand Down Expand Up @@ -1095,7 +1103,7 @@ def createRestDigiTask(name, det='ALLSMALLER'):
f'--interactionRate {INTRATE}',
f'--incontext {CONTEXTFILE}',
'--disable-write-ini',
putConfigValues(listOfMainKeys=['EMCSimParam'], localCF={"DigiParams.seed" : str(TFSEED)}),
putConfigValues(listOfMainKeys=['EMCSimParam','FV0DigParam','FT0DigParam'], localCF={"DigiParams.seed" : str(TFSEED)}),
('--combine-devices','')[args.no_combine_dpl_devices],
('',' --disable-mc')[args.no_mc_labels],
QEDdigiargs,
Expand Down