Skip to content

Commit 45af240

Browse files
committed
AnchorMC: Allow more option overwrites
1 parent 04c9dae commit 45af240

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

MC/bin/o2dpg_sim_workflow_anchored.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,13 +582,19 @@ def main():
582582
forwardargs += ' --ctp-scaler ' + str(ctp_local_rate_raw)
583583

584584
# we finally pass forward to the unanchored MC workflow creation
585-
# TODO: this needs to be done in a pythonic way clearly
586-
# NOTE: forwardargs can - in principle - contain some of the arguments that are appended here. However, the last passed argument wins, so they would be overwritten.
585+
# NOTE: forwardargs can - in principle - contain some of the arguments that are appended here.
586+
# However, the last passed argument wins, so they would be overwritten. If this should not happen, the option
587+
# needs to be handled as further below:
587588
energyarg = (" -eCM " + str(eCM)) if A1 == A2 else (" -eA " + str(eA) + " -eB " + str(eB))
588589
forwardargs += " -tf " + str(args.tf) + " --sor " + str(run_start) + " --timestamp " + str(timestamp) + " --production-offset " + str(prod_offset) + " -run " + str(args.run_number) + " --run-anchored --first-orbit " \
589-
+ str(GLOparams["FirstOrbit"]) + " -field ccdb -bcPatternFile ccdb" + " --orbitsPerTF " + str(GLOparams["OrbitsPerTF"]) + " -col " + str(ColSystem) + str(energyarg)
590+
+ str(GLOparams["FirstOrbit"]) + " --orbitsPerTF " + str(GLOparams["OrbitsPerTF"]) + " -col " + str(ColSystem) + str(energyarg)
591+
# the following options can be overwritten/influence from the outside
590592
if not '--readoutDets' in forwardargs:
591593
forwardargs += ' --readoutDets ' + GLOparams['detList']
594+
if not '-field' in forwardargs:
595+
forwardargs += ' -field ccdb '
596+
if not '-bcPatternFile' in forwardargs:
597+
forwardargs += ' -bcPatternFile ccdb '
592598
print ("forward args ", forwardargs)
593599
cmd = "${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py " + forwardargs
594600

0 commit comments

Comments
 (0)