File indexing completed on 2026-09-13 08:19:12
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Geometry/PortalShell.hpp"
0010
0011 #include "Acts/Geometry/CuboidPortalShell.hpp"
0012 #include "Acts/Geometry/CylinderPortalShell.hpp"
0013 #include "Acts/Geometry/DiamondPortalShell.hpp"
0014 #include "Acts/Geometry/TrackingVolume.hpp"
0015 #include "Acts/Geometry/TrapezoidPortalShell.hpp"
0016 #include "Acts/Geometry/VolumeBounds.hpp"
0017
0018 #include <stdexcept>
0019
0020 namespace Acts {
0021
0022 std::unique_ptr<PortalShellBase> PortalShellBase::makeSingle(
0023 const GeometryContext& gctx, TrackingVolume& volume) {
0024 switch (volume.volumeBounds().type()) {
0025 case VolumeBounds::eCylinder:
0026 return std::make_unique<SingleCylinderPortalShell>(gctx, volume);
0027 case VolumeBounds::eCuboid:
0028 return std::make_unique<SingleCuboidPortalShell>(gctx, volume);
0029 case VolumeBounds::eTrapezoid:
0030 return std::make_unique<SingleTrapezoidPortalShell>(gctx, volume);
0031 case VolumeBounds::eDiamond:
0032 return std::make_unique<SingleDiamondPortalShell>(gctx, volume);
0033 default:
0034 throw std::logic_error("Volume type is not supported");
0035 }
0036 }
0037
0038 }