Skip to content

Commit b7a4651

Browse files
gconesabsawenzel
authored andcommitted
add B field setting, beautify/cut too long execution lines
1 parent e703b09 commit b7a4651

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
parser.add_argument('-eA',help='Beam A energy', default=6499.) #6369 PbPb, 2.510 pp 5 TeV, 4 pPb
3737
parser.add_argument('-eB',help='Beam B energy', default=-1)
3838
parser.add_argument('-col',help='collision system: pp, PbPb, pPb, Pbp, ..., in case of embedding collision system of signal', default='pp')
39+
parser.add_argument('-field',help='L3 field rounded to kGauss, allowed: values +-2,+-5 and 0; +-5U for uniform field', default='-5')
40+
3941
parser.add_argument('-ptHatBin',help='pT hard bin number', default=-1)
4042
parser.add_argument('-ptHatMin',help='pT hard minimum when no bin requested', default=0)
4143
parser.add_argument('-ptHatMax',help='pT hard maximum when no bin requested', default=-1)
@@ -87,6 +89,7 @@
8789
NWORKERS=args.j
8890
MODULES=args.mod #"--skipModules ZDC"
8991
SIMENGINE=args.e
92+
BFIELD=args.field
9093

9194
# add here other possible types
9295

@@ -131,7 +134,9 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
131134

132135
INIBKG=args.iniBkg
133136
BKGtask=createTask(name='bkgsim', lab=["GEANT"], cpu=NWORKERS)
134-
BKGtask['cmd']='o2-sim -e ' + SIMENGINE + ' -j ' + str(NWORKERS) + ' -n ' + str(NBKGEVENTS) + ' -g ' + str(GENBKG) + ' ' + str(MODULES) + ' -o bkg --configFile ' + str(INIBKG)
137+
BKGtask['cmd']='o2-sim -e ' + SIMENGINE + ' -j ' + str(NWORKERS) + ' -n ' + str(NBKGEVENTS) \
138+
+ ' -g ' + str(GENBKG) + ' ' + str(MODULES) + ' -o bkg --configFile ' + str(INIBKG) \
139+
+ ' --field ' + str(BFIELD)
135140
workflow['stages'].append(BKGtask)
136141

137142
# check if we should upload background event
@@ -328,9 +333,10 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
328333
else:
329334
signalneeds = signalneeds + [ BKG_HEADER_task['name'] ]
330335
SGNtask=createTask(name='sgnsim_'+str(tf), needs=signalneeds, tf=tf, cwd='tf'+str(tf), lab=["GEANT"], relative_cpu=5/8, mem='2000')
331-
SGNtask['cmd']='o2-sim -e ' + str(SIMENGINE) + ' ' + str(MODULES) + ' -n ' + str(NSIGEVENTS) + ' -j ' \
332-
+ str(NWORKERS) + ' -g ' + str(GENERATOR) + ' ' + str(TRIGGER)+ ' ' + str(CONFKEY) \
333-
+ ' ' + str(INIFILE) + ' -o ' + signalprefix + ' ' + embeddinto
336+
SGNtask['cmd']='o2-sim -e ' + str(SIMENGINE) + ' ' + str(MODULES) + ' -n ' + str(NSIGEVENTS) \
337+
+ ' --field ' + str(BFIELD) + ' -j ' + str(NWORKERS) + ' -g ' + str(GENERATOR) \
338+
+ ' ' + str(TRIGGER) + ' ' + str(CONFKEY) + ' ' + str(INIFILE) \
339+
+ ' -o ' + signalprefix + ' ' + embeddinto
334340
workflow['stages'].append(SGNtask)
335341

336342
# some tasks further below still want geometry + grp in fixed names, so we provide it here

0 commit comments

Comments
 (0)