108 return params.totalLength / params.nSubFrustum;
112 return params.hbeamHeight - 2.0 * params.hbeamFlangeThickness;
116 return params.nCells + 1;
122 return params.zEntrance + params.totalLength;
126 return units::ratio((params.xHalfExit - params.xHalfEntrance) / params.totalLength);
130 return units::ratio((params.yHalfExit - params.yHalfEntrance) / params.totalLength);
134 return params.xHalfEntrance + (z - params.zEntrance) *
xGrowth(params);
138 return params.yHalfEntrance + (z - params.zEntrance) *
yGrowth(params);
142 return params.zEntrance + s *
subLength(params);
148 return 0.5 * params.hbeamHeight - 0.5 * params.hbeamFlangeThickness;
152 return 0.5 * params.hbeamHeight;
169 return 0.5 * params.hbeamHeight + 0.5 * params.hbeamFlangeThickness;
175 return 0.5 * params.containerThickness;
189 return 0.5 * params.containerThickness - params.sensorClearance;
193 return yHalf - 0.5 * params.containerThickness;
209 return xHalf - 0.5 * params.hbeamFlangeWidth - 1.0 *
mm;
245 for (
int i = 0; i < 200 && x != prev; ++i) {
247 x = 0.5 * (x + (v / x));
254 const double g =
yGrowth(params);
280 return params.totalLength > 0.0 *
mm && params.xHalfEntrance > 0.0 *
mm &&
281 params.yHalfEntrance > 0.0 *
mm && params.xHalfExit > 0.0 *
mm &&
282 params.yHalfExit > 0.0 *
mm && params.hbeamFlangeWidth > 0.0 *
mm &&
283 params.hbeamFlangeThickness > 0.0 *
mm && params.hbeamWebThickness > 0.0 *
mm &&
284 params.containerThickness > 0.0 *
mm && params.cellWallThickness > 0.0 *
mm &&
285 params.nSubFrustum > 0 && params.nCells > 0 && params.sensorClearance > 0.0 *
mm &&
286 params.sensorClearance < 0.5 * params.containerThickness &&
287 params.hbeamHeight > 2.0 * params.hbeamFlangeThickness &&
288 params.heliumClearance >= 0.0 *
mm;
292 "the shipped SBT parameters are not self-consistent: check positivity, the "
293 "sensor clearance against the container thickness, and the flange thickness "
294 "against the beam height");
296 "the sensor containers' flat piece no longer fits inside a sub-frustum; "
297 "reduce nSubFrustum or hbeamHeight");
300 "the cell walls do not fit both pieces of a split sensor container");
318 "SBT structure pierces the decay-volume envelope in X");
322 "SBT structure pierces the decay-volume envelope in Y");
327 "SBT structure pierces the decay-volume envelope in Z");
Definition SBTConstants.h:222
constexpr double sqrtConst(double v)
Square root of v, usable in a constant expression.
Definition SBTConstants.h:239
constexpr double longBeamTaper(const SBTParams ¶ms=kSBT)
Taper factor of a top/bottom longitudinal beam, 1/cos(atan(yGrowth)).
Definition SBTConstants.h:253
Compile-time parameters of the Surround Background Tagger (SBT).
Definition SBTConstants.h:19
constexpr SBTParams kSBT
The shipped SBT.
Definition SBTConstants.h:79
constexpr LengthMm subLength(const SBTParams ¶ms=kSBT)
Length of one sub-frustum along Z.
Definition SBTConstants.h:107
constexpr auto kEnvelopeHalfZ
Definition SBTConstants.h:88
constexpr LengthMm yHalfAt(LengthMm z, const SBTParams ¶ms=kSBT)
Half-extent of the frustum envelope in Y at a given Z.
Definition SBTConstants.h:137
constexpr LengthMm webHeight(const SBTParams ¶ms=kSBT)
Clear web height = height - 2*flange thickness.
Definition SBTConstants.h:111
constexpr std::string_view kSteelMaterial
Definition SBTConstants.h:92
constexpr LengthMm zSubLo(int s, const SBTParams ¶ms=kSBT)
Z of the start of sub-frustum s.
Definition SBTConstants.h:141
constexpr LengthMm sideContainerCentreX(LengthMm xHalf, const SBTParams ¶ms=kSBT)
|X| of a side container's centroid, given the local frustum half-width.
Definition SBTConstants.h:178
constexpr std::string_view kWallMaterial
Definition SBTConstants.h:93
constexpr double xGrowth(const SBTParams ¶ms=kSBT)
dx_half/dz of the frustum (dimensionless).
Definition SBTConstants.h:125
constexpr bool isWellFormed(const SBTParams ¶ms=kSBT)
Are params self-consistent, before asking whether they leave a decay region?
Definition SBTConstants.h:279
constexpr LengthMm hbeamHalfHeight(const SBTParams ¶ms=kSBT)
Reach of a flange's outer surface from the beam axis = h/2.
Definition SBTConstants.h:151
constexpr std::string_view kAirMaterial
Definition SBTConstants.h:91
constexpr auto kEnvelopeHalfX
Definition SBTConstants.h:86
constexpr LengthMm longBeamCentreY(LengthMm yHalf, const SBTParams ¶ms=kSBT)
|Y| of a top/bottom longitudinal beam's axis.
Definition SBTConstants.h:218
constexpr LengthMm zExit(const SBTParams ¶ms=kSBT)
Exit-face Z in the DecayVolume local frame.
Definition SBTConstants.h:121
constexpr std::string_view kHeliumMaterial
Definition SBTConstants.h:95
constexpr double yGrowth(const SBTParams ¶ms=kSBT)
dy_half/dz of the frustum (dimensionless).
Definition SBTConstants.h:129
constexpr auto kEnvelopeHalfY
Definition SBTConstants.h:87
constexpr LengthMm hbeamFlangeOffset(const SBTParams ¶ms=kSBT)
Offset of a flange's mid-plane from the beam axis.
Definition SBTConstants.h:147
constexpr LengthMm xHalfAt(LengthMm z, const SBTParams ¶ms=kSBT)
Half-extent of the frustum envelope in X at a given Z.
Definition SBTConstants.h:133
constexpr LengthMm zSplitOffset(const SBTParams ¶ms=kSBT)
Z offset, from the start of a sub-frustum, of the column front-flange outer edge.
Definition SBTConstants.h:168
constexpr auto mm
Definition Units.h:27
constexpr LengthMm sideContainerHalfThickness(const SBTParams ¶ms=kSBT)
Half-thickness of a side container in X.
Definition SBTConstants.h:174
constexpr LengthMm longBeamInnerY(LengthMm yHalf, const SBTParams ¶ms=kSBT)
|Y| reached by a longitudinal beam's inner flange surface.
Definition SBTConstants.h:265
constexpr LengthMm topBottomAvailX(LengthMm xHalf, const SBTParams ¶ms=kSBT)
Half-extent in X available to top/bottom containers.
Definition SBTConstants.h:208
constexpr LengthMm topBottomContainerHalfThickness(const SBTParams ¶ms=kSBT)
Half-thickness of a top/bottom container in Y.
Definition SBTConstants.h:188
constexpr int nWalls(const SBTParams ¶ms=kSBT)
Number of aluminium walls per container (nCells + 1).
Definition SBTConstants.h:115
constexpr LengthMm topBottomSensorInnerY(LengthMm yHalf, const SBTParams ¶ms=kSBT)
|Y| of a top/bottom container's innermost face.
Definition SBTConstants.h:196
constexpr LengthMm sideSensorInnerX(LengthMm xHalf, const SBTParams ¶ms=kSBT)
|X| of a side container's innermost face.
Definition SBTConstants.h:182
constexpr LengthMm topBottomContainerCentreY(LengthMm yHalf, const SBTParams ¶ms=kSBT)
|Y| of a top/bottom container's centroid.
Definition SBTConstants.h:192
constexpr std::string_view kScintillatorMaterial
Definition SBTConstants.h:94
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
constexpr auto mm
Definition Units.h:27
Every dimension the SBT geometry is parameterised by.
Definition SBTConstants.h:37
LengthMm yHalfEntrance
Definition SBTConstants.h:40
int nCells
Definition SBTConstants.h:57
LengthMm xHalfEntrance
Definition SBTConstants.h:39
LengthMm totalLength
Definition SBTConstants.h:43
LengthMm hbeamWebThickness
Definition SBTConstants.h:52
LengthMm hbeamFlangeThickness
Definition SBTConstants.h:51
LengthMm cellWallThickness
Definition SBTConstants.h:56
int nSubFrustum
Definition SBTConstants.h:44
LengthMm sensorClearance
Definition SBTConstants.h:58
LengthMm yHalfExit
Definition SBTConstants.h:42
LengthMm xHalfExit
Definition SBTConstants.h:41
LengthMm zEntrance
Definition SBTConstants.h:46
LengthMm hbeamHeight
Definition SBTConstants.h:49
LengthMm hbeamFlangeWidth
Definition SBTConstants.h:50
LengthMm containerThickness
Definition SBTConstants.h:55
LengthMm heliumClearance
Definition SBTConstants.h:67
LengthMm yFloor
Definition SBTConstants.h:45