Skip to content

Let the ZEM calorimeters be built without the far beam line - #15752

Open
sawenzel wants to merge 3 commits into
AliceO2Group:devfrom
sawenzel:zdc-beamline-standalone
Open

Let the ZEM calorimeters be built without the far beam line#15752
sawenzel wants to merge 3 commits into
AliceO2Group:devfrom
sawenzel:zdc-beamline-standalone

Conversation

@sawenzel

@sawenzel sawenzel commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

This adds two ZDCSimParam switches so a simulation can keep the ZEM geometry without paying for transport to the ZN/ZP calorimeters at +-113 m.

  • 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.
  • buildBeamLine=false skips the beam line, the magnets and ZN/ZP; buildZEM controls the ZEM calorimeters.
  • The ZN and ZP construction moves into createZNZP() and the ZEM construction into createZEM(), so createDetectors() shows what depends on the beam line.
  • The PMC and PMQ medium ids move ahead of that branch: ProcessHits compares every step against them for ZEM too, so leaving them in the ZN block gave ZEM hits with no energy loss and no light yield.
  • The ZN/ZP sensitive volume lookups are guarded so they no longer abort when the volumes are absent.
  • 20 pythia8pp events with TGeant3: 276.9 s with the full ZDC, 141.6 +- 1.1 s with --skipModules ZDC, 136.9 +- 1.9 s with buildBeamLine=false.
  • 50 events of 20 muons at 200 GeV into 4.6 < eta < 5.3 give 234 ZEM hits with 2167 photoelectrons at buildBeamLine=false, against 230 hits and 2097 with the full ZDC.

https://its.cern.ch/jira/browse/O2-7158

This adds two ZDCSimParam switches so a simulation can keep the ZEM geometry
without paying for transport to the ZN/ZP calorimeters at +-113 m.

- 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.
- buildBeamLine=false skips the beam line, the magnets and ZN/ZP; buildZEM
  controls the ZEM calorimeters.
- The ZN and ZP construction moves into createZNZP() and the ZEM construction
  into createZEM(), so createDetectors() shows what depends on the beam line.
- The PMC and PMQ medium ids move ahead of that branch: ProcessHits compares
  every step against them for ZEM too, so leaving them in the ZN block gave ZEM
  hits with no energy loss and no light yield.
- The ZN/ZP sensitive volume lookups are guarded so they no longer abort when
  the volumes are absent.
- 20 pythia8pp events with TGeant3: 276.9 s with the full ZDC, 141.6 +- 1.1 s
  with --skipModules ZDC, 136.9 +- 1.9 s with buildBeamLine=false.
- 50 events of 20 muons at 200 GeV into 4.6 < eta < 5.3 give 234 ZEM hits with
  2167 photoelectrons at buildBeamLine=false, against 230 hits and 2097 with the
  full ZDC.

https://its.cern.ch/jira/browse/O2-7158

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coppedis

coppedis commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Dear @sawenzel ,
the ZEM calorimeters have been removed to leave space for the FoCal.They won't be used anymore in simulation.
Anyway the proposed change is fine with us.

Kind regards, Chiara

@sawenzel

sawenzel commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

@coppedis : Thanks for the info. I agree, but we might still need to run Run3 simulations which needs this fix.

@alibuild

alibuild commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for cfa5bc2 at 2026-09-04 15:04:

## sw/BUILD/o2checkcode-latest/log
--
========== List of errors found ==========
++ GRERR=0
++ grep -v clang-diagnostic-error error-log.txt
++ grep ' error:'
++ GRERR=1
++ [[ 1 == 0 ]]
++ mkdir -p /sw/INSTALLROOT/4d3ac29be8b363b73088cdce75db60b86d4c4775/slc9_x86-64/o2checkcode/1.0-local551/etc/modulefiles
++ alibuild-generate-module
+ HAS_BIN=
+ HAS_LIB=
+ HAS_CMAKE=
+ HAS_ROOT=
+ '[' 0 '!=' 0 ']'
+ cat
+ printf 'if ![ is-loaded '\''BASE/1.0'\'' ] {\n module load BASE/1.0\n}'
+ echo 'BUILD_REQUIRES=CMake alibuild-recipe-tools defaults-release'
BUILD_REQUIRES=CMake alibuild-recipe-tools defaults-release
+ FULL_BUILD_REQUIRES='pytorch_cpuinfo Alice-GRID-Utils safe_int ninja alibuild-recipe-tools O2-customization defaults-release json-c MPFR double-conversion googlebenchmark ninja-fortran bz2 UUID CMake Python-modules-list FairCMakeModules date'
+ echo 'FULL_BUILD_REQUIRES=pytorch_cpuinfo Alice-GRID-Utils safe_int ninja alibuild-recipe-tools O2-customization defaults-release json-c MPFR double-conversion googlebenchmark ninja-fortran bz2 UUID CMake Python-modules-list FairCMakeModules date'
FULL_BUILD_REQUIRES=pytorch_cpuinfo Alice-GRID-Utils safe_int ninja alibuild-recipe-tools O2-customization defaults-release json-c MPFR double-conversion googlebenchmark ninja-fortran bz2 UUID CMake Python-modules-list FairCMakeModules date
++ cut -f1 -d=
++ env
++ grep -v '^DEFAULT_'
++ grep -v PKGREVISION
++ grep -v ALIBUILD_RECIPE_TOOLS
++ grep REVISION
++ sed -e s/_REVISION//
+ for x in $(env | cut -f1 -d= | grep -v "^DEFAULT_" | grep -v PKGREVISION | grep -v ALIBUILD_RECIPE_TOOLS | grep REVISION | sed -e 's/_REVISION//')
++ eval 'echo $LIBFFI_REVISION'
+++ echo 14
+ REVISION_VALUE=14
++ eval 'echo $LIBFFI_VERSION'
+++ echo v3.2.1-alice1
+ VERSION_VALUE=v3.2.1-alice1
++ eval 'echo $LIBFFI_ROOT'
+++ echo /sw/slc9_x86-64/libffi/v3.2.1-alice1-14
+ ROOT_PATH_VALUE=/sw/slc9_x86-64/libffi/v3.2.1-alice1-14
+ '[' -z 14 ']'
+ echo 'pytorch_cpuinfo Alice-GRID-Utils safe_int ninja alibuild-recipe-tools O2-customization defaults-release json-c MPFR double-conversion googlebenchmark ninja-fortran bz2 UUID CMake Python-modules-list FairCMakeModules date'
+ tr '[:lower:]' '[:upper:]'
+ tr - _
+ tr ' ' '\n'
+ grep -q '^LIBFFI$'
+ '[' '!' -d /sw/slc9_x86-64/libffi/v3.2.1-alice1-14/etc/modulefiles ']'
++ find /sw/slc9_x86-64/libffi/v3.2.1-alice1-14/etc/modulefiles -type f '!' -name '*.*' -print0
++ xargs -0 -n1 basename
+ for filename in $(find "$ROOT_PATH_VALUE/etc/modulefiles" -type f ! -name '*.*' -print0 | xargs -0 -n1 basename)
[0 more errors; see full log]

Full log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants