Commit 7c7b0ae
Add o2-sim-geometry-doctor, a geometry against field audit
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_0178JHAQ2biaX5ac9ThppBXi1 parent 353ed40 commit 7c7b0ae
3 files changed
Lines changed: 1800 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
111 | 121 | | |
112 | 122 | | |
113 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments