File indexing completed on 2025-04-04 07:57:32
0001
0002
0003
0004
0005
0006
0007
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
0021
0022
0023 class TrapezoidPortalShell : public PortalShellBase {
0024 public:
0025 using Face = TrapezoidVolumeBounds::Face;
0026
0027 using enum TrapezoidVolumeBounds::Face;
0028
0029
0030
0031
0032 virtual Portal* portal(Face face) = 0;
0033
0034
0035
0036
0037
0038 virtual std::shared_ptr<Portal> portalPtr(Face face) = 0;
0039
0040
0041
0042
0043 virtual void setPortal(std::shared_ptr<Portal> portal, Face face) = 0;
0044
0045
0046 void fill(TrackingVolume& volume) override;
0047
0048 virtual const Transform3& transform() const = 0;
0049 };
0050
0051
0052
0053
0054
0055 std::ostream& operator<<(std::ostream& os, TrapezoidPortalShell::Face face);
0056
0057
0058
0059 class SingleTrapezoidPortalShell : public TrapezoidPortalShell {
0060 public:
0061
0062
0063 explicit SingleTrapezoidPortalShell(TrackingVolume& volume);
0064
0065
0066 std::size_t size() const override;
0067
0068
0069 Portal* portal(Face face) override;
0070
0071
0072 std::shared_ptr<Portal> portalPtr(Face face) override;
0073
0074
0075 void setPortal(std::shared_ptr<Portal> portal, Face face) override;
0076
0077
0078 void applyToVolume() override;
0079
0080
0081 bool isValid() const override;
0082
0083
0084 std::string label() const override;
0085
0086 const Transform3& transform() const override {
0087 return m_volume->transform();
0088 };
0089
0090 private:
0091 std::array<std::shared_ptr<Portal>, 6> m_portals{};
0092
0093 TrackingVolume* m_volume;
0094 };
0095
0096 }