Skip to content

perf(tracking): unique volume names in SupportServiceMaterial#1118

Open
wdconinc wants to merge 2 commits into
mainfrom
fix/support-service-volume-names
Open

perf(tracking): unique volume names in SupportServiceMaterial#1118
wdconinc wants to merge 2 commits into
mainfrom
fix/support-service-volume-names

Conversation

@wdconinc

Copy link
Copy Markdown
Contributor

Briefly, what does this PR introduce?

Prefix component volume names with the parent support volume name in SupportServiceMaterial_geo.cpp, eliminating repeated TGeoVolume names like "Support" and "Services" in the logical-volume tree. Also shares phi-symmetric TrackerSupportDRICH segments (1 LV × 6 placements) where applicable.

Identified via analysis of geometry DOT file from npdet_to_dot.

What is the urgency of this PR?

  • Low

What kind of change does this PR introduce?

  • Optimization (issue #__)

Please check if any of the following apply

  • AI was used in preparing this PR. Please describe usage below.

GitHub Copilot was used to identify the pattern and draft the refactoring.

Prefix component volume names with their parent support volume so generic names like Support and Services stay descriptive and unique in the logical-volume tree.

Also reuse duplicate phi-segmented TrackerSupportDRICH support volumes when the same support name reappears with a rotated phi window, falling back to unique names if the geometry is not shareable.

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

This PR optimizes the epic_SupportServiceMaterial geometry construction by (a) making logical volume names more unique/traceable and (b) reusing identical phi-symmetric support volumes via multiple placements, reducing duplication in the TGeo logical-volume tree.

Changes:

  • Adds support-volume caching to reuse phi-symmetric segments (single LV with multiple placements) when the geometry differs only by a phi rotation.
  • Allows build_shape() callers to override the created Volume name to avoid repeated logical-volume names.
  • Prefixes component volume names with the parent support volume name to reduce repeated component LV names in the geometry tree.

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

Comment on lines +33 to +35
std::string component_volume_name(const std::string& parent_name, const xml_comp_t& x_child) {
return parent_name + "_" + getAttrOrDefault<std::string>(x_child, _U(name), "support_vol");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants