File indexing completed on 2026-03-30 07:46:35
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "ActsPlugins/Json/JsonDetectorElement.hpp"
0010
0011 #include "ActsPlugins/Json/AlgebraJsonConverter.hpp"
0012 #include "ActsPlugins/Json/SurfaceJsonConverter.hpp"
0013
0014 namespace Acts {
0015
0016 JsonDetectorElement::JsonDetectorElement(const nlohmann::json &jSurface,
0017 double thickness)
0018 : m_thickness(thickness) {
0019 m_surface = Acts::SurfaceJsonConverter::fromJson(jSurface);
0020 m_transform = Transform3JsonConverter::fromJson(jSurface["transform"]);
0021 m_surface->assignSurfacePlacement(*this);
0022 m_surface->assignThickness(thickness);
0023 }
0024
0025 const Surface &JsonDetectorElement::surface() const {
0026 return *m_surface;
0027 }
0028
0029 Surface &JsonDetectorElement::surface() {
0030 return *m_surface;
0031 }
0032
0033 const Transform3 &JsonDetectorElement::localToGlobalTransform(
0034 const GeometryContext & ) const {
0035 return m_transform;
0036 }
0037
0038 double JsonDetectorElement::thickness() const {
0039 return m_thickness;
0040 }
0041
0042 }