60 return {.name =
"Target",
61 .node =
"/SHiP/target",
73 [[nodiscard]] GeoPhysVol*
build();
94 GeoPhysVol* createProximityShielding();
95 GeoPhysVol* createTopShielding();
96 GeoPhysVol* createBottomShielding();
97 GeoPhysVol* createShieldingPedestal();
98 GeoPhysVol* createHeVolume();
99 const GeoShape* createSteelCoreShape();
102 static constexpr auto s_proxEnvHalfX = 80.0 *
cm;
103 static constexpr auto s_proxEnvHalfY = 56.3 *
cm;
104 static constexpr auto s_proxEnvHalfZ = 150.0 *
cm;
105 static constexpr auto s_proxInnerHalfX = 55.0 *
cm;
106 static constexpr auto s_proxInnerHalfY = 56.3 *
cm;
107 static constexpr auto s_proxInnerHalfZ = 110.0 *
cm;
108 static constexpr auto s_proxInnerOffsetZ = 15.0 *
cm;
109 static constexpr auto s_proxHoleRadius = 10.0 *
cm;
110 static constexpr auto s_proxHoleHalfZ = 27.5 *
cm;
111 static constexpr auto s_proxHoleOffsetY = 17.2 *
cm;
112 static constexpr auto s_proxHoleOffsetZ = -122.5 *
cm;
113 static constexpr auto s_proxPosY = -2.75 *
cm;
116 static constexpr auto s_topShieldHalfX = 80.0 *
cm;
117 static constexpr auto s_topShieldHalfY = 30.0 *
cm;
118 static constexpr auto s_topShieldHalfZ = 150.0 *
cm;
119 static constexpr auto s_topShieldPosY = 83.55 *
cm;
122 static constexpr auto s_bottomShieldHalfX = 80.0 *
cm;
123 static constexpr auto s_bottomShieldHalfY = 27.25 *
cm;
124 static constexpr auto s_bottomShieldHalfZ = 150.0 *
cm;
125 static constexpr auto s_bottomShieldPosY = -86.3 *
cm;
128 static constexpr auto s_pedestalHalfX = 53.5 *
cm;
129 static constexpr auto s_pedestalHalfY = 7.5 *
cm;
130 static constexpr auto s_pedestalHalfZ = 108.5 *
cm;
131 static constexpr auto s_pedestalPosY = -51.55 *
cm;
132 static constexpr auto s_pedestalPosZ = 15.0 *
cm;
139 static constexpr auto s_heRadius = 237.0 *
mm;
140 static constexpr auto s_heZMin = -37.8 *
mm;
141 static constexpr auto s_heZMax = 1509.7 *
mm;
142 static constexpr auto s_heCentreZ = 0.5 * (s_heZMin + s_heZMax);
145 static constexpr int s_numDisks = 33;
146 static constexpr auto s_diskRadius = 125.0 *
mm;
147 static constexpr auto s_lastDiskRadius = 157.0 *
mm;
148 static constexpr std::array<std::array<units::LengthMm, 2>, s_numDisks> s_diskZ = {{
149 {0.0 *
mm, 30.0 *
mm}, {34.0 *
mm, 44.0 *
mm}, {48.0 *
mm, 56.0 *
mm},
150 {60.0 *
mm, 68.0 *
mm}, {72.0 *
mm, 80.0 *
mm}, {84.0 *
mm, 92.0 *
mm},
151 {96.0 *
mm, 104.0 *
mm}, {108.0 *
mm, 116.0 *
mm}, {120.0 *
mm, 128.0 *
mm},
152 {132.0 *
mm, 140.0 *
mm}, {144.0 *
mm, 152.0 *
mm}, {156.0 *
mm, 164.0 *
mm},
153 {168.0 *
mm, 176.0 *
mm}, {180.0 *
mm, 188.0 *
mm}, {192.0 *
mm, 200.0 *
mm},
154 {204.0 *
mm, 212.0 *
mm}, {216.0 *
mm, 224.0 *
mm}, {228.0 *
mm, 237.0 *
mm},
155 {241.0 *
mm, 252.0 *
mm}, {256.0 *
mm, 268.0 *
mm}, {272.0 *
mm, 285.0 *
mm},
156 {289.0 *
mm, 302.0 *
mm}, {306.0 *
mm, 322.0 *
mm}, {326.0 *
mm, 346.0 *
mm},
157 {350.0 *
mm, 370.0 *
mm}, {375.0 *
mm, 396.0 *
mm}, {401.0 *
mm, 431.0 *
mm},
158 {435.0 *
mm, 475.0 *
mm}, {479.0 *
mm, 534.0 *
mm}, {538.0 *
mm, 611.0 *
mm},
159 {615.0 *
mm, 721.0 *
mm}, {725.0 *
mm, 1001.0 *
mm}, {1005.0 *
mm, 1460.0 *
mm},
163 static constexpr auto s_coreZMin = 7.2 *
mm;
164 static constexpr auto s_coreZMax = 1443.7 *
mm;
165 static constexpr auto s_coreBoreR1 = 125.0 *
mm;
166 static constexpr auto s_coreBoreR2 = 157.0 *
mm;
167 static constexpr auto s_coreBoreStepZ = 1005.0 *
mm;
168 static constexpr auto s_coreOuterR = 207.0 *
mm;
169 static constexpr auto s_coreFrontOuterR = 195.0 *
mm;
170 static constexpr auto s_coreFrontZMax = 55.2 *
mm;
171 static constexpr auto s_coreRearOuterR = 190.0 *
mm;
172 static constexpr auto s_coreRearZMin = 1233.7 *
mm;
177 static constexpr auto s_grooveRmin = 120.0 *
mm;
178 static constexpr auto s_grooveRmax = 153.0 *
mm;
179 static constexpr auto s_groovePhiWidth = 61.0 *
deg;
180 static constexpr std::array<std::array<units::LengthMm, 2>, 5> s_groovesTop = {{
181 {12.2 *
mm, 57.0 *
mm},
182 {95.0 *
mm, 153.0 *
mm},
183 {191.0 *
mm, 257.0 *
mm},
184 {300.0 *
mm, 464.0 *
mm},
185 {559.0 *
mm, 933.2 *
mm},
187 static constexpr std::array<std::array<units::LengthMm, 2>, 4> s_groovesBottom = {{
188 {45.0 *
mm, 104.7 *
mm},
189 {142.7 *
mm, 200.7 *
mm},
190 {238.7 *
mm, 334.7 *
mm},
191 {385.7 *
mm, 1005.0 *
mm},
195 static constexpr auto s_rearGrooveRmin = 152.0 *
mm;
196 static constexpr auto s_rearGrooveRmax = 182.0 *
mm;
197 static constexpr auto s_rearGroovePhiWidth = 49.0 *
deg;
198 static constexpr auto s_rearGrooveZMin = 1005.0 *
mm;
199 static constexpr auto s_rearGrooveZMax = 1441.7 *
mm;
206 static constexpr auto s_jacketRmin = 217.0 *
mm;
207 static constexpr auto s_jacketRmax = 225.0 *
mm;
208 static constexpr auto s_jacketZMin = s_coreFrontZMax;
209 static constexpr auto s_jacketZMax = 1198.7 *
mm;
210 static constexpr auto s_flangeFrontRmin = 195.0 *
mm;
211 static constexpr auto s_flangeFrontZMin = -23.8 *
mm;
212 static constexpr auto s_noseZMin = -35.8 *
mm;
213 static constexpr auto s_flangeRearRmax = 237.0 *
mm;
214 static constexpr auto s_flangeRearZMax = 1263.7 *
mm;
219 static constexpr auto s_windowRmax = 141.0 *
mm;
220 static constexpr auto s_windowZMin = -33.5 *
mm;
221 static constexpr auto s_windowZMax = -25.5 *
mm;
227 static constexpr auto s_coverRing1Rmin = 196.0 *
mm;
228 static constexpr auto s_coverRing2Rmin = 226.0 *
mm;
229 static constexpr auto s_coverZMax = -17.8 *
mm;
230 static constexpr auto s_coverPlateHalfX = 300.0 *
mm;
231 static constexpr auto s_coverPlateHalfY = 325.0 *
mm;
232 static constexpr auto s_coverPlateHalfZ = 10.0 *
mm;
233 static constexpr auto s_coverPlateOffsetY = -75.0 *
mm;
238 static constexpr std::array<std::array<units::LengthMm, 3>, 6> s_endcapPlanes = {{
239 {1263.7 *
mm, 229.0 *
mm, 237.0 *
mm},
240 {1413.7 *
mm, 229.0 *
mm, 237.0 *
mm},
241 {1450.0 *
mm, 212.0 *
mm, 223.0 *
mm},
242 {1480.0 *
mm, 142.0 *
mm, 166.5 *
mm},
243 {1505.0 *
mm, 0.0 *
mm, 67.0 *
mm},
244 {1509.7 *
mm, 0.0 *
mm, 67.0 *
mm},
249 static_assert(s_diskZ.front()[0] == 0.0 *
mm,
250 "the target frame origin is the front face of the first disk");
253 for (std::size_t i = 0; i < s_diskZ.size(); ++i) {
254 if (!(s_diskZ[i][0] < s_diskZ[i][1]) ||
255 (i > 0 && !(s_diskZ[i - 1][1] < s_diskZ[i][0]))) {
261 "disks must have positive thickness and He slits between them");
264 auto front = 0.0 *
mm;
265 for (std::size_t i = 0; i + 1 < s_diskZ.size(); ++i) {
266 front += s_diskZ[i][1] - s_diskZ[i][0];
268 return front == 875.0 *
mm && s_diskZ.back()[1] - s_diskZ.back()[0] == 455.0 *
mm;
270 "transcription guard: 875 mm of tungsten in disks 1-32 and a 455 mm rear block");
271 static_assert(s_heZMin <= s_noseZMin && s_noseZMin <= s_windowZMin &&
272 s_windowZMin < s_windowZMax && s_windowZMax < s_diskZ.front()[0] &&
273 s_diskZ.back()[1] < s_heZMax,
274 "beam window, disks and endcap out of order inside the He vessel");
275 static_assert(s_diskRadius <= s_lastDiskRadius && s_lastDiskRadius < s_heRadius);
276 static_assert(s_coreBoreR1 == s_diskRadius && s_coreBoreR2 == s_lastDiskRadius &&
277 s_coreBoreStepZ == s_diskZ.back()[0],
278 "the core bore must follow the disk radii and step at the rear block");
279 static_assert(s_heZMin <= s_coreZMin && s_coreZMax <= s_heZMax &&
280 s_coreFrontZMax < s_coreRearZMin,
281 "the steel core does not fit the He vessel");
282 static_assert(s_coreFrontOuterR <= s_coreOuterR && s_coreRearOuterR <= s_coreOuterR &&
283 s_coreOuterR < s_jacketRmin && s_jacketRmin < s_jacketRmax &&
284 s_jacketRmax <= s_heRadius && s_flangeRearRmax <= s_heRadius,
285 "core, He annulus, jacket and flanges must nest radially inside the vessel");
286 static_assert(s_flangeFrontRmin == s_coreFrontOuterR,
287 "the front flange bore must match the core front step");
288 static_assert(s_jacketZMax < s_flangeRearZMax &&
289 s_flangeRearZMax == s_endcapPlanes.front()[0] &&
290 s_endcapPlanes.back()[0] == s_heZMax,
291 "the endcap must run from the rear flange to the end of the He vessel");
294 for (std::size_t i = 0; i < s_endcapPlanes.size(); ++i) {
295 const auto& p = s_endcapPlanes[i];
296 if (!(p[1] < p[2]) || p[2] > s_heRadius ||
297 (i > 0 && s_endcapPlanes[i - 1][0] > p[0])) {
303 "endcap planes must be ordered in z with rmin < rmax inside the vessel");
306 const auto ok = [](
const auto& grooves) {
307 for (std::size_t i = 0; i < grooves.size(); ++i) {
308 if (!(grooves[i][0] < grooves[i][1]) || grooves[i][0] < s_coreZMin ||
309 grooves[i][1] > s_coreBoreStepZ ||
310 (i > 0 && grooves[i - 1][1] > grooves[i][0])) {
316 return ok(s_groovesTop) && ok(s_groovesBottom);
318 "cooling grooves must be ordered and lie along the disk bore of the core");
319 static_assert(s_grooveRmin < s_coreBoreR1 && s_grooveRmax < s_coreOuterR &&
320 s_rearGrooveRmin < s_coreBoreR2 && s_rearGrooveRmax < s_coreRearOuterR &&
321 s_rearGrooveZMin == s_coreBoreStepZ && s_rearGrooveZMax < s_coreZMax,
322 "cooling grooves must open into the bore and stay inside the core wall");
328 const auto cavity =
checks::box(0.0 *
mm, s_proxPosY, s_proxInnerOffsetZ,
329 s_proxInnerHalfX, s_proxInnerHalfY, s_proxInnerHalfZ);
331 s_heRadius, s_heRadius, 0.5 * (s_heZMax - s_heZMin));
334 s_coverPlateHalfX, s_coverPlateHalfY, s_coverPlateHalfZ);
337 "the He vessel or the cover plate does not fit the proximity-shielding cavity");
340 const auto d = (s_coverZMax - s_heZMin) - 2.0 * s_coverPlateHalfZ;
341 return -1e-9 *
mm < d && d < 1e-9 *
mm;
343 "the cover plate must span from the vessel front face to s_coverZMax");