|
|
|||
File indexing completed on 2025-10-28 07:53:37
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 0013 #include <vector> 0014 0015 namespace Acts { 0016 0017 /// @class SpacePointData 0018 /// This class contains auxiliary data associated to the 0019 /// external space points provided by the customers 0020 /// These variables are used internally by the seeding algorithm, that 0021 /// reads them 0022 /// The variables collected here are also dynamic variables only present 0023 /// for strip space points 0024 class SpacePointData { 0025 public: 0026 /// @brief Default constructor 0027 SpacePointData() = default; 0028 0029 /// No copies 0030 SpacePointData(const SpacePointData& other) = delete; 0031 SpacePointData& operator=(const SpacePointData& other) = delete; 0032 0033 /// @brief Move operations 0034 /// @param other SpacePointData object to move from 0035 SpacePointData(SpacePointData&& other) noexcept = default; 0036 /// Move assignment operator 0037 /// @param other SpacePointData object to move from 0038 /// @return Reference to this object 0039 SpacePointData& operator=(SpacePointData&& other) noexcept = default; 0040 0041 /// @brief Destructor 0042 ~SpacePointData() = default; 0043 0044 /// @param idx Index of the space point 0045 /// @return X coordinate value 0046 float x(const std::size_t idx) const; 0047 /// Get y coordinate of space point 0048 /// @param idx Index of the space point 0049 /// @return Y coordinate value 0050 float y(const std::size_t idx) const; 0051 /// Get z coordinate of space point 0052 /// @param idx Index of the space point 0053 /// @return Z coordinate value 0054 float z(const std::size_t idx) const; 0055 /// Get radial distance of space point 0056 /// @param idx Index of the space point 0057 /// @return Radial distance value 0058 float radius(const std::size_t idx) const; 0059 /// Get azimuthal angle of space point 0060 /// @param idx Index of the space point 0061 /// @return Azimuthal angle value 0062 float phi(const std::size_t idx) const; 0063 /// Get z coordinate variance of space point 0064 /// @param idx Index of the space point 0065 /// @return Z variance value 0066 float varianceZ(const std::size_t idx) const; 0067 /// Get radial variance of space point 0068 /// @param idx Index of the space point 0069 /// @return Radial variance value 0070 float varianceR(const std::size_t idx) const; 0071 0072 /// @param idx Index of the space point to modify 0073 /// @param value New x coordinate value to set 0074 void setX(const std::size_t idx, const float value); 0075 /// Set y coordinate of space point 0076 /// @param idx Index of the space point to modify 0077 /// @param value New y coordinate value to set 0078 void setY(const std::size_t idx, const float value); 0079 /// Set z coordinate of space point 0080 /// @param idx Index of the space point to modify 0081 /// @param value New z coordinate value to set 0082 void setZ(const std::size_t idx, const float value); 0083 /// Set radial distance of space point 0084 /// @param idx Index of the space point to modify 0085 /// @param value New radial distance value to set 0086 void setRadius(const std::size_t idx, const float value); 0087 /// Set azimuthal angle of space point 0088 /// @param idx Index of the space point to modify 0089 /// @param value New azimuthal angle value to set 0090 void setPhi(const std::size_t idx, const float value); 0091 /// Set z coordinate variance of space point 0092 /// @param idx Index of the space point to modify 0093 /// @param value New z variance value to set 0094 void setVarianceZ(const std::size_t idx, const float value); 0095 /// Set radial variance of space point 0096 /// @param idx Index of the space point to modify 0097 /// @param value New radial variance value to set 0098 void setVarianceR(const std::size_t idx, const float value); 0099 0100 /// @brief Resize vectors 0101 /// @param n New size for the data vectors 0102 /// @param resizeDynamic Whether to resize dynamic data containers 0103 void resize(const std::size_t n, bool resizeDynamic = false); 0104 0105 /// @brief clear vectors 0106 void clear(); 0107 0108 /// Check if space point data has dynamic variables 0109 /// @return True if dynamic variables (strip data) are present 0110 bool hasDynamicVariable() const; 0111 0112 /// Get top strip vector for strip space points 0113 /// @param idx Index of the space point 0114 /// @return Reference to top strip vector 0115 const Acts::Vector3& topStripVector(const std::size_t idx) const; 0116 /// Get bottom strip vector for strip space points 0117 /// @param idx Index of the space point 0118 /// @return Reference to bottom strip vector 0119 const Acts::Vector3& bottomStripVector(const std::size_t idx) const; 0120 /// Get strip center distance vector for strip space points 0121 /// @param idx Index of the space point 0122 /// @return Reference to strip center distance vector 0123 const Acts::Vector3& stripCenterDistance(const std::size_t idx) const; 0124 /// Get top strip center position for strip space points 0125 /// @param idx Index of the space point 0126 /// @return Reference to top strip center position vector 0127 const Acts::Vector3& topStripCenterPosition(const std::size_t idx) const; 0128 0129 /// Set top strip vector for strip space points 0130 /// @param idx Index of the space point to modify 0131 /// @param value New top strip vector to set 0132 void setTopStripVector(const std::size_t idx, const Acts::Vector3& value); 0133 /// Set bottom strip vector for strip space points 0134 /// @param idx Index of the space point to modify 0135 /// @param value New bottom strip vector to set 0136 void setBottomStripVector(const std::size_t idx, const Acts::Vector3& value); 0137 /// Set strip center distance vector for strip space points 0138 /// @param idx Index of the space point to modify 0139 /// @param value New strip center distance vector to set 0140 void setStripCenterDistance(const std::size_t idx, 0141 const Acts::Vector3& value); 0142 /// Set top strip center position for strip space points 0143 /// @param idx Index of the space point to modify 0144 /// @param value New top strip center position vector to set 0145 void setTopStripCenterPosition(const std::size_t idx, 0146 const Acts::Vector3& value); 0147 0148 private: 0149 /// base variables 0150 std::vector<float> m_x{}; 0151 std::vector<float> m_y{}; 0152 std::vector<float> m_z{}; 0153 std::vector<float> m_radius{}; 0154 std::vector<float> m_phi{}; 0155 std::vector<float> m_varianceR{}; 0156 std::vector<float> m_varianceZ{}; 0157 0158 /// dynamic variables 0159 std::vector<Acts::Vector3> m_topStripVector{}; 0160 std::vector<Acts::Vector3> m_bottomStripVector{}; 0161 std::vector<Acts::Vector3> m_stripCenterDistance{}; 0162 std::vector<Acts::Vector3> m_topStripCenterPosition{}; 0163 }; 0164 0165 } // namespace Acts 0166 0167 #include "Acts/EventData/SpacePointData.ipp"
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|