Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Portal.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Portal.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2022 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
19 
20 #include <array>
21 #include <map>
22 #include <memory>
23 #include <optional>
24 #include <vector>
25 
26 namespace Acts {
27 
28 class ISurfaceMaterial;
29 class Surface;
30 
31 namespace Experimental {
32 class DetectorVolume;
33 struct NavigationState;
34 
43 class Portal : public std::enable_shared_from_this<Portal> {
44  protected:
48  Portal(std::shared_ptr<Surface> surface);
49 
50  public:
52  using DetectorVolumeUpdators = std::array<DetectorVolumeUpdator, 2u>;
53 
57  std::array<std::vector<std::shared_ptr<DetectorVolume>>, 2u>;
58 
60  friend class DetectorVolume;
61 
63  static std::shared_ptr<Portal> makeShared(std::shared_ptr<Surface> surface);
64 
74  std::shared_ptr<Portal> getSharedPtr();
75 
85  std::shared_ptr<const Portal> getSharedPtr() const;
86 
87  Portal() = delete;
88  virtual ~Portal() = default;
89 
91  const Surface& surface() const;
92 
94  Surface& surface();
95 
102  NavigationState& nState) const noexcept(false);
103 
107  void assignGeometryId(const GeometryIdentifier& geometryId);
108 
118  void fuse(std::shared_ptr<Portal>& other) noexcept(false);
119 
128  Direction dir, DetectorVolumeUpdator dVolumeUpdator,
129  std::vector<std::shared_ptr<DetectorVolume>> attachedVolumes);
130 
139  std::vector<std::shared_ptr<DetectorVolume>>
140  attachedVolumes) noexcept(false);
141 
142  // Access to the portal targets: opposite/along normal vector
144 
145  // Access to the attached volumes - non-const access
147 
148  private:
151 
155 
158 };
159 
160 } // namespace Experimental
161 } // namespace Acts