Skip to content

Commit 4ca32ef

Browse files
committed
Protect against 0 or negative interaction rate
1 parent 3cf5219 commit 4ca32ef

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

MC/bin/o2dpg_sim_workflow.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,9 +578,11 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True):
578578
exit(1)
579579

580580
# Determine interation rate
581-
# it should be taken from CDB, meanwhile some default values
582581
signalprefix='sgn_' + str(tf)
583582
INTRATE=int(args.interactionRate)
583+
if INTRATE <= 0:
584+
print('o2dpg_sim_workflow: Error! Interaction rate not >0 !!!')
585+
exit(1)
584586
BCPATTERN=args.bcPatternFile
585587
includeQED = (COLTYPE == 'PbPb' or (doembedding and COLTYPEBKG == "PbPb")) or (args.with_qed == True)
586588

0 commit comments

Comments
 (0)