Skip to content

perf(geometry): disambiguate repeated slice volume names#1119

Open
wdconinc wants to merge 1 commit into
mainfrom
fix/insert-calorimeter-slice-naming
Open

perf(geometry): disambiguate repeated slice volume names#1119
wdconinc wants to merge 1 commit into
mainfrom
fix/insert-calorimeter-slice-naming

Conversation

@wdconinc

@wdconinc wdconinc commented May 29, 2026

Copy link
Copy Markdown
Contributor

Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.

This disambiguates repeated logical-volume slice names in the two geometry plugins that were producing distinct TGeoVolume objects all named slice1, slice2, etc. Slice names now include the layer name in BarrelCalorimeterScFi_geo.cpp and PolyhedraEndcapCalorimeter2_geo.cpp, which makes geometry graph output easier to interpret without changing geometry placement or sharing behavior.

Investigation notes:

  • InsertCalorimeter_geo.cpp already uses layer_name + slice%d, so its slice names were not the source of the ambiguous slice1 labels.
  • In InsertCalorimeter_geo.cpp, the beampipe hole radius/position is recomputed from z_distance_traversed for every layer, so those slice solids are not shareable across repeated layers.
  • The ambiguous slice1 volumes instead came from other calorimeter plugins with generic slice%d names.

What is the urgency of this PR?

  • High (please describe reason below)
  • Medium
  • Low

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Optimization (issue #__)
  • Updated constants (issue #__)
  • Updated documentation
  • other: __

Please check if any of the following apply

  • This PR introduces breaking changes. Please describe changes users need to make below.
  • This PR changes default behavior. Please describe changes below.
  • AI was used in preparing this PR. Please describe usage below.

AI usage: GitHub Copilot CLI was used to investigate the geometry naming issue, implement the naming updates, and run a full CMake build check after the change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 29, 2026 21:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Disambiguates repeated slice volume names in two calorimeter geometry plugins by prefixing the parent layer name, making the produced TGeoVolume names unique per layer and easing geometry graph inspection without altering placement or sharing semantics.

Changes:

  • Prefix slice names with l_name in PolyhedraEndcapCalorimeter2_geo.cpp.
  • Prefix slice names with l_name in BarrelCalorimeterScFi_geo.cpp.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/PolyhedraEndcapCalorimeter2_geo.cpp Slice name now includes layer name (e.g., layerN_sliceM).
src/BarrelCalorimeterScFi_geo.cpp Slice name now includes layer name (e.g., layerN_sliceM).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants