Skip to content

Commit 35b4b51

Browse files
sawenzelclaude
andcommitted
Keep the ZEM geometry instead of skipping the whole ZDC module
This changes the simulation default from skipping the ZDC module to dropping only its +-113 m beam line, so the ZEM material stays in the transport geometry. - The ZDC geometry is the +-113 m beam line, its magnets, ZN, ZP and ZEM; the transport cost is the beam line, while ZEM sits at z = 7.6 m. - ZEM carries 217 kg of material between z = 745 and 862 cm, spanning eta 2.8 to 5.6, which is inside the FIT and FDD acceptance. - --skipModules no longer defaults to ZDC; create_geant_config() sets ZDCSimParam.buildBeamLine=false instead, unless --with-ZDC is given. - An explicit --skipModules ZDC still removes the module altogether. - ZDC stays out of digitisation and reconstruction as before, which the existing deactivate_detector('ZDC') already handles. - The MODULES variable removed from the two anchor scripts was never referenced; it read as if anchored MC opted out of ZDC, which the workflow default decided. - Requires ZDCSimParam.buildBeamLine in AliceO2. https://its.cern.ch/jira/browse/O2-7158 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 4fc4713 commit 35b4b51

4 files changed

Lines changed: 13 additions & 15 deletions

File tree

MC/bin/o2dpg_sim_config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ def add(cfg, flatconfig):
183183
# ----- add default settings -----
184184

185185
add(config, {"MFTBase.buildAlignment" : "true"})
186+
187+
# Keep the ZEM calorimeters, drop the +-113 m beam line that makes the ZDC
188+
# expensive to transport. --with-ZDC asks for the whole thing, and an explicit
189+
# "--skipModules ZDC" still removes the module altogether.
190+
if not getattr(args, "with_ZDC", False) and "ZDC" not in getattr(args, "skipModules", []):
191+
add(config, {"ZDCSimParam.buildBeamLine" : "false"})
186192
add(config, {"GenTPCLoopers.colsys" : args.col})
187193

188194
# ----- apply external overwrites from command line -------

MC/bin/o2dpg_sim_workflow.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
parser.add_argument('--force-n-workers', dest='force_n_workers', action='store_true', help='by default, number of workers is re-computed '
111111
'for given interaction rate; '
112112
'pass this to avoid that')
113-
parser.add_argument('--skipModules',nargs="*", help="List of modules to skip in geometry budget (and therefore processing)", default=["ZDC"])
113+
parser.add_argument('--skipModules',nargs="*", help="List of modules to skip in geometry budget (and therefore processing)", default=[])
114114
parser.add_argument('--skipReadout',nargs="*", help="List of modules to take out from readout", default=[""])
115115
parser.add_argument('--with-ZDC', action='store_true', help='Enable ZDC in workflow')
116116
parser.add_argument('-seed',help='random seed number', default=None)
@@ -273,18 +273,12 @@ def load_external_config(configfile):
273273
print(f"INFO: Written additional config key parameters to JSON {config_key_param_path}")
274274
json.dump(anchorConfig, f, indent=2)
275275

276-
# Processing skipped material budget (modules):
277-
# - If user did NOT specify --with-ZDC
278-
# - AND ZDC is not already in the list
279-
# --> append ZDC automatically
280-
if args.with_ZDC:
281-
# User wants ZDC to *not* be skipped → ensure it's removed
282-
args.skipModules = [m for m in args.skipModules if m != "ZDC"]
283-
else:
284-
# If user did not request --with-ZDC,
285-
# auto-append ZDC unless already present
286-
if "ZDC" not in args.skipModules:
287-
args.skipModules.append("ZDC")
276+
# The ZDC geometry is the +-113 m beam line, its magnets, ZN, ZP and ZEM. What it
277+
# costs in transport time is the beam line; ZEM sits at z = 7.6 m and carries
278+
# 217 kg of material inside the FIT and FDD acceptance. Without --with-ZDC we
279+
# therefore drop the beam line and keep ZEM, instead of dropping the whole module
280+
# -- see ZDCSimParam.buildBeamLine in create_geant_config(). ZDC stays out of the
281+
# readout either way, which the deactivate_detector('ZDC') below takes care of.
288282

289283
# with this we can tailor the workflow to the presence of
290284
# certain detectors

MC/run/ANCHOR/anchorMC.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ fi
344344

345345
# -- CREATE THE MC JOB DESCRIPTION ANCHORED TO RUN --
346346

347-
MODULES="--skipModules ZDC"
348347

349348
# publish MCPRODINFO for first few jobs of a production
350349
# if external script exported PUBLISH_MCPRODINFO, it will be published anyways

MC/run/ANCHOR/anchorMC_DataEmbedding.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ fi
300300

301301
# -- CREATE THE MC JOB DESCRIPTION ANCHORED TO RUN --
302302

303-
MODULES="--skipModules ZDC"
304303

305304
# publish MCPRODINFO for first few jobs of a production
306305
# if external script exported PUBLISH_MCPRODINFO, it will be published anyways

0 commit comments

Comments
 (0)