SHiP Geometry
SHiP experiment geometry implementation using GeoModel.
Loading...
Searching...
No Matches
CavernFactory.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
6#include <GeoModelKernel/Units.h>
7
8class GeoPhysVol;
9
10namespace SHiPGeometry {
11
12class SHiPMaterials;
13
18 public:
19 explicit CavernFactory(SHiPMaterials& materials);
20 ~CavernFactory() = default;
21
26 [[nodiscard]] GeoPhysVol* build();
27
28 private:
29 SHiPMaterials& m_materials;
30
31 GeoPhysVol* m_world{nullptr};
32 GeoPhysVol* m_cavern{nullptr};
33
34 // World volume dimensions (half-sizes in mm)
35 static constexpr double s_worldHalfX = 200.0 * GeoModelKernelUnits::m;
36 static constexpr double s_worldHalfY = 200.0 * GeoModelKernelUnits::m;
37 static constexpr double s_worldHalfZ = 200.0 * GeoModelKernelUnits::m;
38
39 // ── Layout (global frame: origin at the target front face, mm) ──────
40 //
41 // Inner concrete surfaces of the civil-engineering solid in the CAD model
42 // ST1967028_01, which underlies the integration layout SPSXXSHIP0002
43 // version 2026-0.1 (EDMS 3287817 v1.1), sectioned across the beam:
44 // - TCC8: floor 1.703 m below the beam, walls at x = -3.587 m and
45 // +6.413 m, flat ceiling at y = 5.761 m. Upstream of z = 6.2 m the
46 // tunnel is arched instead; the arch is not modelled. The floor ends
47 // at z = 21.37 m.
48 // - Step: a floor 0.80 m lower at the TCC8 width, z = 21.37 m to 22.19 m.
49 // - ECN3: floor 3.364 m below the beam, walls at x = -4.566 m and
50 // +11.434 m (mid-hall; the walls drift by 0.35 mrad against the beam),
51 // from z = 22.19 m to the end wall at 122.18 m. The hall is modelled up
52 // to the arch springline at y = 8.636 m; the 0.5 m crane ledges above
53 // y = 5.84 m and the arch itself (crown at y = 11.586 m) are not.
54 // Neither pit is in the civil model; both are carried over from the
55 // FairShip cavern (ShipCave).
56 static constexpr double s_stepZ = 21.37 * GeoModelKernelUnits::m; // end of the TCC8 floor
57 static constexpr double s_tcc8Length =
58 170.0 * GeoModelKernelUnits::m; // tunnel modelled upstream of the step
59 static constexpr double s_stairLength =
60 0.82 * GeoModelKernelUnits::m; // intermediate floor before ECN3
61 static constexpr double s_ecn3EndZ =
62 122.18 * GeoModelKernelUnits::m; // downstream end wall of ECN3
63 static constexpr double s_tcc8FloorY = -1.703 * GeoModelKernelUnits::m;
64 static constexpr double s_tcc8CeilingY = 5.761 * GeoModelKernelUnits::m;
65 static constexpr double s_tcc8LeftX = -3.587 * GeoModelKernelUnits::m;
66 static constexpr double s_tcc8RightX = 6.413 * GeoModelKernelUnits::m;
67 static constexpr double s_stairFloorY = -2.503 * GeoModelKernelUnits::m;
68 static constexpr double s_ecn3FloorY = -3.364 * GeoModelKernelUnits::m;
69 static constexpr double s_ecn3SpringlineY = 8.636 * GeoModelKernelUnits::m;
70 static constexpr double s_ecn3LeftX = -4.566 * GeoModelKernelUnits::m;
71 static constexpr double s_ecn3RightX = 11.434 * GeoModelKernelUnits::m;
72 static constexpr double s_magnetZ =
73 89.72 * GeoModelKernelUnits::m; // spectrometer magnet mid-plane
74 static constexpr double s_targetEndZ =
75 1.46 * GeoModelKernelUnits::m; // downstream face of the target
76
77 // Rock block (half-sizes in mm), centred on the modelled tunnel + hall
78 static constexpr double s_rockHalfX = 20.0 * GeoModelKernelUnits::m;
79 static constexpr double s_rockHalfY = 20.0 * GeoModelKernelUnits::m;
80 static constexpr double s_rockHalfZ = 140.0 * GeoModelKernelUnits::m;
81 static constexpr double s_cavernPosZ = (s_stepZ - s_tcc8Length + s_ecn3EndZ) / 2.0;
82
83 // Cavity positions below are relative to the rock centre.
84
85 // TCC8 tunnel (muon shield cavern), ending at the step
86 static constexpr double s_muonCavernHalfX = (s_tcc8RightX - s_tcc8LeftX) / 2.0;
87 static constexpr double s_muonCavernHalfY = (s_tcc8CeilingY - s_tcc8FloorY) / 2.0;
88 static constexpr double s_muonCavernHalfZ = s_tcc8Length / 2.0;
89 static constexpr double s_muonCavernPosX = (s_tcc8RightX + s_tcc8LeftX) / 2.0;
90 static constexpr double s_muonCavernPosY = (s_tcc8CeilingY + s_tcc8FloorY) / 2.0;
91 static constexpr double s_muonCavernPosZ = s_stepZ - s_muonCavernHalfZ - s_cavernPosZ;
92
93 // Stair step: intermediate floor at the TCC8 width and ceiling
94 static constexpr double s_stairHalfX = s_muonCavernHalfX;
95 static constexpr double s_stairHalfY = (s_tcc8CeilingY - s_stairFloorY) / 2.0;
96 static constexpr double s_stairHalfZ = s_stairLength / 2.0;
97 static constexpr double s_stairPosX = s_muonCavernPosX;
98 static constexpr double s_stairPosY = (s_tcc8CeilingY + s_stairFloorY) / 2.0;
99 static constexpr double s_stairPosZ = s_stepZ + s_stairHalfZ - s_cavernPosZ;
100
101 // ECN3 hall (experiment cavern), from the stair step to the end wall
102 static constexpr double s_expCavernHalfX = (s_ecn3RightX - s_ecn3LeftX) / 2.0;
103 static constexpr double s_expCavernHalfY = (s_ecn3SpringlineY - s_ecn3FloorY) / 2.0;
104 static constexpr double s_expCavernHalfZ = (s_ecn3EndZ - s_stepZ - s_stairLength) / 2.0;
105 static constexpr double s_expCavernPosX = (s_ecn3RightX + s_ecn3LeftX) / 2.0;
106 static constexpr double s_expCavernPosY = (s_ecn3SpringlineY + s_ecn3FloorY) / 2.0;
107 static constexpr double s_expCavernPosZ = s_ecn3EndZ - s_expCavernHalfZ - s_cavernPosZ;
108
109 // Spectrometer yoke pit: 8.4 m wide, 1 m deep, 9 m long, centred on the magnet
110 static constexpr double s_yokePitHalfX = 4.2 * GeoModelKernelUnits::m;
111 static constexpr double s_yokePitHalfY = 0.5 * GeoModelKernelUnits::m;
112 static constexpr double s_yokePitHalfZ = 4.5 * GeoModelKernelUnits::m;
113 static constexpr double s_yokePitPosX = 0.0;
114 static constexpr double s_yokePitPosY = s_ecn3FloorY - s_yokePitHalfY;
115 static constexpr double s_yokePitPosZ = s_magnetZ - s_cavernPosZ;
116
117 // Target pit: 4 m wide, 1 m deep, 4 m long, ending 2 m downstream of the target
118 static constexpr double s_targetPitHalfX = 2.0 * GeoModelKernelUnits::m;
119 static constexpr double s_targetPitHalfY = 0.5 * GeoModelKernelUnits::m;
120 static constexpr double s_targetPitHalfZ = 2.0 * GeoModelKernelUnits::m;
121 static constexpr double s_targetPitPosX = 0.0;
122 static constexpr double s_targetPitPosY = s_tcc8FloorY - s_targetPitHalfY;
123 static constexpr double s_targetPitPosZ = s_targetEndZ - s_cavernPosZ;
124};
125
126} // namespace SHiPGeometry
Factory for the Cavern (world volume and rock) geometry.
Definition CavernFactory.h:17
GeoPhysVol * build()
Build the Cavern geometry.
Definition CavernFactory.cpp:24
Central material manager for the SHiP detector.
Definition SHiPMaterials.h:22
Definition Placement.h:14