Skip to content

Commit adc010e

Browse files
committed
Improvements in generator vertexing
This goes together with AliceO2Group/AliceO2#13955 and ensures a more consistent primary vertex location during the event generator phases in O2DPG MC. Fixes a bug where the primary vertex was applied twice.
1 parent db033b7 commit adc010e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,10 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
487487
includeQED = (COLTYPE == 'PbPb' or (doembedding and COLTYPEBKG == "PbPb")) or (args.with_qed == True)
488488
signalprefix='sgn'
489489

490-
# No vertexing for event pool generation
491-
vtxmode = 'kNoVertex' if args.make_evtpool else 'kCCDB'
490+
# No vertexing for event pool generation; otherwise the vertex comes from CCDB and later from CollContext
491+
# (Note that the CCDB case covers the kDiamond case, since this is picked up in GRP_TASK)
492+
vtxmode_precoll = 'kNoVertex' if args.make_evtpool else 'kCCDB'
493+
vtxmode_sgngen = 'kCollContext'
492494

493495
# preproduce the collision context / timeframe structure for all timeframes at once
494496
precollneeds=[GRP_TASK['name']]
@@ -512,7 +514,7 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
512514
+ ' --seed ' + str(RNDSEED) \
513515
+ ' --noEmptyTF --first-orbit ' + str(args.first_orbit) \
514516
+ ' --extract-per-timeframe tf:sgn' \
515-
+ ' --with-vertices ' + vtxmode \
517+
+ ' --with-vertices ' + vtxmode_precoll \
516518
+ ' --maxCollsPerTF ' + str(args.ns) \
517519
+ ' --orbitsEarly ' + str(args.orbits_early)
518520

@@ -808,7 +810,7 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
808810
if JOBTTL != None:
809811
generationtimeout = 0.95*int(JOBTTL) # for GRID jobs, determine timeout automatically
810812
SGNGENtask['cmd'] +=('','timeout ' + str(generationtimeout) + ' ')[args.make_evtpool and generationtimeout>0] \
811-
+ '${O2_ROOT}/bin/o2-sim --noGeant -j 1 --field ccdb --vertexMode ' + vtxmode \
813+
+ '${O2_ROOT}/bin/o2-sim --noGeant -j 1 --field ccdb --vertexMode ' + vtxmode_sgngen \
812814
+ ' --run ' + str(args.run) + ' ' + str(CONFKEY) + str(TRIGGER) \
813815
+ ' -g ' + str(GENERATOR) + ' ' + str(INIFILE) + ' -o genevents ' + embeddinto \
814816
+ ('', ' --timestamp ' + str(args.timestamp))[args.timestamp!=-1] \

0 commit comments

Comments
 (0)