Skip to content

fix: Repair the Geant4 telescope detector geometry - #5838

Open
andiwand wants to merge 1 commit into
acts-project:mainfrom
andiwand:fix-g4-telescope-geometry
Open

fix: Repair the Geant4 telescope detector geometry#5838
andiwand wants to merge 1 commit into
acts-project:mainfrom
andiwand:fix-g4-telescope-geometry

Conversation

@andiwand

@andiwand andiwand commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

The Geant4 geometry did not match the tracking geometry:

  • Of the two identically sized envelopes, the inner one was placed at the
    center of the layer stack and therefore protruded out of its mother,
    leaving Geant4 navigation undefined over most of the telescope. Both are
    replaced by a single envelope placed directly in the world.
  • The silicon planes treated bounds as full lengths, while
    buildTelescopeDetector uses them as half lengths, so the Geant4 sensors
    were half the size of the ACTS surfaces in each direction.
  • The world size assumed sorted and positive positions.

Also turns a segfault on a TelescopeDetector without positions into an
exception, and makes the Geant4 sources PRIVATE so that consumers of
ActsExamplesDetectorTelescope stop recompiling them.

--- END COMMIT MESSAGE ---

Noticed when running the Geant4 part of telescope_simulation.py.

Adds two tests:

  • Tests/UnitTests/Examples/Detectors/TelescopeDetector checks the volume tree for overlaps and asserts that every sensitive Geant4 volume sits at an ACTS surface center with matching bounds, for all three telescope axes. It fails on the old geometry.
  • test_telescope_geant4_geometry builds the Geant4 geometry from Python and maps it with SensitiveSurfaceMapper.

🤖 Generated with Claude Code

The Geant4 geometry did not match the tracking geometry:

- Of the two identically sized envelopes, the inner one was placed at the
  center of the layer stack and therefore protruded out of its mother,
  leaving Geant4 navigation undefined over most of the telescope. Both are
  replaced by a single envelope placed directly in the world.
- The silicon planes treated `bounds` as full lengths, while
  `buildTelescopeDetector` uses them as half lengths, so the Geant4 sensors
  were half the size of the ACTS surfaces in each direction.
- The world size assumed sorted and positive positions.

Also turns a segfault on a `TelescopeDetector` without positions into an
exception, and makes the Geant4 sources `PRIVATE` so that consumers of
`ActsExamplesDetectorTelescope` stop recompiling them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KUNabCsitrfbbWnxvZzgJc
@github-actions github-actions Bot added the Component - Examples Affects the Examples module label Aug 6, 2026
@andiwand
andiwand requested a review from benjaminhuth August 6, 2026 15:10
@github-actions github-actions Bot added this to the next milestone Aug 6, 2026

@benjaminhuth benjaminhuth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Labels

automerge Component - Examples Affects the Examples module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants