Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions subsystems/DecayVolume/sbt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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) ────────
Expand Down
19 changes: 12 additions & 7 deletions subsystems/DecayVolume/src/DecayVolumeFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading