Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:41:55

0001 // This file is part of the actsvg package.
0002 //
0003 // Copyright (C) 2022 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 http://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include <string>
0012 #include <vector>
0013 
0014 #include "actsvg/core/defs.hpp"
0015 #include "actsvg/styles/defaults.hpp"
0016 
0017 namespace actsvg {
0018 
0019 namespace proto {
0020 
0021 /** A proto grid class to describe the grid setup
0022  *
0023  * For convenience, it is forced to be 2-dimensional, for 1-dim
0024  * grid descriptions, only provide 2 eges
0025  *
0026  */
0027 struct grid {
0028 
0029     /** Type of grid, enum definition */
0030     enum type { e_x_y = 0, e_r_phi = 1, e_z_phi = 2 };
0031 
0032     /// Grid name
0033     std::string _name = "grid";
0034 
0035     /// Chose the type
0036     type _type = e_r_phi;
0037 
0038     /// The edges in the two given directions, loc0
0039     std::vector<scalar> _edges_0 = {};
0040 
0041     /// The edges in the two given directions, loc1
0042     std::vector<scalar> _edges_1 = {};
0043 
0044     /// Reference r for drawing (e.g. in case of phi axis)
0045     scalar _reference_r = 0.;
0046 
0047     /// Bin identifications
0048     std::vector<std::string> _bin_ids = {};
0049 
0050     /// Connections
0051     std::vector<svg::object> _connections;
0052     /// Connection types
0053     std::vector<connectors::type> _connection_types = {};
0054     /// Associations
0055     std::vector<std::vector<size_t>> _connection_associations = {};
0056 
0057     /// Stroke
0058     style::fill _fill = defaults::__g_fill;
0059 
0060     /// Stroke
0061     style::stroke _stroke = defaults::__g_stroke;
0062 };
0063 
0064 }  // namespace proto
0065 
0066 }  // namespace actsvg