Skip to content

Commit a49e58d

Browse files
sawenzelalcaliva
authored andcommitted
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. (cherry picked from commit 7340626)
1 parent 928cc8b commit a49e58d

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
@@ -477,8 +477,10 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
477477
includeQED = (COLTYPE == 'PbPb' or (doembedding and COLTYPEBKG == "PbPb")) or (args.with_qed == True)
478478
signalprefix='sgn'
479479

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

483485
# preproduce the collision context / timeframe structure for all timeframes at once
484486
precollneeds=[GRP_TASK['name']]
@@ -502,7 +504,7 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
502504
+ ' --seed ' + str(RNDSEED) \
503505
+ ' --noEmptyTF --first-orbit ' + str(args.first_orbit) \
504506
+ ' --extract-per-timeframe tf:sgn' \
505-
+ ' --with-vertices ' + vtxmode \
507+
+ ' --with-vertices ' + vtxmode_precoll \
506508
+ ' --maxCollsPerTF ' + str(args.ns) \
507509
+ ' --orbitsEarly ' + str(args.orbits_early)
508510

@@ -787,7 +789,7 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
787789
if JOBTTL != None:
788790
generationtimeout = 0.95*int(JOBTTL) # for GRID jobs, determine timeout automatically
789791
SGNGENtask['cmd'] +=('','timeout ' + str(generationtimeout) + ' ')[args.make_evtpool and generationtimeout>0] \
790-
+ '${O2_ROOT}/bin/o2-sim --noGeant -j 1 --field ccdb --vertexMode ' + vtxmode \
792+
+ '${O2_ROOT}/bin/o2-sim --noGeant -j 1 --field ccdb --vertexMode ' + vtxmode_sgngen \
791793
+ ' --run ' + str(args.run) + ' ' + str(CONFKEY) + str(TRIGGER) \
792794
+ ' -g ' + str(GENERATOR) + ' ' + str(INIFILE) + ' -o genevents ' + embeddinto \
793795
+ ('', ' --timestamp ' + str(args.timestamp))[args.timestamp!=-1] \

0 commit comments

Comments
 (0)