File indexing completed on 2025-01-30 09:15:17
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Plugins/Json/JsonDetectorElement.hpp"
0010
0011 #include "Acts/Plugins/Json/AlgebraJsonConverter.hpp"
0012 #include "Acts/Plugins/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->assignDetectorElement(*this);
0022 }
0023
0024 const Surface &JsonDetectorElement::surface() const {
0025 return *m_surface;
0026 }
0027
0028 Surface &JsonDetectorElement::surface() {
0029 return *m_surface;
0030 }
0031
0032 const Transform3 &JsonDetectorElement::transform(
0033 const GeometryContext & ) const {
0034 return m_transform;
0035 }
0036
0037 double JsonDetectorElement::thickness() const {
0038 return m_thickness;
0039 }
0040
0041 }