108 return params.hbeamHeight - 2.0 * params.hbeamFlangeThickness;
112 return params.nCells + 1;
118 return params.zEntrance + params.totalLength;
122 return (params.xHalfExit - params.xHalfEntrance) / params.totalLength;
126 return (params.yHalfExit - params.yHalfEntrance) / params.totalLength;
130 return params.xHalfEntrance + (z_mm - params.zEntrance) *
xGrowth(params);
134 return params.yHalfEntrance + (z_mm - params.zEntrance) *
yGrowth(params);
138 return params.zEntrance + s *
subLength(params);
144 return 0.5 * params.hbeamHeight - 0.5 * params.hbeamFlangeThickness;
148 return 0.5 * params.hbeamHeight;
165 return 0.5 * params.hbeamHeight + 0.5 * params.hbeamFlangeThickness;
171 return 0.5 * params.containerThickness;
185 return 0.5 * params.containerThickness - params.sensorClearance;
189 return y_half_mm - 0.5 * params.containerThickness;
205 return x_half_mm - 0.5 * params.hbeamFlangeWidth - 1.0;
215 return y_half_mm - 0.5 *
webHeight(params);
241 for (
int i = 0; i < 200 && x != prev; ++i) {
243 x = 0.5 * (x + v / x);
250 const double g =
yGrowth(params);
277 return params.totalLength > 0.0 && params.xHalfEntrance > 0.0 && params.yHalfEntrance > 0.0 &&
278 params.xHalfExit > 0.0 && params.yHalfExit > 0.0 && params.hbeamFlangeWidth > 0.0 &&
279 params.hbeamFlangeThickness > 0.0 && params.hbeamWebThickness > 0.0 &&
280 params.containerThickness > 0.0 && params.cellWallThickness > 0.0 &&
281 params.nSubFrustum > 0 && params.nCells > 0 && params.sensorClearance > 0.0 &&
282 params.sensorClearance < 0.5 * params.containerThickness &&
283 params.hbeamHeight > 2.0 * params.hbeamFlangeThickness && params.heliumClearance >= 0.0;
287 "the shipped SBT parameters are not self-consistent: check positivity, the "
288 "sensor clearance against the container thickness, and the flange thickness "
289 "against the beam height");
291 "the sensor containers' flat piece no longer fits inside a sub-frustum; "
292 "reduce nSubFrustum or hbeamHeight");
310 "SBT structure pierces the decay-volume envelope in X");
314 "SBT structure pierces the decay-volume envelope in Y");
317 0.5 *
kSBT.hbeamFlangeWidth <=
319 "SBT structure pierces the decay-volume envelope in Z");
constexpr double sqrtConst(double v)
Square root of v, usable in a constant expression.
Definition SBTConstants.h:235
constexpr double longBeamTaper(const SBTParams ¶ms=kSBT)
Taper factor of a top/bottom longitudinal beam, 1/cos(atan(yGrowth)).
Definition SBTConstants.h:249
Compile-time parameters of the Surround Background Tagger (SBT).
Definition SBTConstants.h:18
constexpr double topBottomAvailX(double x_half_mm, const SBTParams ¶ms=kSBT)
Half-extent in X available to top/bottom containers (mm).
Definition SBTConstants.h:204
constexpr std::string_view kWallMaterial
Definition SBTConstants.h:89
constexpr double zSubLo(int s, const SBTParams ¶ms=kSBT)
Z of the start of sub-frustum s (mm).
Definition SBTConstants.h:137
constexpr SBTParams kSBT
The shipped SBT.
Definition SBTConstants.h:75
constexpr double topBottomContainerHalfThickness(const SBTParams ¶ms=kSBT)
Half-thickness of a top/bottom container in Y (mm).
Definition SBTConstants.h:184
constexpr double yGrowth(const SBTParams ¶ms=kSBT)
dy_half/dz of the frustum (dimensionless).
Definition SBTConstants.h:125
constexpr double kEnvelopeHalfY
Definition SBTConstants.h:83
constexpr std::string_view kSteelMaterial
Definition SBTConstants.h:88
constexpr double webHeight(const SBTParams ¶ms=kSBT)
Clear web height = height - 2*flange thickness (mm).
Definition SBTConstants.h:107
constexpr double hbeamFlangeOffset(const SBTParams ¶ms=kSBT)
Offset of a flange's mid-plane from the beam axis (mm).
Definition SBTConstants.h:143
constexpr std::string_view kScintillatorMaterial
Definition SBTConstants.h:90
constexpr std::string_view kHeliumMaterial
Definition SBTConstants.h:91
constexpr std::string_view kAirMaterial
Definition SBTConstants.h:87
constexpr double yHalfAt(double z_mm, const SBTParams ¶ms=kSBT)
Half-extent of the frustum envelope in Y at a given Z (mm).
Definition SBTConstants.h:133
constexpr double hbeamHalfHeight(const SBTParams ¶ms=kSBT)
Reach of a flange's outer surface from the beam axis (mm) = h/2.
Definition SBTConstants.h:147
constexpr double sideContainerCentreX(double x_half_mm, const SBTParams ¶ms=kSBT)
|X| of a side container's centroid, given the local frustum half-width.
Definition SBTConstants.h:174
constexpr double subLength(const SBTParams ¶ms=kSBT)
Length of one sub-frustum along Z (mm).
Definition SBTConstants.h:103
constexpr double kEnvelopeHalfZ
Definition SBTConstants.h:84
constexpr double topBottomContainerCentreY(double y_half_mm, const SBTParams ¶ms=kSBT)
|Y| of a top/bottom container's centroid (mm).
Definition SBTConstants.h:188
constexpr double kEnvelopeHalfX
Definition SBTConstants.h:82
constexpr double topBottomSensorInnerY(double y_half_mm, const SBTParams ¶ms=kSBT)
|Y| of a top/bottom container's innermost face (mm).
Definition SBTConstants.h:192
constexpr double xHalfAt(double z_mm, const SBTParams ¶ms=kSBT)
Half-extent of the frustum envelope in X at a given Z (mm).
Definition SBTConstants.h:129
constexpr bool isWellFormed(const SBTParams ¶ms=kSBT)
Are params self-consistent, before asking whether they leave a decay region? Every dimension positive...
Definition SBTConstants.h:276
constexpr double zExit(const SBTParams ¶ms=kSBT)
Exit-face Z in the DecayVolume local frame (mm).
Definition SBTConstants.h:117
constexpr double xGrowth(const SBTParams ¶ms=kSBT)
dx_half/dz of the frustum (dimensionless).
Definition SBTConstants.h:121
constexpr int nWalls(const SBTParams ¶ms=kSBT)
Number of aluminium walls per container (nCells + 1).
Definition SBTConstants.h:111
constexpr double sideContainerHalfThickness(const SBTParams ¶ms=kSBT)
Half-thickness of a side container in X (mm).
Definition SBTConstants.h:170
constexpr double longBeamInnerY(double y_half_mm, const SBTParams ¶ms=kSBT)
|Y| reached by a longitudinal beam's inner flange surface (mm).
Definition SBTConstants.h:261
constexpr double longBeamCentreY(double y_half_mm, const SBTParams ¶ms=kSBT)
|Y| of a top/bottom longitudinal beam's axis (mm).
Definition SBTConstants.h:214
constexpr double sideSensorInnerX(double x_half_mm, const SBTParams ¶ms=kSBT)
|X| of a side container's innermost face (mm).
Definition SBTConstants.h:178
constexpr double zSplitOffset(const SBTParams ¶ms=kSBT)
Z offset, from the start of a sub-frustum, of the column front-flange outer edge.
Definition SBTConstants.h:164
Every dimension the SBT geometry is parameterised by (mm).
Definition SBTConstants.h:33
double xHalfEntrance
Definition SBTConstants.h:35
double yHalfExit
Definition SBTConstants.h:38
double yFloor
Definition SBTConstants.h:41
double yHalfEntrance
Definition SBTConstants.h:36
double containerThickness
Definition SBTConstants.h:51
double xHalfExit
Definition SBTConstants.h:37
double totalLength
Definition SBTConstants.h:39
double hbeamFlangeThickness
Definition SBTConstants.h:47
double cellWallThickness
Definition SBTConstants.h:52
double heliumClearance
Definition SBTConstants.h:63
int nCells
Definition SBTConstants.h:53
double hbeamWebThickness
Definition SBTConstants.h:48
double sensorClearance
Definition SBTConstants.h:54
int nSubFrustum
Definition SBTConstants.h:40
double hbeamFlangeWidth
Definition SBTConstants.h:46
double hbeamHeight
Definition SBTConstants.h:45
double zEntrance
Definition SBTConstants.h:42