Skip to content

Commit feb8500

Browse files
committed
Fix Interaction Rate selection in case of embedding
1 parent 6d8a28b commit feb8500

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
parser.add_argument('-eCM',help='CMS energy', default=-1)
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)
38-
parser.add_argument('-col',help='collision sytem: pp, PbPb, pPb, Pbp, ...', default='pp')
38+
parser.add_argument('-col',help='collision system: pp, PbPb, pPb, Pbp, ..., in case of embedding collision system of signal', default='pp')
3939
parser.add_argument('-ptHatBin',help='pT hard bin number', default=-1)
4040
parser.add_argument('-ptHatMin',help='pT hard minimum when no bin requested', default=0)
4141
parser.add_argument('-ptHatMax',help='pT hard maximum when no bin requested', default=-1)
@@ -49,6 +49,7 @@
4949
parser.add_argument('-nb',help='number of background events / timeframe', default=20)
5050
parser.add_argument('-genBkg',help='generator', default='pythia8hi')
5151
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')
5253

5354
parser.add_argument('-e',help='simengine', default='TGeant4')
5455
parser.add_argument('-tf',help='number of timeframes', default=2)
@@ -326,13 +327,19 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
326327
# ------------------
327328
CONTEXTFILE='collisioncontext.root'
328329

330+
# Determine interation rate
331+
# it should be taken from CDB, meanwhile some default values
329332
INTRATE=int(args.interactionRate)
330333

331-
#it should be taken from CDB, meanwhile some default values
334+
# in case of embedding take intended bkg collision type not the signal
335+
COLTYPEIR=COLTYPE
336+
if doembedding:
337+
COLTYPEIR=args.colBkg
338+
332339
if INTRATE < 0:
333-
if COLTYPE=="PbPb":
340+
if COLTYPEIR=="PbPb":
334341
INTRATE=50000 #Hz
335-
elif COLTYPE=="pp":
342+
elif COLTYPEIR=="pp":
336343
INTRATE=400000 #Hz
337344
else: #pPb?
338345
INTRATE=200000 #Hz ???

0 commit comments

Comments
 (0)