style: make every dimensional literal carry an explicit unit - #65
Conversation
Annotate bare mm doubles in the Magnet, MuonShield, TimingDetector, Trackers and Calorimeter factories (and the top-level placements) with GeoModelKernelUnits, following the convention already used by the Cavern and Target factories. Values are unchanged (mm == 1.0, m == 1000.0 exactly), so the geometry is bitwise identical; config values with an _mm suffix keep their explicit conversion at the GeoModel boundary. Document the convention in the README.
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR documents an explicit GeoModel unit convention and applies unit multipliers to SHiP placements and geometry dimensions across the calorimeter, magnet, muon shield, timing detector, and tracker subsystems. ChangesGeoModel unit annotations
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@subsystems/Magnet/include/Magnet/MagnetFactory.h`:
- Around line 42-71: Correct the comment above the container dimensions: do not
describe the container as the same size as the yoke outer volume. State that the
container is sized to enclose the yoke, coils, and connectors, reflecting that
s_containerHalfX and s_containerHalfZ exceed the corresponding yoke dimensions
while s_containerHalfY matches.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4017ad86-4032-4201-8c6a-e4b5056b0f2c
📒 Files selected for processing (9)
README.mdsrc/SHiPGeometry.cppsubsystems/Calorimeter/include/Calorimeter/CalorimeterFactory.hsubsystems/Magnet/include/Magnet/MagnetFactory.hsubsystems/MuonShield/include/MuonShield/MuonShieldFactory.hsubsystems/MuonShield/src/MuonShieldFactory.cppsubsystems/TimingDetector/include/TimingDetector/TimingDetectorFactory.hsubsystems/Trackers/include/Trackers/TrackersFactory.hsubsystems/Trackers/src/TrackersFactory.cpp
The container is not the same size as the yoke outer volume; it is sized to enclose the yoke, coils, and connectors. HalfX and HalfZ exceed the yoke outer dimensions, while HalfY matches.
Annotates the remaining bare-mm dimensional literals (Magnet, MuonShield, TimingDetector, Trackers, Calorimeter container, top-level placements) with explicit GeoModelKernelUnits units and documents the convention in the README. No numeric value changes — the exported GDML is byte-identical (verified modulo pointer-address name suffixes).
Summary by CodeRabbit
Documentation
Refactor