From fe4dd00327378fafb2cd856de1b8d029ffcf117e Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Fri, 3 Jul 2026 19:23:06 +0200 Subject: [PATCH] fix: clear helium frustum from the SBT side sensors in X MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The helium decay frustum was inset from the container by the same container_thickness + helium_clearance (235 mm) in both X and Y. But the ±X (side) sensor containers are additionally shifted inward by half a flange width, so their inner face sits at x_half - 0.5*hbeam_flange_width - container_thickness. With the old inset the helium reached 120 mm past that face, interpenetrating the side sensors along the full length of the decay volume. Split the inset into insetY (unchanged: thickness + clearance) and insetX (adds 0.5*hbeam_flange_width). The helium X face now sits exactly helium_clearance (10 mm) inside the sensor inner face; the ±Y faces have no flange shift and are unchanged. --- subsystems/DecayVolume/sbt.toml | 6 ++++-- .../DecayVolume/src/DecayVolumeFactory.cpp | 19 ++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/subsystems/DecayVolume/sbt.toml b/subsystems/DecayVolume/sbt.toml index 8e0ff6a..9e3fa6b 100644 --- a/subsystems/DecayVolume/sbt.toml +++ b/subsystems/DecayVolume/sbt.toml @@ -45,8 +45,10 @@ sensor_clearance_mm = 1.0 # ── Helium decay region ───────────────────────────────────────────────── # The central helium volume is a frustum sized strictly inside the innermost -# sensor faces (x_half - container_thickness, y_half - container_thickness) -# minus this clearance, so it cannot overlap the structure or sensors. +# sensor faces minus this clearance, so it cannot overlap the structure or +# sensors. In Y the inset is y_half - container_thickness; in X the side +# sensors are shifted inward by half a flange width, so the inset is +# x_half - 0.5*hbeam_flange_width - container_thickness. helium_clearance_mm = 10.0 # ── Materials (resolved from the central SHiPMaterials catalogue) ──────── diff --git a/subsystems/DecayVolume/src/DecayVolumeFactory.cpp b/subsystems/DecayVolume/src/DecayVolumeFactory.cpp index 20dc927..c562306 100644 --- a/subsystems/DecayVolume/src/DecayVolumeFactory.cpp +++ b/subsystems/DecayVolume/src/DecayVolumeFactory.cpp @@ -115,14 +115,19 @@ GeoPhysVol* DecayVolumeFactory::build() { auto* container = new GeoPhysVol(containerLog); // ── Central helium decay region ────────────────────────────────────── - // A frustum sized inside the innermost sensor faces (x_half - thickness, - // y_half - thickness) minus the helium clearance, centred on the SBT. - const double inset = cfg.container_thickness_mm + cfg.helium_clearance_mm; + // A frustum sized strictly inside the innermost sensor faces, minus the + // helium clearance. The ±X (side) sensor containers are additionally + // shifted inward by half a flange width, so their inner face sits at + // x_half - 0.5*flange_width - container_thickness; the ±X inset must + // include that half-flange term to clear them. The ±Y (top/bottom) faces + // have no flange shift, so their inset is just thickness + clearance. + const double insetY = cfg.container_thickness_mm + cfg.helium_clearance_mm; + const double insetX = insetY + 0.5 * cfg.hbeam_flange_width_mm; const double dz = 0.5 * cfg.total_length_mm * mm; - const double dx1 = (cfg.x_half_entrance_mm - inset) * mm; - const double dy1 = (cfg.y_half_entrance_mm - inset) * mm; - const double dx2 = (cfg.x_half_exit_mm - inset) * mm; - const double dy2 = (cfg.y_half_exit_mm - inset) * mm; + const double dx1 = (cfg.x_half_entrance_mm - insetX) * mm; + const double dy1 = (cfg.y_half_entrance_mm - insetY) * mm; + const double dx2 = (cfg.x_half_exit_mm - insetX) * mm; + const double dy2 = (cfg.y_half_exit_mm - insetY) * mm; auto* heShape = new GeoTrap(dz, 0.0, 0.0, dy1, dx1, dx1, 0.0, dy2, dx2, dx2, 0.0); auto* heLog = new GeoLogVol("/SHiP/decay_volume/helium", heShape, helium);