Skip to content

Commit 6ec05c6

Browse files
committed
Hotfix: Set proper pythia8 config
1 parent 5b9a015 commit 6ec05c6

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -273,16 +273,20 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
273273
SGN_CONFIG_task=createTask(name='gensgnconf_'+str(tf), tf=tf, cwd=timeframeworkdir)
274274
if GENERATOR == 'pythia8':
275275
SGN_CONFIG_task['cmd'] = '${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
276-
--output=pythia8.cfg \
277-
--seed='+str(RNDSEED)+' \
278-
--idA='+str(PDGA)+' \
279-
--idB='+str(PDGB)+' \
280-
--eCM='+str(ECMS)+' \
281-
--process='+str(PROCESS)+' \
282-
--ptHatMin=' + str(PTHATMIN) + ' \
283-
--ptHatMax=' + str(PTHATMAX)
276+
--output=pythia8.cfg \
277+
--seed='+str(RNDSEED)+' \
278+
--idA='+str(PDGA)+' \
279+
--idB='+str(PDGB)+' \
280+
--eCM='+str(ECMS)+' \
281+
--process='+str(PROCESS)+' \
282+
--ptHatMin=' + str(PTHATMIN) + ' \
283+
--ptHatMax=' + str(PTHATMAX)
284284
if WEIGHTPOW > -1:
285285
SGN_CONFIG_task['cmd'] = SGN_CONFIG_task['cmd'] + ' --weightPow=' + str(WEIGHTPOW)
286+
# if we configure pythia8 here --> we also need to adjust the configuration
287+
# TODO: we need a proper config container/manager so as to combine these local configs with external configs etc.
288+
CONFKEY='--configKeyValues "GeneratorPythia8.config=pythia8.cfg"'
289+
286290
# elif GENERATOR == 'extgen': what do we do if generator is not pythia8?
287291
# NOTE: Generator setup might be handled in a different file or different files (one per
288292
# possible generator)
@@ -302,7 +306,7 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
302306
signalneeds = signalneeds + [ BKG_HEADER_task['name'] ]
303307
SGNtask=createTask(name='sgnsim_'+str(tf), needs=signalneeds, tf=tf, cwd='tf'+str(tf), lab=["GEANT"], cpu='5.')
304308
SGNtask['cmd']='o2-sim -e ' + str(SIMENGINE) + ' ' + str(MODULES) + ' -n ' + str(NSIGEVENTS) + ' -j ' \
305-
+ str(NWORKERS) + ' -g ' + str(GENERATOR) + ' ' + str(TRIGGER)+ ' ' + str(CONFKEY) \
309+
+ str(NWORKERS) + ' -g ' + str(GENERATOR) + ' ' + str(TRIGGER)+ ' ' + str(CONFKEY) \
306310
+ ' ' + str(INIFILE) + ' -o ' + signalprefix + ' ' + embeddinto
307311
workflow['stages'].append(SGNtask)
308312

0 commit comments

Comments
 (0)