Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-26 07:33:38

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