SHiP Geometry
SHiP experiment geometry implementation using GeoModel.
Loading...
Searching...
No Matches
CalorimeterFactory.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 <string>
9
10class GeoPhysVol;
11
12namespace SHiPGeometry {
13
14class SHiPMaterials;
15struct CalorimeterConfig;
16
31 public:
32 explicit CalorimeterFactory(SHiPMaterials& materials, std::string configPath = "calo.toml");
34
36 [[nodiscard]] GeoPhysVol* build();
37
44 static double totalStackZ(const CalorimeterConfig& cfg);
45
46 private:
47 SHiPMaterials& m_materials;
48 std::string m_configPath;
49
51 void buildStack(GeoPhysVol* container, const CalorimeterConfig& cfg, int moduleX, int moduleY,
52 double offsetX, double offsetY) const;
53
54 // ── Fixed container dimensions ──────────────────────────────────────
55 // These match the SHiP subsystem envelope from subsystem_envelopes.csv
56 // and must not change — tests and the consistency check depend on them.
57 static constexpr double s_containerHalfX = 3000.0 * GeoModelKernelUnits::mm; // 3.00 m
58 static constexpr double s_containerHalfY = 3500.0 * GeoModelKernelUnits::mm; // 3.50 m
59 static constexpr double s_containerHalfZ = 1450.0 * GeoModelKernelUnits::mm; // 1.45 m
60};
61
62} // namespace SHiPGeometry
Factory for the Calorimeter (ECAL + HCAL) geometry.
Definition CalorimeterFactory.h:30
static double totalStackZ(const CalorimeterConfig &cfg)
Compute the total Z extent of one ECAL+gap+HCAL stack (mm).
Definition CalorimeterFactory.cpp:57
GeoPhysVol * build()
Build and return the calorimeter container volume.
Definition CalorimeterFactory.cpp:91
Central material manager for the SHiP detector.
Definition SHiPMaterials.h:20
Definition ConfigPath.h:9
Configuration for the SHiP calorimeter geometry.
Definition CalorimeterConfig.h:41