Class Acts::Experimental::Portal¶
-
class Portal : public std::enable_shared_from_this<Portal>¶
A portal description between the detector volumes.
It has a Surface representation for navigation and propagation and guides from one volume to the next.
The surface can carry material to allow mapping onto portal positions if required.
Public Types
-
using AttachedDetectorVolumes = std::array<std::vector<std::shared_ptr<DetectorVolume>>, 2u>¶
The vector of attached volumes forward/backward, this is useful in the geometry building.
-
using DetectorVolumeUpdators = std::array<DetectorVolumeUpdator, 2u>¶
The volume links forward/backward with respect to the surface normal.
Public Functions
-
Portal() = delete¶
-
virtual ~Portal() = default¶
Update the volume link.
Note
this overwrites the existing link
- Parameters
nDir – the navigation direction for the link
dVolumeUpdator – is the mangaged volume updator delegate
attachedVolumes – is the list of attached volumes for book keeping
Update the volume link, w/o directive, i.e.
it relies that there’s only one remaining link to be set, throws an exception if that’s not the case
Note
this overwrites the existing link
- Parameters
dVolumeUpdator – is the mangaged volume updator delegate
attachedVolumes – is the list of attached volumes for book keeping
-
void assignGeometryId(const GeometryIdentifier &geometryId)¶
Set the geometry identifier (to the underlying surface)
- Parameters
geometryId – the geometry identifier to be assigned
-
inline AttachedDetectorVolumes &attachedDetectorVolumes()¶
-
inline const DetectorVolumeUpdators &detectorVolumeUpdators() const¶
Fuse with another portal, this one is kept.
Note
this will move the portal links from the other into this volume, it will throw an exception if the portals are not fusable
Note
that other will be overwritten to point to this
- Parameters
other – is the portal that will be fused
Retrieve a
std::shared_ptr
for this surface (non-const version)Note
Will error if this was not created through the
makeShared
factory since it needs access to the original reference. In C++14 this is undefined behavior (but most likely implemented as abad_weak_ptr
exception), in C++17 it is defined as that exception.Note
Only call this if you need shared ownership of this object.
- Returns
The shared pointer
Retrieve a
std::shared_ptr
for this surface (const version)Note
Will error if this was not created through the
makeShared
factory since it needs access to the original reference. In C++14 this is undefined behavior, but most likely implemented as abad_weak_ptr
exception, in C++17 it is defined as that exception.Note
Only call this if you need shared ownership of this object.
- Returns
The shared pointer
Update the current volume.
- Parameters
gctx – is the Geometry context of this call
nState – [in,out] the navigation state for the volume to be updated
Public Static Functions
Factory for producing memory managed instances of Portal.
Will forward all parameters and will attempt to find a suitable constructor.
Friends
- friend class DetectorVolume
-
using AttachedDetectorVolumes = std::array<std::vector<std::shared_ptr<DetectorVolume>>, 2u>¶