Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions MC/bin/o2dpg_sim_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,25 @@ def extractVertexArgs(configKeyValuesStr, finalDiamondDict):
COLTYPEBKG=args.colBkg
havePbPb = (COLTYPE == 'PbPb' or (doembedding and COLTYPEBKG == "PbPb"))

# TPC loopers are a background effect: with embedding, background and signal get consistent loopers settings
if doembedding:
def loopersKeys(confkey):
return [kv.strip() for kv in confkey.split(';') if kv.strip().startswith('GenTPCLoopers.')]
def loopersVetoed(confkey):
return any(kv.split('=')[0].strip() == 'GenTPCLoopers.loopersVeto' and kv.split('=')[1].strip().lower() in ('true', '1')
for kv in loopersKeys(confkey))
if loopersVetoed(args.confKey) or loopersVetoed(args.confKeyBkg):
print('o2dpg_sim_workflow: TPC loopers switched off for background and signal')
args.confKeyBkg = args.confKeyBkg + ';GenTPCLoopers.loopersVeto=true'
args.confKey = args.confKey + ';GenTPCLoopers.loopersVeto=true'
else:
# Loopers settings given for either transport apply to both; the background's own settings take precedence.
# Both transports take colsys from -colBkg, as the loopers are a background effect.
# Which transport generates the loopers of a given collision is decided in O2, from the collision context itself.
signalLoopersKeys, bkgLoopersKeys = loopersKeys(args.confKey), loopersKeys(args.confKeyBkg)
args.confKeyBkg = ';'.join(signalLoopersKeys + ['GenTPCLoopers.colsys=' + COLTYPEBKG, args.confKeyBkg])
args.confKey = ';'.join(['GenTPCLoopers.colsys=' + COLTYPEBKG, args.confKey] + bkgLoopersKeys)

workflow={}
workflow['stages'] = []

Expand Down
Loading