Skip to content

Commit

Permalink
Hotfix: Set proper pythia8 config
Browse files Browse the repository at this point in the history
  • Loading branch information
sawenzel committed Jun 3, 2021
1 parent 5b9a015 commit 6ec05c6
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions MC/bin/o2dpg_sim_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,20 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
SGN_CONFIG_task=createTask(name='gensgnconf_'+str(tf), tf=tf, cwd=timeframeworkdir)
if GENERATOR == 'pythia8':
SGN_CONFIG_task['cmd'] = '${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
--output=pythia8.cfg \
--seed='+str(RNDSEED)+' \
--idA='+str(PDGA)+' \
--idB='+str(PDGB)+' \
--eCM='+str(ECMS)+' \
--process='+str(PROCESS)+' \
--ptHatMin=' + str(PTHATMIN) + ' \
--ptHatMax=' + str(PTHATMAX)
--output=pythia8.cfg \
--seed='+str(RNDSEED)+' \
--idA='+str(PDGA)+' \
--idB='+str(PDGB)+' \
--eCM='+str(ECMS)+' \
--process='+str(PROCESS)+' \
--ptHatMin=' + str(PTHATMIN) + ' \
--ptHatMax=' + str(PTHATMAX)
if WEIGHTPOW > -1:
SGN_CONFIG_task['cmd'] = SGN_CONFIG_task['cmd'] + ' --weightPow=' + str(WEIGHTPOW)
# if we configure pythia8 here --> we also need to adjust the configuration
# TODO: we need a proper config container/manager so as to combine these local configs with external configs etc.
CONFKEY='--configKeyValues "GeneratorPythia8.config=pythia8.cfg"'

# elif GENERATOR == 'extgen': what do we do if generator is not pythia8?
# NOTE: Generator setup might be handled in a different file or different files (one per
# possible generator)
Expand All @@ -302,7 +306,7 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
signalneeds = signalneeds + [ BKG_HEADER_task['name'] ]
SGNtask=createTask(name='sgnsim_'+str(tf), needs=signalneeds, tf=tf, cwd='tf'+str(tf), lab=["GEANT"], cpu='5.')
SGNtask['cmd']='o2-sim -e ' + str(SIMENGINE) + ' ' + str(MODULES) + ' -n ' + str(NSIGEVENTS) + ' -j ' \
+ str(NWORKERS) + ' -g ' + str(GENERATOR) + ' ' + str(TRIGGER)+ ' ' + str(CONFKEY) \
+ str(NWORKERS) + ' -g ' + str(GENERATOR) + ' ' + str(TRIGGER)+ ' ' + str(CONFKEY) \
+ ' ' + str(INIFILE) + ' -o ' + signalprefix + ' ' + embeddinto
workflow['stages'].append(SGNtask)

Expand Down

0 comments on commit 6ec05c6

Please sign in to comment.