From 3212119967cdadc2662cd1d4b17c71885f92768d Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Wed, 7 Oct 2026 18:05:34 +0200 Subject: [PATCH 1/2] fix(trackers): size the station envelope from the integration CAD model The station box was the FairShip GDML statbox (6.0 x 6.86 m). In the integration CAD model ST1967028_01 (layout 2026-0.1, EDMS 3287817 v1.1) each station envelope is 5.214 m wide, 1 m long, stands on the ECN3 floor 3.36 m below the beam and reaches 3.601 m above it. Use that envelope: the station box is 2607 x 3480.5 x 500 mm half-sizes, centred 120.5 mm above the beam axis, and the views inside are shifted back by the same amount so the straws stay centred on the beam. The trackers container becomes symmetric at 3601 mm half-height. Assisted-by: claude-code:claude-fable-5-1 --- subsystems/Trackers/README.md | 4 ++-- .../Trackers/include/Trackers/TrackersFactory.h | 16 ++++++++++++---- subsystems/Trackers/src/TrackersFactory.cpp | 13 ++++++++----- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/subsystems/Trackers/README.md b/subsystems/Trackers/README.md index 064f93d9..ce5d837b 100644 --- a/subsystems/Trackers/README.md +++ b/subsystems/Trackers/README.md @@ -19,8 +19,8 @@ The spectrometer dipole between stations 2 and 3 is a separate subsystem ## Geometry tree ``` -/SHiP/trackers (Air, 3000 × 3430 × 6000 mm half-extents) - ├─ /SHiP/trackers/station_ (Air, 3000 × 3430 × 500 mm) n = 1..4 +/SHiP/trackers (Air, 2607 × 3601 × 6000 mm half-extents) + ├─ /SHiP/trackers/station_ (Air, 2607 × 3480.5 × 500 mm, centred 120.5 mm above the beam) n = 1..4 │ └─ /SHiP/trackers/station_/view_/envelope (Air) v = 0..3 │ (rotated about Z by the view stereo angle) │ ├─ .../frame_body (Aluminium, hollow rectangle = outer − aperture) diff --git a/subsystems/Trackers/include/Trackers/TrackersFactory.h b/subsystems/Trackers/include/Trackers/TrackersFactory.h index efc4708c..ab2b4f38 100644 --- a/subsystems/Trackers/include/Trackers/TrackersFactory.h +++ b/subsystems/Trackers/include/Trackers/TrackersFactory.h @@ -92,10 +92,18 @@ class TrackersFactory { /// Frame material name in the central SHiPMaterials catalogue. std::string m_frameMaterialName = "Aluminium"; - // ── Station envelope from GDML statbox ────────────────────────────── - static constexpr double s_halfX = 3000.0 * mm; // 300 cm - static constexpr double s_halfY = 3430.0 * mm; // 343 cm (GDML y = 686 cm) - static constexpr double s_halfZ = 500.0 * mm; // 50 cm + // ── Station envelope from the integration CAD model ST1967028_01 ──── + // Each station is 5.214 m wide and 1 m long; it stands on the ECN3 + // floor (3.36 m below the beam) and reaches 3.601 m above it, so the + // box is centred s_stationYOffset above the beam axis. The views inside + // are shifted back by the same amount to stay centred on the beam. + static constexpr double s_halfX = 2607.0 * mm; + static constexpr double s_halfY = 3480.5 * mm; + static constexpr double s_halfZ = 500.0 * mm; + static constexpr double s_stationYOffset = 120.5 * mm; + + // Container: symmetric about the beam axis, tall enough for the offset stations. + static constexpr double s_containerHalfY = s_halfY + s_stationYOffset; // Station Z positions (centres, from origin). static constexpr double s_station1Z = 84070.0 * mm; // 84.07 m diff --git a/subsystems/Trackers/src/TrackersFactory.cpp b/subsystems/Trackers/src/TrackersFactory.cpp index 483352db..2b3f3457 100644 --- a/subsystems/Trackers/src/TrackersFactory.cpp +++ b/subsystems/Trackers/src/TrackersFactory.cpp @@ -72,7 +72,7 @@ GeoPhysVol* TrackersFactory::build() { const GeoMaterial* air = m_materials.requireMaterial("Air"); // Container volume spanning all 4 stations. - auto* containerBox = new GeoBox(s_halfX, s_halfY, s_containerHalfZ); + auto* containerBox = new GeoBox(s_halfX, s_containerHalfY, s_containerHalfZ); auto* containerLog = new GeoLogVol("/SHiP/trackers", containerBox, air); auto* containerPhys = new GeoPhysVol(containerLog); @@ -84,7 +84,8 @@ GeoPhysVol* TrackersFactory::build() { // Place the station relative to the container centre. const double relativeZ = stationZ[i] - s_containerCentreZ; - const GeoTrf::Transform3D stationTrf = GeoTrf::Translate3D(0.0, 0.0, relativeZ); + const GeoTrf::Transform3D stationTrf = + GeoTrf::Translate3D(0.0, s_stationYOffset, relativeZ); // Name kept as "/SHiP/trackers/station_" for downstream lookups. const std::string stationName = "/SHiP/trackers/station_" + std::to_string(i + 1); @@ -113,8 +114,8 @@ GeoPhysVol* TrackersFactory::build() { GeoPhysVol* TrackersFactory::buildStation(int stationIndex) { const GeoMaterial* air = m_materials.requireMaterial("Air"); - // Station envelope: fixed GDML statbox size. Kept exactly so the geometry - // consistency test (station box <= 3000 x 3500 x 500 mm) still passes. + // Station envelope from the integration CAD model (see the header); the + // geometry consistency test requires it to stay within 3000 x 3500 x 500 mm. const std::string stationName = "/SHiP/trackers/station_" + std::to_string(stationIndex + 1); auto* stationBox = new GeoBox(s_halfX, s_halfY, s_halfZ); auto* stationLog = new GeoLogVol(stationName, stationBox, air); @@ -130,8 +131,10 @@ GeoPhysVol* TrackersFactory::buildStation(int stationIndex) { const double zView = -0.5 * (s_nViews - 1) * viewPitch + v * viewPitch; const double angleRad = stereoSignedDeg(v) * deg; + // The station box is centred above the beam; undo that offset so the + // views (and their straws) stay centred on the beam axis. const GeoTrf::Transform3D viewTrf = - GeoTrf::Translate3D(0.0, 0.0, zView) * GeoTrf::RotateZ3D(angleRad); + GeoTrf::Translate3D(0.0, -s_stationYOffset, zView) * GeoTrf::RotateZ3D(angleRad); const std::string viewName = stationName + "/view_" + std::to_string(v); stationPhys->add(new GeoNameTag(viewName)); From c7779cfcdf1fae5c8192b469ee21575aef74880e Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Sat, 17 Oct 2026 13:36:14 +0200 Subject: [PATCH 2/2] docs(trackers): take the station envelope in the class summary from the CAD model Assisted-by: Claude Code:claude-opus-5-5 --- subsystems/Trackers/include/Trackers/TrackersFactory.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subsystems/Trackers/include/Trackers/TrackersFactory.h b/subsystems/Trackers/include/Trackers/TrackersFactory.h index ab2b4f38..ae423951 100644 --- a/subsystems/Trackers/include/Trackers/TrackersFactory.h +++ b/subsystems/Trackers/include/Trackers/TrackersFactory.h @@ -18,12 +18,13 @@ class SHiPMaterials; * @brief Factory for the Trackers (straw tube tracking stations) geometry. * * Builds 4 straw tracking stations for the SHiP spectrometer. Station - * envelopes and z-positions follow the GDML reference / subsystem_envelopes.csv: + * z-positions follow the GDML reference / subsystem_envelopes.csv: * - Station 1: Z 83.57-84.57 m → centre 84.07 m * - Station 2: Z 85.57-86.57 m → centre 86.07 m * - Station 3: Z 92.57-93.57 m → centre 93.07 m * - Station 4: Z 94.57-95.57 m → centre 95.07 m - * Station envelope (GDML statbox): half 3000 × 3430 × 500 mm. + * Station envelope (integration CAD model ST1967028_01, layout 2026-0.1): + * half 2607 × 3480.5 × 500 mm, centred 120.5 mm above the beam axis. * * Each station envelope is filled with 4 stereo views. A view is a material * frame (FairShip-style hollow rectangle) enclosing a staggered double