Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Acts/Plugins/Json/JsonSurfacesReader.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 
0009 #pragma once
0010 
0011 #include "Acts/Geometry/GeometryHierarchyMap.hpp"
0012 #include "Acts/Plugins/Json/JsonDetectorElement.hpp"
0013 
0014 #include <memory>
0015 #include <string>
0016 #include <vector>
0017 
0018 namespace Acts {
0019 class Surface;
0020 }
0021 
0022 namespace Acts::JsonSurfacesReader {
0023 
0024 /// @brief Options specification for surface reading
0025 /// The file should contain an array of json surfaces
0026 /// as produced by the SurfaceJsonConverter tools
0027 struct Options {
0028   /// @brief  Which input file to read from
0029   std::string inputFile = "";
0030   /// The entry path until you reach the surface entries
0031   std::vector<std::string> jsonEntryPath = {"Surfaces", "entries"};
0032 };
0033 
0034 /// @brief Read the surfaces from the input file
0035 /// For details on the file format see the options struct
0036 ///
0037 /// @param options specifies which file and what to read
0038 ///
0039 /// @return  a vector of surfaces
0040 Acts::GeometryHierarchyMap<std::shared_ptr<Acts::Surface>> readHierarchyMap(
0041     const Options& options);
0042 
0043 /// @brief Read the flat surfaces from the input file
0044 /// For details on the file format see the options struct
0045 ///
0046 /// @param options options for surface reading
0047 ///
0048 /// @return  a vector of surfaces
0049 std::vector<std::shared_ptr<Acts::Surface>> readVector(const Options& options);
0050 
0051 /// @brief Read the surfaces from the input file and create
0052 /// detector elements
0053 /// For details on the file format see the options struct
0054 ///
0055 /// @param options options for surface reading
0056 /// @param thickness the thickness used to construct the detector element
0057 ///
0058 /// @return  a vector of surfaces
0059 std::vector<std::shared_ptr<Acts::JsonDetectorElement>> readDetectorElements(
0060     const Options& options, double thickness);
0061 
0062 }  // namespace Acts::JsonSurfacesReader