Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-11-30 09:40:27

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 <optional>
0012 #include <string>
0013 #include <variant>
0014 #include <vector>
0015 
0016 #include "actsvg/core/defs.hpp"
0017 #include "actsvg/proto/cluster.hpp"
0018 #include "actsvg/styles/defaults.hpp"
0019 
0020 namespace actsvg {
0021 namespace proto {
0022 
0023 template <typename point3_type>
0024 struct trajectory {
0025 
0026     using point3 = point3_type;
0027 
0028     /// The origin of the trajectory
0029     point3_type _origin;
0030 
0031     /// The direction of the trajectory
0032     point3_type _direction;
0033 
0034     /// The path of the trajectory, first positions, second optional directions
0035     std::vector<std::pair<point3_type, std::optional<point3_type>>> _path;
0036 
0037     /// The origin style
0038     scalar _origin_size = 0.;
0039     style::stroke _origin_stroke;
0040     style::fill _origin_fill;
0041 
0042     /// The trajectory style
0043     style::marker _path_arrow;
0044     style::stroke _path_stroke;
0045 };
0046 
0047 template <typename point3_type>
0048 struct seed {
0049 
0050     /// The space points
0051     std::vector<point3_type> _space_points;
0052 
0053     /// The trajectory
0054     std::optional<trajectory<point3_type>> _trajectory;
0055 
0056     /// The space point style
0057     scalar _space_point_size = 5.;
0058     style::fill _space_point_fill;
0059     style::stroke _space_point_stroke;
0060 };
0061 
0062 template <typename surface_type>
0063 struct track_state {
0064     /// The surface
0065     surface_type _surface;
0066 
0067     /// The cluster
0068     std::variant<cluster<1>, cluster<2>> _cluster;
0069 };
0070 
0071 }  // namespace proto
0072 
0073 }  // namespace actsvg