Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-17 07:58:44

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/Surfaces/BoundaryTolerance.hpp"
0013 #include "Acts/Surfaces/SurfaceBounds.hpp"
0014 
0015 namespace Acts {
0016 
0017 /// @class InfiniteBounds
0018 ///
0019 /// templated boundless extension to forward the interface
0020 /// Returns all inside checks to true and can templated for all bounds
0021 ///
0022 class InfiniteBounds : public SurfaceBounds {
0023  public:
0024   /// @copydoc SurfaceBounds::type
0025   SurfaceBounds::BoundsType type() const final { return eBoundless; }
0026 
0027   /// @copydoc SurfaceBounds::isCartesian
0028   bool isCartesian() const final { return true; }
0029 
0030   /// @copydoc SurfaceBounds::boundToCartesianJacobian
0031   SquareMatrix2 boundToCartesianJacobian(const Vector2& lposition) const final {
0032     (void)lposition;
0033     return SquareMatrix2::Identity();
0034   }
0035 
0036   /// @copydoc SurfaceBounds::boundToCartesianMetric
0037   SquareMatrix2 boundToCartesianMetric(const Vector2& lposition) const final {
0038     (void)lposition;
0039     return SquareMatrix2::Identity();
0040   }
0041 
0042   /// @copydoc SurfaceBounds::values
0043   std::vector<double> values() const final { return {}; }
0044 
0045   /// @copydoc SurfaceBounds::inside(const Vector2&) const
0046   bool inside(const Vector2& lposition) const final {
0047     (void)lposition;
0048     return true;
0049   }
0050 
0051   /// @copydoc SurfaceBounds::closestPoint
0052   Vector2 closestPoint(const Vector2& lposition,
0053                        const SquareMatrix2& metric) const final {
0054     (void)metric;
0055     return lposition;
0056   }
0057 
0058   /// @copydoc SurfaceBounds::inside(const Vector2&, const BoundaryTolerance&) const
0059   bool inside(const Vector2& lposition,
0060               const BoundaryTolerance& boundaryTolerance) const final {
0061     (void)lposition;
0062     (void)boundaryTolerance;
0063     return true;
0064   }
0065 
0066   /// @copydoc SurfaceBounds::center
0067   Vector2 center() const final {
0068     // For infinite bounds, return conceptual center at origin
0069     return Vector2::Zero();
0070   }
0071 
0072   /// Output Method for std::ostream
0073   /// @param os Output stream to write to
0074   /// @return Reference to the output stream for method chaining
0075   std::ostream& toStream(std::ostream& os) const final {
0076     os << "Acts::InfiniteBounds ... boundless surface" << std::endl;
0077     return os;
0078   }
0079 };
0080 
0081 static const InfiniteBounds s_noBounds{};
0082 
0083 }  // namespace Acts