Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-27 08:30:33

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/Seeding/GbtsLayerDescription.hpp"
0012 
0013 #include <cstdint>
0014 #include <vector>
0015 
0016 namespace Acts::Experimental::detail {
0017 
0018 /// Layer helper with eta-bin access, built and owned by GbtsGeometry.
0019 class GbtsLayer final {
0020  public:
0021   /// @param layerDescription Layer description for the layer
0022   /// @param etaBinWidth Eta bin width
0023   /// @param bin0 Starting bin index
0024   GbtsLayer(const GbtsLayerDescription& layerDescription, float etaBinWidth,
0025             std::int32_t bin0);
0026 
0027   /// Get eta bin for given z and r coordinates
0028   /// @param zh Z coordinate
0029   /// @param rh Radius coordinate
0030   /// @return Eta bin index
0031   std::int32_t getEtaBin(float zh, float rh) const;
0032 
0033   /// Get number of bins
0034   /// @return Number of bins
0035   std::int32_t numOfBins() const { return m_bins.size(); }
0036 
0037   /// Get bins
0038   /// @return Vector of bin indices
0039   const std::vector<std::int32_t>& bins() const { return m_bins; }
0040 
0041   /// Get the layer description
0042   /// @return Reference to the layer description
0043   const GbtsLayerDescription& layerDescription() const {
0044     return m_layerDescription;
0045   }
0046 
0047   /// Verify bin compatibility
0048   /// @param otherLayer Other layer to compare with
0049   /// @param b1 First bin index
0050   /// @param b2 Second bin index
0051   /// @param minZ0 Minimum z0 coordinate
0052   /// @param maxZ0 Maximum z0 coordinate
0053   /// @return True if bins are compatible
0054   bool checkCompatibility(const GbtsLayer& otherLayer, std::uint32_t b1,
0055                           std::uint32_t b2, float minZ0, float maxZ0) const;
0056 
0057  private:
0058   GbtsLayerDescription m_layerDescription;
0059 
0060   std::vector<std::int32_t> m_bins;
0061   std::vector<float> m_minRadius;
0062   std::vector<float> m_maxRadius;
0063   std::vector<float> m_minBinCoord;
0064   std::vector<float> m_maxBinCoord;
0065 
0066   float m_minEta{};
0067   float m_maxEta{};
0068   /// Width of one eta bin.
0069   float m_etaBin{};
0070   float m_r1{};
0071   float m_z1{};
0072   float m_r2{};
0073   float m_z2{};
0074   std::uint32_t m_nBins{};
0075 };
0076 
0077 }  // namespace Acts::Experimental::detail