SHiP Geometry
SHiP experiment geometry implementation using GeoModel.
Loading...
Searching...
No Matches
Layout.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) CERN for the benefit of the SHiP Collaboration
3
4#pragma once
5
19#include "SHiP/geometry/Units.h"
21
22#include <array>
23#include <string_view>
24
41
42using units::LengthMm;
43
44struct Slot {
45 std::string_view path;
46 int id;
53
54 [[nodiscard]] constexpr checks::Box box() const {
55 return checks::box(x, y, z, halfX, halfY, halfZ);
56 }
57 [[nodiscard]] constexpr checks::Span zSpan() const { return box().z; }
58};
59
60namespace detail {
61inline constexpr auto mm = units::mm;
62inline constexpr auto zero = 0.0 * units::mm;
63} // namespace detail
64
67template <typename Factory>
68[[nodiscard]] constexpr Slot slotOf(LengthMm halfX, LengthMm halfY, LengthMm halfZ) {
69 constexpr SubsystemDescriptor d = Factory::descriptor();
70 return {.path = d.node,
71 .id = d.id,
72 .x = d.x_mm * units::mm,
73 .y = d.y_mm * units::mm,
74 .z = d.z_mm * units::mm,
75 .halfX = halfX,
76 .halfY = halfY,
77 .halfZ = halfZ};
78}
79
80inline constexpr Slot kTarget =
83
86
95
98
99inline constexpr Slot kDecayVolume =
101
107
108inline constexpr Slot kMagnet =
111
115
116inline constexpr Slot kCalorimeter =
118
123
129 std::string_view a;
130 std::string_view b;
132};
133
134inline constexpr std::array kKnownOverlaps{
135 // #118: the trackers container spans the whole magnet along the beam.
136 KnownOverlap{.a = kTrackers.path,
137 .b = kMagnet.path,
138 .region = checks::bounds(-3000, 3000, -3430, 3430, 87070, 92070)},
139};
140
147struct CutOut {
148 std::string_view from;
149 std::string_view cut;
151};
152
154inline constexpr std::array kCutOuts{
155 CutOut{.from = kMuonShield.path,
156 .cut = kNeutrinoDetector.path,
157 .hole =
158 [] {
159 const auto& cavity = MuonShieldFactory::k_sndCavity;
160 auto halfX = detail::zero;
161 auto halfY = detail::zero;
162 for (const auto& s : cavity) {
163 halfX = s.halfX < halfX ? halfX : s.halfX;
164 halfY = s.halfY < halfY ? halfY : s.halfY;
165 }
166 return checks::Box{.x = {.lo = -halfX, .hi = halfX},
167 .y = {.lo = -halfY, .hi = halfY},
168 .z = {.lo = cavity.front().zStart, .hi = cavity.back().zEnd}};
169 }()},
170};
171
172// ── Layout predicates ───────────────────────────────────────────────────
173
175template <std::size_t N>
176[[nodiscard]] constexpr std::size_t firstOutOfOrder(const std::array<Slot, N>& slots) {
177 return checks::firstPairFailure(slots, [](const Slot& a, const Slot& b) { return a.z <= b.z; });
178}
179
181template <std::size_t M>
182[[nodiscard]] constexpr bool isKnownOverlap(const std::array<KnownOverlap, M>& known, const Slot& a,
183 const Slot& b) {
184 for (const auto& k : known) {
185 if ((k.a == a.path && k.b == b.path) || (k.a == b.path && k.b == a.path)) {
186 return checks::overlapsWithin(a.box(), b.box(), k.region);
187 }
188 }
189 return false;
190}
191
194template <std::size_t K>
195[[nodiscard]] constexpr bool isCutOut(const std::array<CutOut, K>& cutOuts, const Slot& a,
196 const Slot& b) {
197 for (const auto& c : cutOuts) {
198 if (c.from == a.path && c.cut == b.path) {
199 return checks::contains(c.hole, b.box());
200 }
201 if (c.from == b.path && c.cut == a.path) {
202 return checks::contains(c.hole, a.box());
203 }
204 }
205 return false;
206}
207
211template <std::size_t N, std::size_t M = kKnownOverlaps.size(), std::size_t K = kCutOuts.size()>
212[[nodiscard]] constexpr std::size_t firstUnexpectedOverlap(
213 const std::array<Slot, N>& slots, const std::array<KnownOverlap, M>& known = kKnownOverlaps,
214 const std::array<CutOut, K>& cutOuts = kCutOuts) {
215 for (std::size_t i = 0; i < N; ++i) {
216 const Slot& a = slots.at(i);
217 for (std::size_t j = i + 1; j < N; ++j) {
218 const Slot& b = slots.at(j);
219 if (checks::overlaps(a.box(), b.box()) && !isKnownOverlap(known, a, b) &&
220 !isCutOut(cutOuts, a, b)) {
221 return i;
222 }
223 }
224 }
225 return checks::npos;
226}
227
229inline constexpr checks::Box kWorld = checks::box(
231
234[[nodiscard]] constexpr bool fitsEnvelopeZ(const Slot& slot, const envelopes::Envelope& env,
235 LengthMm tol = 1e-6 * detail::mm) {
236 return checks::contains(env.z(), slot.zSpan(), tol);
237}
238
241[[nodiscard]] constexpr bool fitsEnvelopeXY(const Slot& slot, const envelopes::Envelope& env,
242 LengthMm tolX = detail::zero,
243 LengthMm tolY = detail::zero) {
244 const auto xReach = (slot.x < detail::zero ? -slot.x : slot.x) + slot.halfX;
245 const auto yReach = (slot.y < detail::zero ? -slot.y : slot.y) + slot.halfY;
246 return xReach <= env.maxHalfWidth() + tolX && yReach <= env.maxHalfHeight() + tolY;
247}
248
249// ── Layout checks ───────────────────────────────────────────────────────
250
251static_assert(firstOutOfOrder(kSlots) == checks::npos,
252 "subsystem centres must not decrease along the beam");
254 "two subsystem containers overlap, and the pair is not in kKnownOverlaps or "
255 "kCutOuts, or overlaps beyond its recorded region");
256static_assert(checks::firstFailure(kSlots,
257 [](const Slot& s) {
258 return checks::contains(kWorld, s.box());
259 }) == checks::npos,
260 "a subsystem container reaches outside the world volume");
262 [](const KnownOverlap& known) {
263 for (const auto& a : kSlots) {
264 for (const auto& b : kSlots) {
265 if (a.path == known.a && b.path == known.b) {
266 return checks::overlaps(a.box(), b.box());
267 }
268 }
269 }
270 return false;
271 }) == checks::npos,
272 "a known overlap is gone (or names an unknown subsystem): "
273 "drop it from kKnownOverlaps and close its issue");
274static_assert(checks::firstFailure(kCutOuts,
275 [](const CutOut& c) {
276 for (const auto& a : kSlots) {
277 for (const auto& b : kSlots) {
278 if (a.path == c.from && b.path == c.cut) {
279 return checks::overlaps(a.box(), b.box()) &&
280 checks::contains(c.hole, b.box()) &&
281 checks::contains(a.box(), c.hole);
282 }
283 }
284 }
285 return false;
286 }) == checks::npos,
287 "a cut-out names an unknown subsystem, its container has left the cavity, or "
288 "the cavity sticks out of the container it is cut from");
289
290// ── Cavern ──────────────────────────────────────────────────────────────
291
295inline constexpr std::array kCavities = [] {
296 using C = CavernFactory;
297 const auto hall = [](LengthMm px, LengthMm py, LengthMm pz, LengthMm hx, LengthMm hy,
298 LengthMm hz) {
299 return checks::box(px, py, pz + C::s_cavernPosZ, hx, hy, hz);
300 };
301 return std::array{
302 hall(C::s_muonCavernPosX, C::s_muonCavernPosY, C::s_muonCavernPosZ, C::s_muonCavernHalfX,
303 C::s_muonCavernHalfY, C::s_muonCavernHalfZ),
304 hall(C::s_expCavernPosX, C::s_expCavernPosY, C::s_expCavernPosZ, C::s_expCavernHalfX,
305 C::s_expCavernHalfY, C::s_expCavernHalfZ),
306 hall(C::s_stairPosX, C::s_stairPosY, C::s_stairPosZ, C::s_stairHalfX, C::s_stairHalfY,
307 C::s_stairHalfZ),
308 hall(C::s_yokePitPosX, C::s_yokePitPosY, C::s_yokePitPosZ, C::s_yokePitHalfX,
309 C::s_yokePitHalfY, C::s_yokePitHalfZ),
310 hall(C::s_targetPitPosX, C::s_targetPitPosY, C::s_targetPitPosZ, C::s_targetPitHalfX,
311 C::s_targetPitHalfY, C::s_targetPitHalfZ),
312 };
313}();
314
318[[nodiscard]] constexpr bool isInCavity(const Slot& slot) {
319 return checks::coveredBy(slot.box(), kCavities);
320}
321
322static_assert(checks::firstFailure(kSlots,
323 [](const Slot& s) {
324 return isInCavity(s) || s.path == kTrackers.path ||
325 s.path == kCalorimeter.path;
326 }) == checks::npos,
327 "a subsystem container reaches into the cavern rock");
328// Known deviations (#120): the ECN3 floor is 3.364 m below the beam, and two
329// containers centred on the beam are taller than that allows outside the yoke
330// pit. The tracker container (half-height 3.43 m) reaches 66 mm into the
331// floor at stations 1 and 4; the calorimeter container (half-height 3.5 m, the
332// EDMS envelope) reaches 136 mm into it, although its modules fit.
333inline constexpr auto kTrackersIntoFloor = 66.0 * detail::mm;
334inline constexpr auto kCalorimeterIntoFloor = 136.0 * detail::mm;
335static_assert(!isInCavity(kTrackers),
336 "the tracker container now fits the experiment hall: drop its exception above");
338 "the tracker container reaches further into the rock than kTrackersIntoFloor");
339static_assert(!isInCavity(kCalorimeter),
340 "the calorimeter container now fits the experiment hall: drop its exception above");
342 kCavities),
343 "the calorimeter container reaches further into the rock than "
344 "kCalorimeterIntoFloor");
345
346// ── EDMS envelopes ──────────────────────────────────────────────────────
347
348namespace detail {
353 auto env = envelopes::hull("Muon shield region", envelopes::kMuonShield);
354 env.zStart = envelopes::kHadronStopper.zStart;
355 return env;
356}();
357
360 auto env = envelopes::kDecayVolume;
361 env.halfWidthUp = env.halfWidthUp + envelopes::kSurroundTaggerThickness;
362 env.halfWidthDown = env.halfWidthDown + envelopes::kSurroundTaggerThickness;
363 env.halfHeightUp = env.halfHeightUp + envelopes::kSurroundTaggerThickness;
364 env.halfHeightDown = env.halfHeightDown + envelopes::kSurroundTaggerThickness;
365 return env;
366}();
367
369inline constexpr auto kTrackerRegion = envelopes::hull("Trackers", envelopes::kTrackerStations);
370
372inline constexpr auto kCalorimeterRegion = envelopes::hull("Calorimeter", envelopes::kCalorimeter);
373} // namespace detail
374
375static_assert(kTarget.zSpan().hi <= envelopes::kHadronStopper.zStart,
376 "the target vacuum box reaches into the hadron stopper envelope");
377static_assert(kTarget.zSpan().hi <= MuonShieldFactory::k_hadronStopper.zStart,
378 "the target vacuum box reaches into the hadron stopper");
382 1e-6 * detail::mm),
383 "the hadron stopper is outside its EDMS envelope along z");
385 "the muon shield container is outside its EDMS region along z");
386
388 "the muon shield container is outside its EDMS envelope transversely");
390 "the SND container is outside its EDMS envelope transversely");
392 "the UBT container is outside its EDMS envelope along z");
394 "the decay volume container is outside its EDMS envelope along z");
396 "the decay volume container is outside its EDMS envelope transversely");
398 "the trackers container is outside its EDMS envelope along z");
400 "the trackers container is outside its EDMS envelope transversely");
402 "the magnet container is outside its EDMS envelope along z");
404 "the magnet container is outside its EDMS envelope transversely");
406 "the timing detector container is outside its EDMS envelope transversely");
408 "the calorimeter container is outside its EDMS envelope along z");
410 "the calorimeter container is outside its EDMS envelope transversely");
411
412// Known deviations from the EDMS envelopes (#120). Each is bounded by its
413// current size: if one is fixed, assert the positive check above instead; if
414// one gets worse, the second assert fails.
415inline constexpr auto kNeutrinoDetectorEarlyStart = 3461.0 * detail::mm; // 3460 mm
416inline constexpr auto kUpstreamTaggerExcessX = 1450.0 * detail::mm;
417inline constexpr auto kUpstreamTaggerExcessY = 1600.0 * detail::mm;
418inline constexpr auto kTimingDetectorEarlyStart = 168.0 * detail::mm;
419// The SND follows FairShip's TRY_2026 shield (in M5 and M6), while the EDMS
420// envelope still follows the WARM layout, 3.46 m further downstream.
422 "the SND container now fits the EDMS envelope: assert fitsEnvelopeZ instead");
425 "the SND container deviates from the EDMS envelope by more than "
426 "kNeutrinoDetectorEarlyStart");
428 "the UBT container now fits the EDMS envelope: assert fitsEnvelopeXY instead");
431 "the UBT container exceeds the EDMS envelope by more than "
432 "kUpstreamTaggerExcessX/Y");
434 "the timing detector now fits the EDMS envelope: assert fitsEnvelopeZ instead");
436 "the timing detector deviates from the EDMS envelope by more than "
437 "kTimingDetectorEarlyStart");
438
439// ── Trackers against their neighbours ──────────────────────────────────
440
442[[nodiscard]] constexpr checks::Span trackerStation(LengthMm centreZ) {
443 return checks::span(centreZ, TrackersFactory::s_halfZ);
444}
445
449static_assert(kTrackerStationZ.size() == envelopes::kTrackerStations.size());
450static_assert(
451 [] {
452 for (std::size_t i = 0; i < kTrackerStationZ.size(); ++i) {
455 return false;
456 }
457 }
458 return true;
459 }(),
460 "a tracker station is outside its EDMS envelope");
461static_assert(trackerStation(TrackersFactory::s_station2Z).hi <= kMagnet.zSpan().lo &&
463 "the spectrometer magnet must sit between tracker stations 2 and 3");
465 .hi = kMagnet.zSpan().lo},
468 "the tracker-magnet marker must sit in the gap between station 2 and the magnet");
469
470} // namespace SHiP::geometry::layout
Factory for the Cavern (world volume and rock) geometry.
Definition CavernFactory.h:18
static constexpr auto s_worldHalfY
Definition CavernFactory.h:41
static constexpr auto s_worldHalfZ
Definition CavernFactory.h:42
static constexpr auto s_worldHalfX
Definition CavernFactory.h:40
static constexpr auto s_containerHalfY
Definition MagnetFactory.h:56
static constexpr auto s_containerHalfZ
Definition MagnetFactory.h:57
static constexpr auto s_containerHalfX
Definition MagnetFactory.h:55
static constexpr auto s_areaHalfY
Definition MuonShieldFactory.h:126
static constexpr auto s_areaHalfZ
Definition MuonShieldFactory.h:128
static constexpr MagnetData k_hadronStopper
Row 0: the magnetised hadron stopper, [0, 115, 163.5, 169].
Definition MuonShieldFactory.h:67
static constexpr auto k_sndCavity
Cavity for the SND (veto, target, MGC, HCAL): the SND container's sections (NeutrinoDetectorFactory::...
Definition MuonShieldFactory.h:142
static constexpr auto s_areaHalfX
Definition MuonShieldFactory.h:124
static constexpr auto s_halfX
Bounding box of the sections: the HCAL's cross-section and the full 5.05 m length.
Definition NeutrinoDetectorFactory.h:128
static constexpr auto s_halfY
Definition NeutrinoDetectorFactory.h:129
static constexpr auto s_halfZ
Definition NeutrinoDetectorFactory.h:130
static constexpr auto s_vacuumBoxHalfY
Definition TargetFactory.h:82
static constexpr auto s_vacuumBoxHalfZ
Definition TargetFactory.h:83
static constexpr auto s_vacuumBoxHalfX
Definition TargetFactory.h:81
static constexpr auto s_containerHalfZ
Definition TimingDetectorFactory.h:60
static constexpr auto s_containerHalfX
Definition TimingDetectorFactory.h:58
static constexpr auto s_containerHalfY
Definition TimingDetectorFactory.h:59
static constexpr auto s_halfY
Definition TrackersFactory.h:109
static constexpr auto s_halfZ
Definition TrackersFactory.h:110
static constexpr auto s_trackerMagnetZ
centre
Definition TrackersFactory.h:104
static constexpr auto s_station1Z
Definition TrackersFactory.h:113
static constexpr auto s_trackerMagnetHalfZ
half-depth
Definition TrackersFactory.h:105
static constexpr auto s_station4Z
Definition TrackersFactory.h:116
static constexpr auto s_halfX
Definition TrackersFactory.h:108
static constexpr auto s_containerHalfZ
Definition TrackersFactory.h:119
static constexpr auto s_station3Z
Definition TrackersFactory.h:115
static constexpr auto s_station2Z
Definition TrackersFactory.h:114
static constexpr auto s_halfZ
Definition UpstreamTaggerFactory.h:86
static constexpr auto s_halfX
Definition UpstreamTaggerFactory.h:84
static constexpr auto s_halfY
Definition UpstreamTaggerFactory.h:85
constexpr auto kContainerHalfZ
Definition CalorimeterConstants.h:101
constexpr auto kContainerHalfY
Definition CalorimeterConstants.h:100
constexpr auto kContainerHalfX
Definition CalorimeterConstants.h:99
constexpr std::size_t firstPairFailure(const Range &range, Pred ok)
Index i of the first neighbouring pair (range[i], range[i+1]) for which ok is false,...
Definition StaticChecks.h:134
constexpr Box shrunk(const Box &b, LengthMm d)
b with every face moved inwards by d.
Definition StaticChecks.h:104
constexpr bool overlaps(Span a, Span b)
The intervals share more than a boundary. Touching ends do not overlap.
Definition StaticChecks.h:45
constexpr bool coveredBy(const Box &inner, const std::array< Box, N > &outers)
Whether inner lies within the union of outers.
Definition StaticChecks.h:151
constexpr std::size_t firstFailure(const Range &range, Pred ok)
Index of the first element of range for which ok is false, or npos.
Definition StaticChecks.h:120
constexpr bool contains(Span outer, Span inner, LengthMm tol=0.0 *units::mm)
inner lies within outer, allowing tol of slack at either end.
Definition StaticChecks.h:40
constexpr Box bounds(double x0, double x1, double y0, double y1, double z0, double z1)
Box from its bounds in mm, for writing a known region down literally.
Definition StaticChecks.h:80
constexpr Span span(LengthMm centre, LengthMm half)
Interval of a volume with the given centre and half-length.
Definition StaticChecks.h:35
constexpr std::size_t npos
Returned by the first*() searches when every element passes.
Definition StaticChecks.h:111
constexpr bool overlapsWithin(const Box &a, const Box &b, const Box &region, LengthMm tol=1e-6 *units::mm)
The boxes overlap, and only within region.
Definition StaticChecks.h:97
constexpr Box box(LengthMm cx, LengthMm cy, LengthMm cz, LengthMm hx, LengthMm hy, LengthMm hz)
Box with centre (cx, cy, cz) and the given half-lengths.
Definition StaticChecks.h:57
constexpr Envelope kMagnet
Definition Envelopes.h:75
constexpr std::array< Envelope, 3 > kCalorimeter
Definition Envelopes.h:79
constexpr auto kSurroundTaggerThickness
Thickness of the SBT shell around the decay volume (the CSV lists it as a half-width/height of 0....
Definition Envelopes.h:68
constexpr Envelope kUpstreamTagger
Definition Envelopes.h:62
constexpr Envelope kNeutrinoDetector
Definition Envelopes.h:60
constexpr std::array< Envelope, 4 > kTrackerStations
Definition Envelopes.h:69
constexpr Envelope hull(std::string_view name, const std::array< Envelope, N > &parts)
Union of several consecutive envelopes, from the first start to the last end, with the largest transv...
Definition Envelopes.h:89
constexpr Envelope kTimingDetector
Definition Envelopes.h:77
constexpr Envelope kDecayVolume
Definition Envelopes.h:64
constexpr std::array< Envelope, 5 > kMuonShield
Definition Envelopes.h:53
constexpr Envelope kHadronStopper
Definition Envelopes.h:51
Definition Layout.h:60
constexpr auto mm
Definition Layout.h:61
constexpr auto kTrackerRegion
Tracker stations 1 to 4, including the magnet gap between 2 and 3.
Definition Layout.h:369
constexpr auto kCalorimeterRegion
Split ECAL front and back plus the HCAL.
Definition Layout.h:372
constexpr envelopes::Envelope kDecayVolumeWithSBT
Decay volume plus the SBT shell wrapped around it.
Definition Layout.h:359
constexpr envelopes::Envelope kMuonShieldRegion
Muon shield region: the hadron stopper start to the end of the last magnet.
Definition Layout.h:352
constexpr auto zero
Definition Layout.h:62
Where each subsystem container sits in the world volume.
Definition Layout.h:40
constexpr bool isCutOut(const std::array< CutOut, K > &cutOuts, const Slot &a, const Slot &b)
One of the pair has the other's shape cut out of it (listed in cutOuts), and the other lies within th...
Definition Layout.h:195
constexpr checks::Box kWorld
The world volume built by CavernFactory, centred on the origin.
Definition Layout.h:229
constexpr checks::Span trackerStation(LengthMm centreZ)
Absolute z-span of one tracker station.
Definition Layout.h:442
constexpr Slot kUpstreamTagger
Definition Layout.h:96
constexpr auto kUpstreamTaggerExcessX
Definition Layout.h:416
constexpr std::array kCavities
The halls CavernFactory cuts out of the rock, in the world frame.
Definition Layout.h:295
constexpr std::size_t firstOutOfOrder(const std::array< Slot, N > &slots)
Centres never decrease along the slot list.
Definition Layout.h:176
constexpr Slot kDecayVolume
Definition Layout.h:99
constexpr std::array kSlots
All subsystems, in placement order (upstream to downstream).
Definition Layout.h:120
constexpr std::array kCutOuts
The SND sits in a cavity of the muon-shield container (#117).
Definition Layout.h:154
constexpr bool isKnownOverlap(const std::array< KnownOverlap, M > &known, const Slot &a, const Slot &b)
The pair is listed in known and overlaps no further than its region.
Definition Layout.h:182
constexpr auto kCalorimeterIntoFloor
Definition Layout.h:334
constexpr auto kNeutrinoDetectorEarlyStart
Definition Layout.h:415
constexpr std::size_t firstUnexpectedOverlap(const std::array< Slot, N > &slots, const std::array< KnownOverlap, M > &known=kKnownOverlaps, const std::array< CutOut, K > &cutOuts=kCutOuts)
Index of the first slot that overlaps a later one, unless the pair is a known overlap that has not gr...
Definition Layout.h:212
constexpr std::array kTrackerStationZ
Definition Layout.h:446
constexpr Slot kTarget
Definition Layout.h:80
constexpr Slot kTrackers
The factory positions its stations relative to s_containerCentreZ, so the container goes there and th...
Definition Layout.h:105
constexpr Slot kTimingDetector
Definition Layout.h:112
constexpr auto kTrackersIntoFloor
Definition Layout.h:333
constexpr Slot slotOf(LengthMm halfX, LengthMm halfY, LengthMm halfZ)
A factory's slot: its registered placement (descriptor()) together with its container half-lengths.
Definition Layout.h:68
constexpr auto kTimingDetectorEarlyStart
Definition Layout.h:418
constexpr auto kUpstreamTaggerExcessY
Definition Layout.h:417
constexpr Slot kMuonShield
Definition Layout.h:84
constexpr bool fitsEnvelopeZ(const Slot &slot, const envelopes::Envelope &env, LengthMm tol=1e-6 *detail::mm)
Container lies inside the envelope along the beam (with tol of slack, for values that are equal on pa...
Definition Layout.h:234
constexpr Slot kCalorimeter
Definition Layout.h:116
constexpr std::array kKnownOverlaps
Definition Layout.h:134
constexpr Slot kMagnet
Definition Layout.h:108
constexpr Slot kNeutrinoDetector
z 22.94-27.99 m, in the end of muon-shield magnet M5 and the whole of M6 (FairShip TRY_2026).
Definition Layout.h:92
constexpr bool isInCavity(const Slot &slot)
The container lies within the halls taken together: the muon shield runs from TCC8 across the step in...
Definition Layout.h:318
constexpr bool fitsEnvelopeXY(const Slot &slot, const envelopes::Envelope &env, LengthMm tolX=detail::zero, LengthMm tolY=detail::zero)
Container stays inside the envelope's largest transverse size (with tolX and tolY of slack).
Definition Layout.h:241
constexpr auto kEnvelopeHalfZ
Definition SBTConstants.h:88
constexpr auto kEnvelopeHalfX
Definition SBTConstants.h:86
constexpr auto kEnvelopeHalfY
Definition SBTConstants.h:87
mp_units::quantity< mm > LengthMm
Spellings for struct members and function parameters.
Definition Units.h:39
constexpr auto mm
Definition Units.h:27
A subsystem's self-description: everything the assembler needs.
Definition SubsystemDescriptor.h:20
double z_mm
placement translation Z, beam direction (mm)
Definition SubsystemDescriptor.h:26
int id
GeoIdentifierTag.
Definition SubsystemDescriptor.h:23
double x_mm
placement translation X (mm)
Definition SubsystemDescriptor.h:24
const char * node
GeoNameTag, e.g. "/SHiP/calorimeter".
Definition SubsystemDescriptor.h:22
double y_mm
placement translation Y (mm)
Definition SubsystemDescriptor.h:25
Axis-aligned box.
Definition StaticChecks.h:50
Span z
Definition StaticChecks.h:53
Closed interval along one axis.
Definition StaticChecks.h:29
LengthMm hi
Definition StaticChecks.h:31
LengthMm lo
Definition StaticChecks.h:30
Definition Envelopes.h:28
constexpr LengthMm maxHalfWidth() const
Definition Envelopes.h:38
constexpr LengthMm maxHalfHeight() const
Definition Envelopes.h:41
constexpr checks::Span z() const
Definition Envelopes.h:37
A container with a cavity of another container's shape cut out of it.
Definition Layout.h:147
std::string_view cut
Definition Layout.h:149
std::string_view from
Definition Layout.h:148
checks::Box hole
Definition Layout.h:150
Two containers that overlap, although Geant4 does not support overlapping siblings.
Definition Layout.h:128
std::string_view a
Definition Layout.h:129
std::string_view b
Definition Layout.h:130
checks::Box region
Definition Layout.h:131
Definition Layout.h:44
LengthMm x
Definition Layout.h:47
LengthMm halfZ
Definition Layout.h:52
LengthMm z
Definition Layout.h:49
constexpr checks::Box box() const
Definition Layout.h:54
LengthMm halfY
Definition Layout.h:51
LengthMm y
Definition Layout.h:48
LengthMm halfX
Definition Layout.h:50
constexpr checks::Span zSpan() const
Definition Layout.h:57
int id
Definition Layout.h:46
std::string_view path
Definition Layout.h:45