Skip to content

Commit 49c0a3a

Browse files
committed
Add --no-qed to reliably disable QED background
QED background is forced on for same-species (heavy-ion) collisions and had no way to turn off, which can be a problem in some expert/debugging scenarios. Add a --no-qed flag, mutually exclusive with --with-qed, that wins over the species default. Also drop the dead (doembedding and QED_enabled) term. Default behaviour is unchanged.
1 parent b4a073b commit 49c0a3a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

MC/bin/o2dpg_sim_workflow.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@
8383
parser.add_argument('-eB',help='Beam B energy', default=-1)
8484
parser.add_argument('-col',help='collision system: pp, PbPb, pPb, Pbp, ..., in case of embedding collision system of signal', default='pp')
8585
parser.add_argument('-field',help='L3 field rounded to kGauss, allowed values: +-2,+-5 and 0; +-5U for uniform field; or "ccdb" to take from conditions database', default='ccdb')
86-
parser.add_argument('--with-qed',action='store_true', help='Enable QED background contribution (for PbPb always included)')
86+
qed_group = parser.add_mutually_exclusive_group()
87+
qed_group.add_argument('--with-qed', dest='with_qed', action='store_true', default=False, help='Force-enable QED background contribution (on by default for same-species heavy-ion collisions such as Pb-Pb)')
88+
qed_group.add_argument('--no-qed', dest='no_qed', action='store_true', default=False, help='Force-disable QED background contribution, even for same-species heavy-ion collisions where it is enabled by default')
8789

8890
parser.add_argument('-ptHatMin',help='pT hard minimum when no bin requested', default=0)
8991
parser.add_argument('-ptHatMax',help='pT hard maximum when no bin requested', default=-1)
@@ -612,9 +614,11 @@ def getDPL_global_options(bigshm=False, ccdbbackend=True, runcommand=True):
612614

613615
workflow['stages'].append(GRP_TASK)
614616

615-
# QED is enabled only for same beam species for now
617+
# QED background is enabled by default only for same-species (heavy-ion) collisions.
618+
# --with-qed forces it on; --no-qed forces it off and wins over both the default and --with-qed
619+
# (the two flags are mutually exclusive at the argparse level, so they can never both be set).
616620
QED_enabled = True if (PDGA==PDGB and PDGA!=2212) else False
617-
includeQED = (QED_enabled or (doembedding and QED_enabled)) or (args.with_qed == True)
621+
includeQED = (QED_enabled or args.with_qed) and not args.no_qed
618622
signalprefix='sgn'
619623

620624
# No vertexing for event pool generation; otherwise the vertex comes from CCDB and later from CollContext

0 commit comments

Comments
 (0)