Skip to content

Fix to coordinate system#255

Merged
sophiemiddleton merged 4 commits intoMu2e:mainfrom
sophiemiddleton:fix
Apr 21, 2026
Merged

Fix to coordinate system#255
sophiemiddleton merged 4 commits intoMu2e:mainfrom
sophiemiddleton:fix

Conversation

@sophiemiddleton
Copy link
Copy Markdown
Collaborator

This pull request introduces significant improvements to the Mu2e EventDisplay geometry handling, especially for the extracted geometry mode. The main focus is on aligning the Cosmic Ray Veto (CRV) display with the tracker geometry by applying a Z-shift based on the tracker envelope's half-length. Additionally, a new utility script for exploring GDML geometry hierarchies is added, and the example FCL configuration files are updated for consistency and improved usability.

Geometry Alignment Improvements:

  • CRV display alignment: The CRV visualization in extracted geometry mode now applies a Z-shift equal to the tracker envelope half-length (parsed from tracker_v7.txt) to correctly align CRV bars, clusters, and hits with the tracker in the display. This shift is applied in both the data interface (for event data) and the geometry drawing code (for the geometry tree), ensuring visual consistency. [1] [2] [3] [4] [5] [6] [7] [8] [9]

  • Geometry drawing code refactor: The extracted geometry drawing logic in MainWindow.cc is updated to load tracker geometry, compute and apply the CRV Z-shift, and clarify the use of offsets for detector components. Comments are added to explain the logic and limitations regarding geometry initialization. [1] [2]

New Utility Script:

  • Added gdml_hierarchy.py: A new Python script is provided for parsing GDML files and printing the parent/child hierarchy of detector volumes, with search capabilities for volume names. This aids in geometry debugging and exploration.

Configuration and Example Updates:

  • Updated FCL files: The example configuration files for both extracted and nominal geometries are revised for clarity and consistency. This includes setting appropriate analyzer options, removing obsolete parameters, and ensuring the correct geometry and data products are included for display. [1] [2] [3] [4]

Codebase Maintenance:

  • Minor header and comment additions: Includes and comments are updated in MainWindow.cc to clarify dependencies and geometry handling. [1] [2] [3]

These changes collectively improve the accuracy and usability of the EventDisplay for extracted geometries, facilitate geometry debugging, and streamline configuration for end users.

Development

  • the python config gdml checker was developed by CoPilot with knowledge of the current code-base and GDML
  • All other code was developed by humans

@sophiemiddleton sophiemiddleton merged commit e4578cb into Mu2e:main Apr 21, 2026
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