SHiP Geometry
SHiP experiment geometry implementation using GeoModel.
Loading...
Searching...
No Matches
TargetFactory.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
8#include <array>
9
10class GeoPhysVol;
11class GeoLogVol;
12
13namespace SHiPGeometry {
14
15class SHiPMaterials;
16
28 public:
29 explicit TargetFactory(SHiPMaterials& materials);
30 ~TargetFactory() = default;
31
36 [[nodiscard]] GeoPhysVol* build();
37
38 private:
39 SHiPMaterials& m_materials;
40
41 // Helper methods
42 GeoPhysVol* createProximityShielding();
43 GeoPhysVol* createTopShielding();
44 GeoPhysVol* createBottomShielding();
45 GeoPhysVol* createShieldingPedestal();
46 GeoPhysVol* createTargetVessel();
47 GeoPhysVol* createTargetVesselFront();
48 GeoPhysVol* createTargetVesselBack();
49 GeoPhysVol* createTargetEnclosure();
50 GeoPhysVol* createHeVolume();
51
52 // Unit conversion helper (GDML uses cm, GeoModel uses mm)
53 static constexpr double cm = GeoModelKernelUnits::cm;
54
55 // Target vacuum box dimensions (half-sizes)
56 static constexpr double s_vacuumBoxHalfX = 80.0 * cm;
57 static constexpr double s_vacuumBoxHalfY = 113.55 * cm;
58 static constexpr double s_vacuumBoxHalfZ = 150.0 * cm;
59
60 // Proximity shielding
61 static constexpr double s_proxEnvHalfX = 80.0 * cm;
62 static constexpr double s_proxEnvHalfY = 56.3 * cm;
63 static constexpr double s_proxEnvHalfZ = 150.0 * cm;
64 static constexpr double s_proxInnerHalfX = 55.0 * cm;
65 static constexpr double s_proxInnerHalfY = 56.3 * cm;
66 static constexpr double s_proxInnerHalfZ = 110.0 * cm;
67 static constexpr double s_proxInnerOffsetZ = 15.0 * cm;
68 static constexpr double s_proxHoleRadius = 10.0 * cm;
69 static constexpr double s_proxHoleHalfZ = 27.5 * cm;
70 static constexpr double s_proxHoleOffsetY = 17.2 * cm;
71 static constexpr double s_proxHoleOffsetZ = -122.5 * cm;
72 static constexpr double s_proxPosY = -2.75 * cm;
73
74 // Top shielding
75 static constexpr double s_topShieldHalfX = 80.0 * cm;
76 static constexpr double s_topShieldHalfY = 30.0 * cm;
77 static constexpr double s_topShieldHalfZ = 150.0 * cm;
78 static constexpr double s_topShieldPosY = 83.55 * cm;
79
80 // Bottom shielding
81 static constexpr double s_bottomShieldHalfX = 80.0 * cm;
82 static constexpr double s_bottomShieldHalfY = 27.25 * cm;
83 static constexpr double s_bottomShieldHalfZ = 150.0 * cm;
84 static constexpr double s_bottomShieldPosY = -86.3 * cm;
85
86 // Shielding pedestal
87 static constexpr double s_pedestalHalfX = 53.5 * cm;
88 static constexpr double s_pedestalHalfY = 7.5 * cm;
89 static constexpr double s_pedestalHalfZ = 108.5 * cm;
90 static constexpr double s_pedestalPosY = -51.55 * cm;
91 static constexpr double s_pedestalPosZ = 15.0 * cm;
92
93 // TargetArea position within vacuum box
94 static constexpr double s_targetAreaPosY = 14.45 * cm;
95 static constexpr double s_targetAreaPosZ = -43.25 * cm;
96
97 // Target vessel
98 static constexpr double s_vesselRmin = 20.0 * cm;
99 static constexpr double s_vesselRmax = 20.8 * cm;
100 static constexpr double s_vesselHalfZ = 85.52 * cm;
101 static constexpr double s_vesselPosZ = 79.32 * cm;
102
103 // Target vessel end caps
104 static constexpr double s_vesselCapRadius = 20.8 * cm;
105 static constexpr double s_vesselCapHalfZ = 0.4 * cm;
106 static constexpr double s_vesselFrontPosZ = -6.6 * cm;
107 static constexpr double s_vesselBackPosZ = 165.24 * cm;
108
109 // HeVolume
110 static constexpr double s_heVolumeRadius = 20.0 * cm;
111 static constexpr double s_heVolumeHalfZ = 85.52 * cm;
112 static constexpr double s_heVolumePosZ = 79.32 * cm;
113
114 // Target enclosure
115 static constexpr double s_enclosureRmin = 12.51 * cm;
116 static constexpr double s_enclosureRmax = 19.2 * cm;
117 static constexpr double s_enclosureHalfZ = 79.32 * cm;
118 static constexpr double s_enclosureCutoutHalfX = 8.0 * cm;
119 static constexpr double s_enclosureCutoutHalfY = 14.0 * cm;
120
121 // Target slabs (common parameters)
122 static constexpr double s_claddingRadius = 12.5 * cm;
123 static constexpr double s_coreRadius = 12.35 * cm;
124 static constexpr int s_numSlabs = 19;
125
126 // Target slab data arrays (half-lengths in Z, positions in Z)
127 static constexpr std::array<double, 19> s_claddingHalfZ = {
128 2.25 * cm, 0.9 * cm, 0.85 * cm, 0.85 * cm, 0.9 * cm, 0.95 * cm, 1.05 * cm,
129 0.95 * cm, 1.05 * cm, 1.2 * cm, 1.4 * cm, 1.65 * cm, 2.05 * cm, 2.8 * cm,
130 4.4 * cm, 8.6 * cm, 14.35 * cm, 14.4 * cm, 14.4 * cm};
131 static constexpr std::array<double, 19> s_coreHalfZ = {
132 2.1 * cm, 0.75 * cm, 0.7 * cm, 0.7 * cm, 0.75 * cm, 0.8 * cm, 0.9 * cm,
133 0.8 * cm, 0.9 * cm, 1.05 * cm, 1.25 * cm, 1.5 * cm, 1.9 * cm, 2.65 * cm,
134 4.25 * cm, 8.45 * cm, 14.2 * cm, 14.25 * cm, 14.25 * cm};
135 static constexpr std::array<double, 19> s_slabPosZ = {
136 -77.07 * cm, -73.47 * cm, -71.27 * cm, -69.12 * cm, -66.92 * cm, -64.62 * cm, -62.17 * cm,
137 -59.72 * cm, -57.27 * cm, -54.57 * cm, -51.52 * cm, -48.02 * cm, -43.87 * cm, -38.57 * cm,
138 -30.92 * cm, -17.44 * cm, 6.01 * cm, 35.44 * cm, 64.92 * cm};
139};
140
141} // namespace SHiPGeometry
Central material manager for the SHiP detector.
Definition SHiPMaterials.h:20
Factory for the Target (proton target and shielding) geometry.
Definition TargetFactory.h:27
GeoPhysVol * build()
Build the Target geometry.
Definition TargetFactory.cpp:25
Definition SHiPGeometry.h:8