Skip to content

Commit 9a36a50

Browse files
committed
AnchoredMC: Allow to overwrite number of orbits per TF
1 parent 2b045c9 commit 9a36a50

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

MC/bin/o2dpg_sim_workflow_anchored.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ def main():
368368
parser.add_argument("--trig-eff", type=float, dest="trig_eff", help="Trigger eff needed for IR", default=-1.0)
369369
parser.add_argument("--run-time-span-file", type=str, dest="run_span_file", help="Run-time-span-file for exclusions of timestamps (bad data periods etc.)", default="")
370370
parser.add_argument("--invert-irframe-selection", action='store_true', help="Inverts the logic of --run-time-span-file")
371+
parser.add_argument("--orbitsPerTF", type=int, help="Force a certain orbits-per-timeframe number; Automatically taken from CCDB if not given.", default=-1)
371372
parser.add_argument('forward', nargs=argparse.REMAINDER) # forward args passed to actual workflow creation
372373
args = parser.parse_args()
373374
print (args)
@@ -383,6 +384,11 @@ def main():
383384
run_start = GLOparams["SOR"]
384385
run_end = GLOparams["EOR"]
385386

387+
# overwrite with some external choices
388+
if args.orbitsPerTF!=-1:
389+
print("Adjusting orbitsPerTF from " + str(GLOparams["OrbitsPerTF"]) + " to " + str(args.orbitsPerTF))
390+
GLOparams["OrbitsPerTF"] = args.orbitsPerTF
391+
386392
# determine timestamp, and production offset for the final MC job to run
387393
timestamp, prod_offset = determine_timestamp(run_start, run_end, [args.split_id - 1, args.prod_split], args.cycle, args.tf, GLOparams["OrbitsPerTF"])
388394
# determine orbit corresponding to timestamp

MC/run/ANCHOR/anchorMC.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ ALICEO2_CCDB_LOCALCACHE=${ALICEO2_CCDB_LOCALCACHE:-$(pwd)/ccdb}
211211

212212
# these arguments will be digested by o2dpg_sim_workflow_anchored.py
213213
baseargs="-tf ${NTIMEFRAMES} --split-id ${SPLITID} --prod-split ${PRODSPLIT} --cycle ${CYCLE} --run-number ${ALIEN_JDL_LPMRUNNUMBER} \
214-
${ALIEN_JDL_RUN_TIME_SPAN_FILE:+--run-time-span-file ${ALIEN_JDL_RUN_TIME_SPAN_FILE} ${ALIEN_JDL_INVERT_IRFRAME_SELECTION:+--invert-irframe-selection}}"
214+
${ALIEN_JDL_RUN_TIME_SPAN_FILE:+--run-time-span-file ${ALIEN_JDL_RUN_TIME_SPAN_FILE} ${ALIEN_JDL_INVERT_IRFRAME_SELECTION:+--invert-irframe-selection}}" \
215+
${ALIEN_JDL_MC_ORBITS_PER_TF:+--orbitsPerTF ${ALIEN_JDL_MC_ORBITS_PER_TF}}
215216

216217
# these arguments will be passed as well but only evetually be digested by o2dpg_sim_workflow.py which is called from o2dpg_sim_workflow_anchored.py
217218
remainingargs="-seed ${SEED} -ns ${NSIGEVENTS} --include-local-qc --pregenCollContext"

0 commit comments

Comments
 (0)