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