Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LayerSvgConverter.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file LayerSvgConverter.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2022 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
14 #include <actsvg/core.hpp>
15 #include <actsvg/meta.hpp>
16 
17 namespace Acts {
18 
19 class Layer;
20 
21 namespace Svg {
22 
23 using ProtoVolume = actsvg::proto::volume<std::vector<Vector3>>;
24 
25 static std::array<ActsScalar, 2> noLimitZ = {
26  std::numeric_limits<Acts::ActsScalar>::lowest(),
27  std::numeric_limits<Acts::ActsScalar>::max()};
28 
29 static std::array<ActsScalar, 2> noLimitPhi = {-M_PI, M_PI};
30 
31 namespace LayerConverter {
32 
34 enum Sheets {
36  eGridInfo = 1,
39 };
40 
42 struct Options {
48  std::array<ActsScalar, 2> zRange = noLimitZ;
50  std::array<ActsScalar, 2> phiRange = noLimitPhi;
52  bool gridInfo = true;
53  bool moduleInfo = true;
54  bool projectionInfo = true;
56  bool labelProjection = false;
58 };
59 
67 std::vector<actsvg::svg::object> convert(const GeometryContext& gctx,
68  const Layer& layer,
69  const Options& cOptions);
70 
71 } // namespace LayerConverter
72 
73 } // namespace Svg
74 
75 } // namespace Acts