Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:10:49

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 #include "Acts/Utilities/HashedString.hpp"
0013 
0014 #include <any>
0015 #include <limits>
0016 #include <vector>
0017 
0018 namespace Acts {
0019 
0020 /// @class SpacePointData
0021 /// This class contains auxiliary data associated to the
0022 /// external space points provided by the customers
0023 /// These variables are used internally by the seeding algorithm, that
0024 /// reads them
0025 /// The variables collected here are also dynamic variables only present
0026 /// for strip space points
0027 class SpacePointData {
0028  public:
0029   /// @brief Default constructor
0030   SpacePointData() = default;
0031 
0032   /// No copies
0033   SpacePointData(const SpacePointData& other) = delete;
0034   SpacePointData& operator=(const SpacePointData& other) = delete;
0035 
0036   /// @brief Move operations
0037   SpacePointData(SpacePointData&& other) noexcept = default;
0038   SpacePointData& operator=(SpacePointData&& other) noexcept = default;
0039 
0040   /// @brief Destructor
0041   ~SpacePointData() = default;
0042 
0043   /// @brief Getters
0044   float x(const std::size_t idx) const;
0045   float y(const std::size_t idx) const;
0046   float z(const std::size_t idx) const;
0047   float radius(const std::size_t idx) const;
0048   float phi(const std::size_t idx) const;
0049   float varianceZ(const std::size_t idx) const;
0050   float varianceR(const std::size_t idx) const;
0051 
0052   /// @brief Setters
0053   void setX(const std::size_t idx, const float value);
0054   void setY(const std::size_t idx, const float value);
0055   void setZ(const std::size_t idx, const float value);
0056   void setRadius(const std::size_t idx, const float value);
0057   void setPhi(const std::size_t idx, const float value);
0058   void setVarianceZ(const std::size_t idx, const float value);
0059   void setVarianceR(const std::size_t idx, const float value);
0060 
0061   /// @brief Resize vectors
0062   void resize(const std::size_t n, bool resizeDynamic = false);
0063 
0064   /// @brief clear vectors
0065   void clear();
0066 
0067   ///
0068   bool hasDynamicVariable() const;
0069 
0070   const Acts::Vector3& topStripVector(const std::size_t idx) const;
0071   const Acts::Vector3& bottomStripVector(const std::size_t idx) const;
0072   const Acts::Vector3& stripCenterDistance(const std::size_t idx) const;
0073   const Acts::Vector3& topStripCenterPosition(const std::size_t idx) const;
0074 
0075   void setTopStripVector(const std::size_t idx, const Acts::Vector3& value);
0076   void setBottomStripVector(const std::size_t idx, const Acts::Vector3& value);
0077   void setStripCenterDistance(const std::size_t idx,
0078                               const Acts::Vector3& value);
0079   void setTopStripCenterPosition(const std::size_t idx,
0080                                  const Acts::Vector3& value);
0081 
0082  private:
0083   /// base variables
0084   std::vector<float> m_x{};
0085   std::vector<float> m_y{};
0086   std::vector<float> m_z{};
0087   std::vector<float> m_radius{};
0088   std::vector<float> m_phi{};
0089   std::vector<float> m_varianceR{};
0090   std::vector<float> m_varianceZ{};
0091 
0092   /// dynamic variables
0093   std::vector<Acts::Vector3> m_topStripVector{};
0094   std::vector<Acts::Vector3> m_bottomStripVector{};
0095   std::vector<Acts::Vector3> m_stripCenterDistance{};
0096   std::vector<Acts::Vector3> m_topStripCenterPosition{};
0097 };
0098 
0099 }  // namespace Acts
0100 
0101 #include "Acts/EventData/SpacePointData.ipp"