fix: encapsulate solenoid components in unified detector plugin#1127
Open
wdconinc wants to merge 3 commits into
Open
fix: encapsulate solenoid components in unified detector plugin#1127wdconinc wants to merge 3 commits into
wdconinc wants to merge 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the solenoid geometry to use a single epic_Solenoid detector plugin with an envelope tube volume and three nested <component> sections (EndcapN, Barrel, EndcapP), replacing the previous multiple-detector layout in compact/solenoid.xml.
Changes:
- Introduces an explicit solenoid envelope tube volume in
Solenoid_geo.cppand places component assemblies inside it. - Merges barrel and endcap construction logic into one plugin driven by
<component type="barrel|disk">XML elements. - Restructures
compact/solenoid.xmlinto a single<detector name="Solenoid">containing<envelope>and<component>children.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Solenoid_geo.cpp | Implements unified solenoid detector: envelope volume + component iteration for barrel/endcaps. |
| compact/solenoid.xml | Replaces 3 detectors (barrel/endcaps) with one detector containing <envelope> and <component> blocks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The SimpleDiskDetector plugin was only used for the solenoid endcaps (epic_SolenoidEndcap and epic_ref_SolenoidEndcap). Since the endcap geometry logic has been merged into the unified Solenoid plugin, this file is no longer needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The solenoid is purely passive material (magnet cryostat structure) with no sensitive detectors. It never produces hits, so PhysVolID assignments are unnecessary and have been removed to simplify the code. This addresses the PR feedback about the changed PhysVolID scheme. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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?
This PR refactors the solenoid magnet geometry to encapsulate all three components (EndcapN, Barrel, EndcapP) within a single tube volume, using a unified detector plugin. This optimizes the geometry navigation in the world volume to avoid queries for all layers, and replaces it with a single cylinder envelope.
Changes:
Solenoiddetector with component-based structureepic_Solenoid) and endcap (epic_SolenoidEndcap) detector logic into single plugincompact/solenoid.xmlwith<component>elements for EndcapN, Barrel, and EndcapPBenefits:
What is the urgency of this PR?
What kind of change does this PR introduce?
Please check if any of the following apply
All three solenoid components are now contained within a single detector instance with an envelope volume, changing the detector hierarchy.