Add o2-sim-geometry-doctor, a geometry against field audit - #15683
Open
sawenzel wants to merge 1 commit into
Open
Add o2-sim-geometry-doctor, a geometry against field audit#15683sawenzel wants to merge 1 commit into
sawenzel wants to merge 1 commit into
Conversation
This commit provides a new tool o2-sim-geometry-doctor that reads a placed geometry and a magnetic field and reports where the two do not fit together: logical volumes placed both inside and outside the field, mothers whose own material straddles the boundary, daughter clusters that would need a container of their own, and media asking for straight-line transport while sitting in real field. The tool was motivated from the idea to check the consistency of geometry and Geant4 media properties against the properties of the magnetic field, and to potentially optimize this assignment in a second step. It is related to these O2 JIRA tickets: https://its.cern.ch/jira/browse/O2-174 https://its.cern.ch/jira/browse/O2-175 https://its.cern.ch/jira/browse/O2-181 In the future it can be extended to provide automatic repair PRs. It: - builds an outer bound on the field support per threshold, phi sampled by arc length and every threshold crossing bisected, and checks the bound against the field before using it - concludes field-free from geometry only; sampling is used only to disprove - takes placement extents from the shapes, testing TGeoEltu before TGeoTube - verifies a field read from a file against stored reference vectors and repairs the polarity inversion re-initialisation introduces - reads the ifield and sensitivity flags from the geometry file itself, so it links no detector code and no simulation engine - ships the ALICE anchor verdicts for --verify-anchors Example: o2-sim-geometry-doctor --geometry-file o2sim_geometry.root --field-current -5 writes geometry-doctor-proposals.json (findings with suggested actions), geometry-doctor-placements.csv (one classified row per placement) and geometry-doctor-report.txt, and prints the report. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0178JHAQ2biaX5ac9ThppBXi
Collaborator
|
Error while checking build/O2/fullCI_slc9 for 4a455a8 at 2026-08-17 08:56: Full log here. |
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.
This commit provides a new tool o2-sim-geometry-doctor that reads a placed geometry and a magnetic field and reports where the two do not fit together: logical volumes placed both inside and outside the field, mothers whose own material straddles the boundary, daughter clusters that would need a container of their own, and media asking for straight-line transport while sitting in real field.
The tool was motivated from the idea to check the consistency of geometry and Geant4 media properties against the properties of the magnetic field, and to potentially optimize this assignment in a second step. It is related to these O2 JIRA tickets:
https://its.cern.ch/jira/browse/O2-174
https://its.cern.ch/jira/browse/O2-175
https://its.cern.ch/jira/browse/O2-181
In the future it can be extended to provide automatic repair PRs.
It:
Example:
o2-sim-geometry-doctor --geometry-file o2sim_geometry.root --field-current -5
writes geometry-doctor-proposals.json (findings with suggested actions), geometry-doctor-placements.csv (one classified row per placement) and geometry-doctor-report.txt, and prints the report.