Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-11-23 09:33:26

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/Definitions/Algebra.hpp"
0012 #include "Acts/Geometry/GeometryContext.hpp"
0013 #include "Acts/Geometry/GeometryHierarchyMap.hpp"
0014 #include "Acts/Plugins/ActSVG/SvgUtils.hpp"
0015 #include <actsvg/meta.hpp>
0016 
0017 #include <tuple>
0018 #include <vector>
0019 
0020 namespace Acts {
0021 
0022 class SurfaceArray;
0023 
0024 namespace Svg {
0025 
0026 using ProtoSurface = actsvg::proto::surface<std::vector<Vector3>>;
0027 using ProtoSurfaces = std::vector<ProtoSurface>;
0028 using ProtoGrid = actsvg::proto::grid;
0029 using ProtoAssociations = std::vector<std::vector<std::size_t>>;
0030 
0031 namespace SurfaceArrayConverter {
0032 
0033 /// Nested options struct
0034 struct Options {
0035   /// Hierarchy map of styles
0036   GeometryHierarchyMap<Style> surfaceStyles;
0037 };
0038 
0039 /// Convert a surface array into needed constituents
0040 ///
0041 /// @param gtcx is the geometry context of the conversion call
0042 /// @param surfaceArray is the surface to convert
0043 /// @param cOptions the conversion options
0044 ///
0045 /// @note the type of view is auto-generated from the binning information
0046 ///
0047 /// @return a collection of proto surface object and a grid, and associations
0048 std::tuple<std::vector<ProtoSurfaces>, ProtoGrid,
0049            std::vector<ProtoAssociations>>
0050 convert(const GeometryContext& gctx, const SurfaceArray& surfaceArray,
0051         const Options& cOptions);
0052 
0053 }  // namespace SurfaceArrayConverter
0054 
0055 }  // namespace Svg
0056 
0057 }  // namespace Acts