Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Acts/Plugins/Json/JsonDetectorElement.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 #pragma once
0009 
0010 #include "Acts/Geometry/DetectorElementBase.hpp"
0011 
0012 #include <nlohmann/json.hpp>
0013 
0014 namespace Acts {
0015 
0016 /// A implementation of a detector element, that is constructed from a
0017 /// JSON description of a surface. The idea behind this is that it helps
0018 /// importing whole tracking geometries from JSON files. In some parts of
0019 /// the codebase, the existence of a detector element associated to a surface
0020 /// has a specific meaning (e.g., flags surfaces as sensitive).
0021 class JsonDetectorElement : public DetectorElementBase {
0022  public:
0023   JsonDetectorElement(const nlohmann::json &jSurface, double thickness);
0024 
0025   Surface &surface() override;
0026   const Surface &surface() const override;
0027 
0028   double thickness() const override;
0029 
0030   const Transform3 &transform(const GeometryContext &gctx) const override;
0031 
0032  private:
0033   std::shared_ptr<Surface> m_surface;
0034   Transform3 m_transform{};
0035   double m_thickness{};
0036 };
0037 
0038 }  // namespace Acts