2525parser = argparse .ArgumentParser (description = 'Create an ALICE (Run3) MC simulation workflow' )
2626
2727parser .add_argument ('-ns' ,help = 'number of signal events / timeframe' , default = 20 )
28- parser .add_argument ('-gen' ,help = 'generator: pythia8, extgen' , default = 'pythia8 ' )
28+ parser .add_argument ('-gen' ,help = 'generator: pythia8, extgen' , default = '' )
2929parser .add_argument ('-proc' ,help = 'process type: dirgamma, jets, ccbar' , default = '' )
3030parser .add_argument ('-trigger' ,help = 'event selection: particle, external' , default = '' )
3131parser .add_argument ('-ini' ,help = 'generator init parameters file, for example: ${O2DPG_ROOT}/MC/config/PWGHF/ini/GeneratorHF.ini' , default = '' )
4747
4848parser .add_argument ('--embedding' ,action = 'store_true' , help = 'With embedding into background' )
4949parser .add_argument ('-nb' ,help = 'number of background events / timeframe' , default = 20 )
50- parser .add_argument ('-genBkg' ,help = 'generator' , default = 'pythia8hi' )
51- parser .add_argument ('-iniBkg' ,help = 'generator init parameters file' , default = '${O2DPG_ROOT}/MC/config/common/ini/basic.ini' )
52- parser .add_argument ('-colBkg' ,help = 'collision system: collision type of bkg in case of embedding ' , default = 'PbPb' )
50+ parser .add_argument ('-genBkg' ,help = 'embedding background generator' , default = 'pythia8hi' )
51+ parser .add_argument ('-iniBkg' ,help = 'embedding background generator init parameters file' , default = '${O2DPG_ROOT}/MC/config/common/ini/basic.ini' )
52+ parser .add_argument ('-colBkg' ,help = 'embedding background collision system ' , default = 'PbPb' )
5353
5454parser .add_argument ('-e' ,help = 'simengine' , default = 'TGeant4' )
5555parser .add_argument ('-tf' ,help = 'number of timeframes' , default = 2 )
@@ -115,6 +115,10 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
115115 # ---- do background transport task -------
116116 NBKGEVENTS = args .nb
117117 GENBKG = args .genBkg
118+ if GENBKG == '' :
119+ print ('o2dpg_sim_workflow: Error! embedding background generator name not provided' )
120+ exit (1 )
121+
118122 INIBKG = args .iniBkg
119123 BKGtask = createTask (name = 'bkgsim' , lab = ["GEANT" ], cpu = '8' )
120124 BKGtask ['cmd' ]= 'o2-sim -e ' + SIMENGINE + ' -j ' + str (NWORKERS ) + ' -n ' + str (NBKGEVENTS ) + ' -g ' + str (GENBKG ) + ' ' + str (MODULES ) + ' -o bkg --configFile ' + str (INIBKG )
@@ -175,6 +179,10 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
175179 EBEAMB = float (args .eB )
176180 NSIGEVENTS = args .ns
177181 GENERATOR = args .gen
182+ if GENERATOR == '' :
183+ print ('o2dpg_sim_workflow: Error! generator name not provided' )
184+ exit (1 )
185+
178186 INIFILE = ''
179187 if args .ini != '' :
180188 INIFILE = ' --configFile ' + args .ini
@@ -272,7 +280,7 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
272280 # produce the signal configuration
273281 SGN_CONFIG_task = createTask (name = 'gensgnconf_' + str (tf ), tf = tf , cwd = timeframeworkdir )
274282 SGN_CONFIG_task ['cmd' ] = 'echo "placeholder / dummy task"'
275- if GENERATOR == 'pythia8' :
283+ if GENERATOR == 'pythia8' and PROCESS != '' :
276284 SGN_CONFIG_task ['cmd' ] = '${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
277285 --output=pythia8.cfg \
278286 --seed='+ str (RNDSEED )+ ' \
@@ -292,6 +300,10 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
292300 # NOTE: Generator setup might be handled in a different file or different files (one per
293301 # possible generator)
294302
303+ if CONFKEY == '' :
304+ print ('o2dpg_sim_workflow: Error! configuration file not provided' )
305+ exit (1 )
306+
295307 workflow ['stages' ].append (SGN_CONFIG_task )
296308
297309 # -----------------
0 commit comments