Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-05 08:10:59

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   SpacePointData(SpacePointData&& other) noexcept = default;
0035   SpacePointData& operator=(SpacePointData&& other) noexcept = default;
0036 
0037   /// @brief Destructor
0038   ~SpacePointData() = default;
0039 
0040   /// @brief Getters
0041   float x(const std::size_t idx) const;
0042   float y(const std::size_t idx) const;
0043   float z(const std::size_t idx) const;
0044   float radius(const std::size_t idx) const;
0045   float phi(const std::size_t idx) const;
0046   float varianceZ(const std::size_t idx) const;
0047   float varianceR(const std::size_t idx) const;
0048 
0049   /// @brief Setters
0050   void setX(const std::size_t idx, const float value);
0051   void setY(const std::size_t idx, const float value);
0052   void setZ(const std::size_t idx, const float value);
0053   void setRadius(const std::size_t idx, const float value);
0054   void setPhi(const std::size_t idx, const float value);
0055   void setVarianceZ(const std::size_t idx, const float value);
0056   void setVarianceR(const std::size_t idx, const float value);
0057 
0058   /// @brief Resize vectors
0059   void resize(const std::size_t n, bool resizeDynamic = false);
0060 
0061   /// @brief clear vectors
0062   void clear();
0063 
0064   ///
0065   bool hasDynamicVariable() const;
0066 
0067   const Acts::Vector3& topStripVector(const std::size_t idx) const;
0068   const Acts::Vector3& bottomStripVector(const std::size_t idx) const;
0069   const Acts::Vector3& stripCenterDistance(const std::size_t idx) const;
0070   const Acts::Vector3& topStripCenterPosition(const std::size_t idx) const;
0071 
0072   void setTopStripVector(const std::size_t idx, const Acts::Vector3& value);
0073   void setBottomStripVector(const std::size_t idx, const Acts::Vector3& value);
0074   void setStripCenterDistance(const std::size_t idx,
0075                               const Acts::Vector3& value);
0076   void setTopStripCenterPosition(const std::size_t idx,
0077                                  const Acts::Vector3& value);
0078 
0079  private:
0080   /// base variables
0081   std::vector<float> m_x{};
0082   std::vector<float> m_y{};
0083   std::vector<float> m_z{};
0084   std::vector<float> m_radius{};
0085   std::vector<float> m_phi{};
0086   std::vector<float> m_varianceR{};
0087   std::vector<float> m_varianceZ{};
0088 
0089   /// dynamic variables
0090   std::vector<Acts::Vector3> m_topStripVector{};
0091   std::vector<Acts::Vector3> m_bottomStripVector{};
0092   std::vector<Acts::Vector3> m_stripCenterDistance{};
0093   std::vector<Acts::Vector3> m_topStripCenterPosition{};
0094 };
0095 
0096 }  // namespace Acts
0097 
0098 #include "Acts/EventData/SpacePointData.ipp"