|
|
|||
File indexing completed on 2026-07-16 08:07:30
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/Geometry/PortalShell.hpp" 0013 #include "Acts/Geometry/TrackingVolume.hpp" 0014 #include "Acts/Geometry/TrapezoidVolumeBounds.hpp" 0015 #include "Acts/Utilities/AxisDefinitions.hpp" 0016 #include "Acts/Utilities/Logger.hpp" 0017 0018 namespace Acts { 0019 0020 /// @class TrapezoidPortalShell 0021 /// Base class for trapezoid shaped portal shells, e.g. shells for trapezoid 0022 /// volumes 0023 class TrapezoidPortalShell : public PortalShellBase { 0024 public: 0025 /// Type alias for trapezoid volume face enumeration 0026 using Face = TrapezoidVolumeBounds::Face; 0027 0028 using enum TrapezoidVolumeBounds::Face; 0029 0030 /// Retrieve a shared_ptr for the portal associated to the given face. Can be 0031 /// nullptr if unset. 0032 /// @param face The face to retrieve the portal for 0033 /// @return The portal associated to the face 0034 virtual std::shared_ptr<Portal> portal(Face face) = 0; 0035 0036 /// Set the portal associated to the given face. 0037 /// @param portal The portal to set 0038 /// @param face The face to set the portal 0039 virtual void setPortal(std::shared_ptr<Portal> portal, Face face) = 0; 0040 0041 /// @copydoc PortalShellBase::fill 0042 void fill(TrackingVolume& volume) override; 0043 }; 0044 0045 /// Output stream operator for the TrapezoidPortalShell::Face enum 0046 /// @param os The output stream 0047 /// @param face The face to output 0048 /// @return The output stream 0049 std::ostream& operator<<(std::ostream& os, TrapezoidPortalShell::Face face); 0050 0051 /// @class SingleTrapezoidPortalShell 0052 /// This class describes a trapezoid shell containing a single volume. 0053 class SingleTrapezoidPortalShell : public TrapezoidPortalShell { 0054 public: 0055 /// Construct a single trapezoid shell for the given tracking volume. 0056 /// @param volume The volume to create the shell for 0057 explicit SingleTrapezoidPortalShell(TrackingVolume& volume); 0058 0059 /// @copydoc PortalShellBase::size 0060 std::size_t size() const override; 0061 0062 /// @copydoc TrapezoidPortalShell::portal 0063 std::shared_ptr<Portal> portal(Face face) override; 0064 0065 /// @copydoc TrapezoidPortalShell::setPortal 0066 void setPortal(std::shared_ptr<Portal> portal, Face face) override; 0067 0068 /// @copydoc PortalShellBase::applyToVolume 0069 void applyToVolume() override; 0070 0071 /// @copydoc PortalShellBase::isValid 0072 bool isValid() const override; 0073 0074 /// @copydoc PortalShellBase::label 0075 std::string label() const override; 0076 0077 private: 0078 std::array<std::shared_ptr<Portal>, 6> m_portals{}; 0079 0080 TrackingVolume* m_volume; 0081 }; 0082 0083 } // namespace Acts
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|