SHiP Geometry
SHiP experiment geometry implementation using GeoModel.
Loading...
Searching...
No Matches
TrackersFactory.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#include <string>
10
11class GeoPhysVol;
12
13namespace SHiPGeometry {
14
15class SHiPMaterials;
16
39 public:
40 explicit TrackersFactory(SHiPMaterials& materials);
41 ~TrackersFactory() = default;
42
47 [[nodiscard]] GeoPhysVol* build();
48
49 // ── Straw / view geometry constants ─────────────────────────────────
50 // Unit shorthand (GeoModel's native length unit is mm)
51 static constexpr double mm = GeoModelKernelUnits::mm;
52
53 static constexpr int s_nStations = 4;
54 static constexpr int s_nViews = 4;
55 static constexpr int s_nSubLayers = 2;
56
57 static constexpr double s_strawRadius = 10.0 * mm;
58 static constexpr double s_strawLength = 4000.0 * mm;
59 static constexpr double s_wallThickness = 0.030 * mm;
60
62 static constexpr double s_apertureX = 4000.0 * mm;
63 static constexpr double s_apertureY = 6000.0 * mm;
64
66 static constexpr int s_nStraws = static_cast<int>(s_apertureY / (2.0 * s_strawRadius));
67
68 static constexpr double s_stereoAngleDeg = 2.3;
69
70 // View frame (FairShip-style hollow rectangle).
71 static constexpr double s_frameBarX = 100.0 * mm;
72 static constexpr double s_frameBarY = 100.0 * mm;
73 static constexpr double s_frameHalfZ = 22.0 * mm;
74
75 // ── Tracker magnet ──────────────────────────────────────────────────
76 // An inert, air-filled marker volume named "TrackerMagnet", placed in
77 // the clear gap between station 2 and the spectrometer-magnet yoke.
78 //
79 // NOTE: this is NOT a physically-scaled dipole. The spectrometer dipole
80 // proper is the separate Magnet subsystem (iron yoke + coils) occupying
81 // z = 87.07-92.07 m. The only free space inside the trackers container
82 // and clear of that yoke is a ~0.5 m gap, so this marker is sized to fit
83 // there. It exists so the tracker magnet has a named placeholder in the
84 // geometry; simulation/field code can locate it by the name
85 // "/SHiP/trackers/tracker_magnet".
86 static constexpr double s_trackerMagnetZ = 86820.0 * mm;
87 static constexpr double s_trackerMagnetHalfZ = 230.0 * mm;
88
89 private:
90 SHiPMaterials& m_materials;
91
93 std::string m_frameMaterialName = "Aluminium";
94
95 // ── Station envelope from GDML statbox ──────────────────────────────
96 static constexpr double s_halfX = 3000.0 * mm; // 300 cm
97 static constexpr double s_halfY = 3430.0 * mm; // 343 cm (GDML y = 686 cm)
98 static constexpr double s_halfZ = 500.0 * mm; // 50 cm
99
100 // Station Z positions (centres, from origin).
101 static constexpr double s_station1Z = 84070.0 * mm; // 84.07 m
102 static constexpr double s_station2Z = 86070.0 * mm; // 86.07 m
103 static constexpr double s_station3Z = 93070.0 * mm; // 93.07 m
104 static constexpr double s_station4Z = 95070.0 * mm; // 95.07 m
105
106 // Container dimensions (spans all stations).
107 static constexpr double s_containerHalfZ = (s_station4Z - s_station1Z) / 2.0 + s_halfZ;
108 static constexpr double s_containerCentreZ = (s_station1Z + s_station4Z) / 2.0;
109
110 // ── Internal builders ───────────────────────────────────────────────
111
117 GeoPhysVol* buildStation(int stationIndex);
118
125 GeoPhysVol* buildView(int stationIndex, int viewIndex);
126
132 GeoPhysVol* buildFrame(int stationIndex, int viewIndex);
133
140 GeoPhysVol* buildSubLayer(int stationIndex, int viewIndex, bool shifted);
141
147 GeoPhysVol* buildStraw();
148
150 GeoPhysVol* m_strawPhys = nullptr;
151
159 GeoPhysVol* buildTrackerMagnet();
160};
161
162} // namespace SHiPGeometry
Central material manager for the SHiP detector.
Definition SHiPMaterials.h:20
Factory for the Trackers (straw tube tracking stations) geometry.
Definition TrackersFactory.h:38
static constexpr double s_stereoAngleDeg
|stereo angle| per view
Definition TrackersFactory.h:68
static constexpr int s_nStations
Definition TrackersFactory.h:53
static constexpr double s_apertureX
Active aperture inside a view frame (X = straw length region, Y = pitch).
Definition TrackersFactory.h:62
static constexpr double s_strawRadius
1 cm radius (2 cm diam)
Definition TrackersFactory.h:57
static constexpr double s_frameBarX
frame bar width in X
Definition TrackersFactory.h:71
static constexpr double s_frameBarY
frame bar width in Y
Definition TrackersFactory.h:72
static constexpr double mm
Definition TrackersFactory.h:51
static constexpr int s_nSubLayers
staggered straw layers per view
Definition TrackersFactory.h:55
static constexpr double s_trackerMagnetHalfZ
half-depth
Definition TrackersFactory.h:87
static constexpr double s_trackerMagnetZ
centre
Definition TrackersFactory.h:86
static constexpr double s_frameHalfZ
frame half-thickness in Z
Definition TrackersFactory.h:73
static constexpr int s_nStraws
Straws per sub-layer (aperture height / straw diameter).
Definition TrackersFactory.h:66
static constexpr double s_apertureY
Definition TrackersFactory.h:63
GeoPhysVol * build()
Build the Trackers geometry.
Definition TrackersFactory.cpp:71
static constexpr double s_wallThickness
30 µm Mylar wall
Definition TrackersFactory.h:59
static constexpr int s_nViews
stereo views per station
Definition TrackersFactory.h:54
static constexpr double s_strawLength
4 m, along X
Definition TrackersFactory.h:58
Definition ConfigPath.h:9