111 return absorberThickness;
148 n += code ==
AirGap ? 0 : 1;
179 return fibreDiameter * (1.0 + std::numbers::sqrt3);
187 constexpr double kTolerance = 1e-9;
188 const int nMid =
static_cast<int>(
units::ratio(casingXY / fibreDiameter) + kTolerance);
189 return sublayer == 1 ? nMid : nMid - 1;
201 const auto dz = 0.5 * fibreDiameter * std::numbers::sqrt3;
202 return {.across = (index - 0.5 * (n - 1)) * fibreDiameter, .z = (sublayer - 1) * dz};
216static_assert(
kEcalLayers.size() == 89,
"transcription guard: 89 entries in the ECAL sequence");
220 "plate size must be a whole number of wide PVT bars");
222 "plate size must be a whole number of thin PS bars");
224 "close-packed HPL fibre stack exceeds the casing thickness");
226 "middle HPL fibre row exceeds the casing");
229 "outer HPL fibre rows hold one fibre fewer than the middle row");
230static_assert(
kFibresPerHpl == 5398,
"transcription guard: 1799 + 1800 + 1799 fibres per HPL");
232 "transcription guard: 40 lead + 40 scint + 8 HPL + 1 air gap in the ECAL "
233 "(1600 mm), 100 mm gap, 5 iron + 5 scint in the HCAL (900 mm)");
236 "module array exceeds the container in X");
238 "module array exceeds the container in Y");
Compile-time parameters of the SHiP calorimeter geometry.
Definition CalorimeterConstants.h:18
constexpr auto kModulePitchY
Definition CalorimeterConstants.h:54
constexpr auto kAirGap
Air gap within the ECAL layer sequence (mm).
Definition CalorimeterConstants.h:42
constexpr units::LengthMm sectionZ(std::span< const LayerCode > codes, units::LengthMm absorberThickness)
Z extent of one calorimeter section.
Definition CalorimeterConstants.h:127
constexpr int kThinPSBarCount
Definition CalorimeterConstants.h:159
LayerCode
Layer types used in the ECAL/HCAL layer sequences.
Definition CalorimeterConstants.h:21
@ FibreHPL_X
HPL fibre layer, fibres along X.
Definition CalorimeterConstants.h:27
@ ThinPS_H
Thin PS bar layer, bars along X (H orientation).
Definition CalorimeterConstants.h:24
@ WidePVT_V
Wide PVT bar layer, bars along Y (V orientation).
Definition CalorimeterConstants.h:23
@ WidePVT_H
Wide PVT bar layer, bars along X (H orientation).
Definition CalorimeterConstants.h:22
@ Absorber
Absorber plate (Lead in ECAL, Iron in HCAL).
Definition CalorimeterConstants.h:28
@ FibreHPL_Y
HPL fibre layer, fibres along Y.
Definition CalorimeterConstants.h:26
@ ThinPS_V
Thin PS bar layer, bars along Y (V orientation).
Definition CalorimeterConstants.h:25
@ AirGap
Air gap (no volume, just advances z cursor).
Definition CalorimeterConstants.h:29
constexpr auto kFiberCoreDiameter
Definition CalorimeterConstants.h:38
constexpr auto kFiberDiameter
Definition CalorimeterConstants.h:37
constexpr auto kHplThickness
Definition CalorimeterConstants.h:36
constexpr auto kContainerHalfZ
Definition CalorimeterConstants.h:101
constexpr int kFibresPerHpl
Fibres in one HPL layer, summed over its sublayers.
Definition CalorimeterConstants.h:206
constexpr auto kModulePitchX
Definition CalorimeterConstants.h:53
constexpr int kModuleNX
Definition CalorimeterConstants.h:51
constexpr auto kContainerHalfY
Definition CalorimeterConstants.h:100
constexpr auto kWidePVTBarPitch
Definition CalorimeterConstants.h:47
constexpr int fibresPerSublayer(int sublayer, units::LengthMm casingXY=kPlateXY, units::LengthMm fibreDiameter=kFiberDiameter)
Fibres in sublayer sublayer (0 … kHplSublayers - 1).
Definition CalorimeterConstants.h:183
constexpr auto kTotalStackZ
Total Z extent of one ECAL+gap+HCAL stack.
Definition CalorimeterConstants.h:137
constexpr units::LengthMm layerThickness(LayerCode code, units::LengthMm absorberThickness)
Z advance of one layer of the given type.
Definition CalorimeterConstants.h:107
constexpr auto kContainerHalfX
Definition CalorimeterConstants.h:99
constexpr auto kPlateXY
Definition CalorimeterConstants.h:33
constexpr int kHplSublayers
Number of fibre sublayers (rows) in one HPL layer.
Definition CalorimeterConstants.h:175
constexpr auto kThinPSBarPitch
Definition CalorimeterConstants.h:48
constexpr int sectionVolumeCount(std::span< const LayerCode > codes)
Child volumes one section contributes to the container, per module.
Definition CalorimeterConstants.h:144
constexpr auto kIronThickness
Definition CalorimeterConstants.h:39
constexpr int kModuleNY
Definition CalorimeterConstants.h:52
constexpr FibreCentre fibreCentre(int sublayer, int index, units::LengthMm casingXY=kPlateXY, units::LengthMm fibreDiameter=kFiberDiameter)
Centre of fibre index in sublayer sublayer, in the casing frame.
Definition CalorimeterConstants.h:198
constexpr auto kScintThickness
Definition CalorimeterConstants.h:35
constexpr auto kEcalLayers
ECAL layer sequence.
Definition CalorimeterConstants.h:64
constexpr auto kHcalLayers
HCAL layer sequence (Absorber means iron here rather than lead).
Definition CalorimeterConstants.h:88
constexpr int kWidePVTBarCount
Bars per layer, from the plate size and the bar pitch.
Definition CalorimeterConstants.h:158
constexpr auto kGapEcalHcal
Gap between the ECAL and HCAL stacks (mm).
Definition CalorimeterConstants.h:44
constexpr units::LengthMm hplMinCasingZ(units::LengthMm fibreDiameter=kFiberDiameter)
Smallest casing thickness that holds the close-packed stack: 2r(1 + √3).
Definition CalorimeterConstants.h:178
constexpr int kVolsPerModule
Child volumes one module contributes to the container.
Definition CalorimeterConstants.h:154
constexpr auto kLeadThickness
Definition CalorimeterConstants.h:34
mp_units::quantity< mm > LengthMm
Spellings for struct members and function parameters.
Definition Units.h:39
constexpr double ratio(mp_units::quantity< one > q)
Dimensionless quantity -> plain double (counts, growth slopes, and inputs to GeoGenfun / Eigen,...
Definition Units.h:82
constexpr auto mm
Definition Units.h:27
Definition CalorimeterConstants.h:192
units::LengthMm z
through the casing, relative to its midplane
Definition CalorimeterConstants.h:194
units::LengthMm across
across the fibres, in the casing plane (X or Y)
Definition CalorimeterConstants.h:193