perf(tracking): unique volume names in SupportServiceMaterial#1118
Open
wdconinc wants to merge 2 commits into
Open
perf(tracking): unique volume names in SupportServiceMaterial#1118wdconinc wants to merge 2 commits into
wdconinc wants to merge 2 commits into
Conversation
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>
for more information, see https://pre-commit.ci
Contributor
There was a problem hiding this comment.
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 createdVolumename 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"); | ||
| } |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?
What kind of change does this PR introduce?
Please check if any of the following apply
GitHub Copilot was used to identify the pattern and draft the refactoring.