SHiP Geometry
SHiP experiment geometry implementation using GeoModel.
Loading...
Searching...
No Matches
NeutrinoDetectorFactory.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
8
9#include <array>
10
11class GeoPhysVol;
12
13namespace SHiP::geometry {
14
15class Materials;
16
55 public:
57 explicit NeutrinoDetectorFactory(Materials& materials);
58
61
73 static constexpr SubsystemDescriptor descriptor() {
74 using units::gm;
75 using units::mm;
76 return {.name = "NeutrinoDetector",
77 .node = "/SHiP/neutrino_detector",
78 .id = 9,
79 .x_mm = 0.0,
80 .y_mm = 0.0,
81 .z_mm = gm(25465.0 * mm),
82 .isWorld = false};
83 }
84
85 [[nodiscard]] GeoPhysVol* build();
86
87 // ── Container envelope ──────────────────────────────────────────────
96
103 static constexpr std::array<Section, 4> k_sections{{
104 {.name = "veto",
105 .zStart = -2525.0 * units::mm,
106 .zEnd = -2485.0 * units::mm,
107 .halfX = 211.0 * units::mm,
108 .halfY = 220.0 * units::mm},
109 {.name = "target",
110 .zStart = -2485.0 * units::mm,
111 .zEnd = -1045.0 * units::mm,
112 .halfX = 201.0 * units::mm,
113 .halfY = 201.0 * units::mm},
114 {.name = "mgc",
115 .zStart = -1045.0 * units::mm,
116 .zEnd = -835.0 * units::mm,
117 .halfX = 251.0 * units::mm,
118 .halfY = 251.0 * units::mm},
119 {.name = "hcal",
120 .zStart = -835.0 * units::mm,
121 .zEnd = 2525.0 * units::mm,
122 .halfX = 301.25 * units::mm,
123 .halfY = 301.25 * units::mm},
124 }};
125
128 static constexpr auto s_halfX = 301.25 * units::mm;
129 static constexpr auto s_halfY = 301.25 * units::mm;
130 static constexpr auto s_halfZ = 2525.0 * units::mm;
131
132 private:
133 Materials& m_materials;
134};
135
136} // namespace SHiP::geometry
Central material manager for the SHiP detector.
Definition Materials.h:22
GeoPhysVol * build()
Build the SND geometry; returns the air container.
Definition NeutrinoDetectorFactory.cpp:413
static constexpr auto s_halfX
Bounding box of the sections: the HCAL's cross-section and the full 5.05 m length.
Definition NeutrinoDetectorFactory.h:128
static constexpr std::array< Section, 4 > k_sections
The container is the union of these boxes, so it follows the sub-detectors and the muon-shield iron c...
Definition NeutrinoDetectorFactory.h:103
NeutrinoDetectorFactory(Materials &materials)
Construct the factory against the shared materials catalogue.
Definition NeutrinoDetectorFactory.cpp:409
static constexpr auto s_halfY
Definition NeutrinoDetectorFactory.h:129
static constexpr SubsystemDescriptor descriptor()
This subsystem's self-description (name, node, id, placement).
Definition NeutrinoDetectorFactory.h:73
static constexpr auto s_halfZ
Definition NeutrinoDetectorFactory.h:130
~NeutrinoDetectorFactory()=default
Defaulted destructor.
mp_units::quantity< mm > LengthMm
Spellings for struct members and function parameters.
Definition Units.h:39
constexpr double gm(mp_units::quantity< U, Rep > q)
Length quantity -> GeoModel raw double (GeoModel native unit: mm).
Definition Units.h:47
constexpr auto mm
Definition Units.h:27
Definition DetectorBuilder.h:8
constexpr double gm(mp_units::quantity< U, Rep > q)
Length quantity -> GeoModel raw double (GeoModel native unit: mm).
Definition Units.h:47
constexpr auto mm
Definition Units.h:27
One step of the container along the beam, in the container frame: a box from zStart to zEnd holding o...
Definition NeutrinoDetectorFactory.h:91
units::LengthMm zEnd
Definition NeutrinoDetectorFactory.h:93
units::LengthMm halfX
Definition NeutrinoDetectorFactory.h:94
units::LengthMm halfY
Definition NeutrinoDetectorFactory.h:94
const char * name
Definition NeutrinoDetectorFactory.h:92
units::LengthMm zStart
Definition NeutrinoDetectorFactory.h:93
A subsystem's self-description: everything the assembler needs.
Definition SubsystemDescriptor.h:20