|
SHiP Geometry
SHiP experiment geometry implementation using GeoModel.
|
Compile-time parameters of the Surround Background Tagger (SBT). More...
Namespaces | |
| namespace | detail |
Classes | |
| struct | HeliumPiece |
| The innermost free region of the SBT, and the helium that fills it. More... | |
| struct | HeliumSlabs |
| struct | SBTParams |
| Every dimension the SBT geometry is parameterised by (mm). More... | |
Functions | |
| constexpr double | subLength (const SBTParams ¶ms=kSBT) |
| Length of one sub-frustum along Z (mm). | |
| constexpr double | webHeight (const SBTParams ¶ms=kSBT) |
| Clear web height = height - 2*flange thickness (mm). | |
| constexpr int | nWalls (const SBTParams ¶ms=kSBT) |
| Number of aluminium walls per container (nCells + 1). | |
| constexpr double | zExit (const SBTParams ¶ms=kSBT) |
| Exit-face Z in the DecayVolume local frame (mm). | |
| constexpr double | xGrowth (const SBTParams ¶ms=kSBT) |
| dx_half/dz of the frustum (dimensionless). | |
| constexpr double | yGrowth (const SBTParams ¶ms=kSBT) |
| dy_half/dz of the frustum (dimensionless). | |
| constexpr double | xHalfAt (double z_mm, const SBTParams ¶ms=kSBT) |
| Half-extent of the frustum envelope in X at a given Z (mm). | |
| constexpr double | yHalfAt (double z_mm, const SBTParams ¶ms=kSBT) |
| Half-extent of the frustum envelope in Y at a given Z (mm). | |
| constexpr double | zSubLo (int s, const SBTParams ¶ms=kSBT) |
Z of the start of sub-frustum s (mm). | |
| constexpr double | hbeamFlangeOffset (const SBTParams ¶ms=kSBT) |
| Offset of a flange's mid-plane from the beam axis (mm). | |
| constexpr double | hbeamHalfHeight (const SBTParams ¶ms=kSBT) |
| Reach of a flange's outer surface from the beam axis (mm) = h/2. | |
| constexpr double | zSplitOffset (const SBTParams ¶ms=kSBT) |
| Z offset, from the start of a sub-frustum, of the column front-flange outer edge. | |
| constexpr double | sideContainerHalfThickness (const SBTParams ¶ms=kSBT) |
| Half-thickness of a side container in X (mm). | |
| constexpr double | sideContainerCentreX (double x_half_mm, const SBTParams ¶ms=kSBT) |
| |X| of a side container's centroid, given the local frustum half-width. | |
| constexpr double | sideSensorInnerX (double x_half_mm, const SBTParams ¶ms=kSBT) |
| |X| of a side container's innermost face (mm). | |
| constexpr double | topBottomContainerHalfThickness (const SBTParams ¶ms=kSBT) |
| Half-thickness of a top/bottom container in Y (mm). | |
| constexpr double | topBottomContainerCentreY (double y_half_mm, const SBTParams ¶ms=kSBT) |
| |Y| of a top/bottom container's centroid (mm). | |
| constexpr double | topBottomSensorInnerY (double y_half_mm, const SBTParams ¶ms=kSBT) |
| |Y| of a top/bottom container's innermost face (mm). | |
| constexpr double | topBottomAvailX (double x_half_mm, const SBTParams ¶ms=kSBT) |
| Half-extent in X available to top/bottom containers (mm). | |
| constexpr double | longBeamCentreY (double y_half_mm, const SBTParams ¶ms=kSBT) |
| |Y| of a top/bottom longitudinal beam's axis (mm). | |
| constexpr double | longBeamInnerY (double y_half_mm, const SBTParams ¶ms=kSBT) |
| |Y| reached by a longitudinal beam's inner flange surface (mm). | |
| constexpr bool | isWellFormed (const SBTParams ¶ms=kSBT) |
Are params self-consistent, before asking whether they leave a decay region? Every dimension positive, the helium clearance non-negative, the sensor clearance under half a container thickness and the flanges under half the beam height. | |
| constexpr double | innerFreeHalfX (double z_mm, const SBTParams ¶ms=kSBT) |
|X| of the innermost SBT material at z_mm (mm). | |
| constexpr double | innerFreeHalfY (double z_mm, const SBTParams ¶ms=kSBT) |
|Y| of the innermost SBT material at z_mm (mm). | |
| constexpr HeliumPiece | heliumPieceAt (int i, const SBTParams ¶ms=kSBT) |
Helium slab i, for 0 <= i < 2*nSubFrustum. | |
| constexpr bool | leavesDecayRegion (const SBTParams ¶ms=kSBT) |
Does params leave a decay region for the helium to fill? | |
| constexpr HeliumSlabs | heliumSlabs (const SBTParams ¶ms=kSBT) |
The helium stack for arbitrary params. | |
| void | buildHelium (GeoPhysVol *container, const GeoMaterial *helium, std::span< const HeliumPiece > pieces=kHeliumPieces) |
Place helium slabs into container. | |
Variables | |
| constexpr SBTParams | kSBT {} |
| The shipped SBT. | |
| constexpr double | kEnvelopeHalfX = 2200.0 |
| constexpr double | kEnvelopeHalfY = 3300.0 |
| constexpr double | kEnvelopeHalfZ = 25200.0 |
| constexpr std::string_view | kAirMaterial = "Air" |
| constexpr std::string_view | kSteelMaterial = "Iron" |
| constexpr std::string_view | kWallMaterial = "Aluminium" |
| constexpr std::string_view | kScintillatorMaterial = "LAB" |
| constexpr std::string_view | kHeliumMaterial = "PressurisedHe90" |
| constexpr auto | kHeliumPieces |
| The helium slabs of the shipped SBT. | |
| constexpr int | kMaxSubFrustum = 64 |
Compile-time parameters of the Surround Background Tagger (SBT).
Drives the steel H-beam supporting structure, the LAB scintillator sensor containers, and the central helium volume of the DecayVolume subsystem. All lengths are raw doubles in mm (GeoModel's native unit). The invariants of these constants are static_asserts at the bottom of this header.
| void SHiPGeometry::SBT::buildHelium | ( | GeoPhysVol * | container, |
| const GeoMaterial * | helium, | ||
| std::span< const HeliumPiece > | pieces = kHeliumPieces |
||
| ) |
Place helium slabs into container.
Call it after SBTStructureBuilder / SBTSensorBuilder — the helium is a consequence of them.
Takes the slabs, not the parameters, and that is deliberate: defaulting to the constexpr kHeliumPieces makes "the shipped geometry is byte-identical" a property of the signature rather than of the optimiser. Deriving the slabs here from an SBTParams would move the arithmetic to run time, where -ffp-contract=fast (GCC's C++ default) may contract a + (z - b) * c into an FMA; constant evaluation never contracts. It would look like a tidy-up and would shift the helium by a ULP.
Offset of a flange's mid-plane from the beam axis (mm).
Reach of a flange's outer surface from the beam axis (mm) = h/2.
|
constexpr |
Helium slab i, for 0 <= i < 2*nSubFrustum.
Each slab is inset from innerFreeHalfX/Y by params.heliumClearance and spans one envelope segment (two per sub-frustum).
This is the single definition of the helium. kHeliumPieces is this function tabulated for kSBT; leavesDecayRegion() walks it without tabulating, which is what lets it answer for an nSubFrustum no array could hold.
|
constexpr |
The helium stack for arbitrary params.
A count of 0 means the request was out of range (nSubFrustum outside 1..kMaxSubFrustum); ask leavesDecayRegion() whether a configuration is buildable at all.
|
constexpr |
|X| of the innermost SBT material at z_mm (mm).
Minimum over every volume class that can reach the decay region in X. Currently only the side scintillator containers do; the columns and corner beams sit a further half-flange-width outboard.
|
constexpr |
|Y| of the innermost SBT material at z_mm (mm).
Minimum over every volume class that can reach the decay region in Y: the top/bottom scintillator containers and the inner flange of the top/bottom longitudinal beams, which is the binding one.
Are params self-consistent, before asking whether they leave a decay region? Every dimension positive, the helium clearance non-negative, the sensor clearance under half a container thickness and the flanges under half the beam height.
leavesDecayRegion() and both builders check it.
Does params leave a decay region for the helium to fill?
False if params are not well formed (isWellFormed() in SBTConstants.h: a non-positive dimension, a negative clearance, containers or beams that come out inside out), or if the beams, containers or clearances have swallowed the frustum. The latter happens in three ways, all covered here:
Used by the static_assert below for the shipped parameters, and by test_decayvolume for the configurations that must not build.
|
constexpr |
|Y| of a top/bottom longitudinal beam's axis (mm).
|
constexpr |
|Y| reached by a longitudinal beam's inner flange surface (mm).
The beam is inclined by the frustum taper, so its cross-section is rotated: the flange surface lies hbeamHalfHeight()/cos(atan(yGrowth)) from the axis measured in world Y, not hbeamHalfHeight().
Number of aluminium walls per container (nCells + 1).
|
constexpr |
|X| of a side container's centroid, given the local frustum half-width.
|
constexpr |
Half-thickness of a side container in X (mm).
|
constexpr |
|X| of a side container's innermost face (mm).
Length of one sub-frustum along Z (mm).
|
constexpr |
Half-extent in X available to top/bottom containers (mm).
The container stops half a flange width short of the frustum wall (that is where the columns' inner face is), less a 1 mm gap so it does not land flush against them. The 1 mm is inherited from the original SBTSensorBuilder and is a literal, not sensorClearance — the two happen to be equal at the current settings, which is worth being aware of when changing sensorClearance, but they are not the same quantity and this one is deliberately left as-is.
|
constexpr |
|Y| of a top/bottom container's centroid (mm).
|
constexpr |
Half-thickness of a top/bottom container in Y (mm).
|
constexpr |
|Y| of a top/bottom container's innermost face (mm).
Clear web height = height - 2*flange thickness (mm).
dx_half/dz of the frustum (dimensionless).
|
constexpr |
Half-extent of the frustum envelope in X at a given Z (mm).
dy_half/dz of the frustum (dimensionless).
|
constexpr |
Half-extent of the frustum envelope in Y at a given Z (mm).
Exit-face Z in the DecayVolume local frame (mm).
Z offset, from the start of a sub-frustum, of the column front-flange outer edge.
Sensor containers are split here: the piece upstream of it must present a flat outer face, or it would eat into the column.
Z of the start of sub-frustum s (mm).
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
The helium slabs of the shipped SBT.
Exactly sized, and the only stack the geometry ever builds: buildHelium() defaults to it so that nothing on the production path re-derives the helium at run time (see the note on buildHelium).
|
inlineconstexpr |
|
inlineconstexpr |
The shipped SBT.
Every primitive below defaults to it, so a call site that does not care about parameterisation reads exactly as it did when these were loose constants.
inline is load-bearing, not decoration: at namespace scope constexpr implies const implies internal linkage, and without inline every translation unit would get its own kSBT — which the inline functions naming it in their default arguments would then quietly violate the ODR over ([basic.def.odr]/14, no diagnostic required).
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |