Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::Experimental::Portal Class Reference

#include <acts/blob/sPHENIX/Core/include/Acts/Detector/Portal.hpp>

+ Inheritance diagram for Acts::Experimental::Portal:
+ Collaboration diagram for Acts::Experimental::Portal:

Public Types

using DetectorVolumeUpdators = std::array< DetectorVolumeUpdator, 2u >
 The volume links forward/backward with respect to the surface normal.
 
using AttachedDetectorVolumes = std::array< std::vector< std::shared_ptr< DetectorVolume >>, 2u >
 

Public Member Functions

std::shared_ptr< PortalgetSharedPtr ()
 
std::shared_ptr< const PortalgetSharedPtr () const
 
 Portal ()=delete
 
virtual ~Portal ()=default
 
const Surfacesurface () const
 Const access to the surface representation.
 
Surfacesurface ()
 Non-const access to the surface reference.
 
void updateDetectorVolume (const GeometryContext &gctx, NavigationState &nState) const noexcept(false)
 
void assignGeometryId (const GeometryIdentifier &geometryId)
 
void fuse (std::shared_ptr< Portal > &other) noexcept(false)
 
void assignDetectorVolumeUpdator (Direction dir, DetectorVolumeUpdator dVolumeUpdator, std::vector< std::shared_ptr< DetectorVolume >> attachedVolumes)
 
void assignDetectorVolumeUpdator (DetectorVolumeUpdator dVolumeUpdator, std::vector< std::shared_ptr< DetectorVolume >> attachedVolumes) noexcept(false)
 
const DetectorVolumeUpdatorsdetectorVolumeUpdators () const
 
AttachedDetectorVolumesattachedDetectorVolumes ()
 

Static Public Member Functions

static std::shared_ptr< PortalmakeShared (std::shared_ptr< Surface > surface)
 Factory for producing memory managed instances of Portal.
 

Protected Member Functions

 Portal (std::shared_ptr< Surface > surface)
 

Private Attributes

std::shared_ptr< Surfacem_surface
 The surface representation of this portal.
 
DetectorVolumeUpdators m_volumeUpdators
 The portal targets along/opposite the normal vector.
 
AttachedDetectorVolumes m_attachedVolumes
 The portal attaches to the following volumes.
 

Friends

class DetectorVolume
 Declare the DetectorVolume friend for portal setting.
 

Detailed Description

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.

Definition at line 43 of file Portal.hpp.

View newest version in sPHENIX GitHub at line 43 of file Portal.hpp

Member Typedef Documentation

using Acts::Experimental::Portal::AttachedDetectorVolumes = std::array<std::vector<std::shared_ptr<DetectorVolume>>, 2u>

The vector of attached volumes forward/backward, this is useful in the geometry building

Definition at line 57 of file Portal.hpp.

View newest version in sPHENIX GitHub at line 57 of file Portal.hpp

The volume links forward/backward with respect to the surface normal.

Definition at line 52 of file Portal.hpp.

View newest version in sPHENIX GitHub at line 52 of file Portal.hpp

Constructor & Destructor Documentation

Acts::Experimental::Portal::Portal ( std::shared_ptr< Surface surface)
protected

Constructor from surface w/o portal links

Parameters
surfaceis the representing surface

Definition at line 27 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 27 of file Portal.cpp

References m_surface, and throw_assert.

Acts::Experimental::Portal::Portal ( )
delete
virtual Acts::Experimental::Portal::~Portal ( )
virtualdefault

Member Function Documentation

void Acts::Experimental::Portal::assignDetectorVolumeUpdator ( Direction  dir,
DetectorVolumeUpdator  dVolumeUpdator,
std::vector< std::shared_ptr< DetectorVolume >>  attachedVolumes 
)

Update the volume link

Parameters
dirthe direction of the link
dVolumeUpdatoris the mangaged volume updator delegate
attachedVolumesis the list of attached volumes for book keeping
Note
this overwrites the existing link

Definition at line 96 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 96 of file Portal.cpp

References ambiguity_solver_full_chain::idx, Acts::Direction::index(), and testing::internal::move().

Referenced by Acts::Experimental::detail::PortalHelper::attachDetectorVolumesUpdator(), and Acts::Experimental::detail::PortalHelper::attachDetectorVolumeUpdator().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Acts::Experimental::Portal::assignDetectorVolumeUpdator ( DetectorVolumeUpdator  dVolumeUpdator,
std::vector< std::shared_ptr< DetectorVolume >>  attachedVolumes 
)
noexcept

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

Parameters
dVolumeUpdatoris the mangaged volume updator delegate
attachedVolumesis the list of attached volumes for book keeping
Note
this overwrites the existing link

Definition at line 104 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 104 of file Portal.cpp

References ambiguity_solver_full_chain::idx, testing::internal::move(), and physmon_ckf_tracking::u.

+ Here is the call graph for this function:

void Acts::Experimental::Portal::assignGeometryId ( const GeometryIdentifier geometryId)

Set the geometry identifier (to the underlying surface)

Parameters
geometryIdthe geometry identifier to be assigned

Definition at line 65 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 65 of file Portal.cpp

Acts::Experimental::Portal::AttachedDetectorVolumes & Acts::Experimental::Portal::attachedDetectorVolumes ( )

Definition at line 51 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 51 of file Portal.cpp

const Acts::Experimental::Portal::DetectorVolumeUpdators & Acts::Experimental::Portal::detectorVolumeUpdators ( ) const

Definition at line 46 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 46 of file Portal.cpp

Referenced by Acts::Svg::PortalConverter::convert(), Acts::GeometryView3D::drawPortal(), Acts::PortalJsonConverter::toJson(), and Acts::PortalJsonConverter::toJsonDetray().

+ Here is the caller graph for this function:

void Acts::Experimental::Portal::fuse ( std::shared_ptr< Portal > &  other)
noexcept

Fuse with another portal, this one is kept

Parameters
otheris the portal that will be fused
Note
this will move the portal links from the other into this volume, it will throw an exception if the portals are not fusable
that other will be overwritten to point to this

Definition at line 70 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 70 of file Portal.cpp

References Acts::Direction::Backward, Acts::Direction::Forward, Acts::Direction::index(), Acts::Direction::invert(), and testing::internal::move().

+ Here is the call graph for this function:

std::shared_ptr< Acts::Experimental::Portal > Acts::Experimental::Portal::getSharedPtr ( )

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 a bad_weak_ptr exception), in C++17 it is defined as that exception.
Only call this if you need shared ownership of this object.
Returns
The shared pointer

Definition at line 56 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 56 of file Portal.cpp

std::shared_ptr< const Acts::Experimental::Portal > Acts::Experimental::Portal::getSharedPtr ( ) const

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 a bad_weak_ptr exception, in C++17 it is defined as that exception.
Only call this if you need shared ownership of this object.
Returns
The shared pointer

Definition at line 61 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 61 of file Portal.cpp

std::shared_ptr< Acts::Experimental::Portal > Acts::Experimental::Portal::makeShared ( std::shared_ptr< Surface surface)
static

Factory for producing memory managed instances of Portal.

Definition at line 33 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 33 of file Portal.cpp

References testing::internal::move().

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Acts::Surface & Acts::Experimental::Portal::surface ( ) const

Const access to the surface representation.

Definition at line 37 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 37 of file Portal.cpp

Referenced by Acts::Experimental::GeometryIdGenerator::assignGeometryId(), Acts::Experimental::detail::PortalHelper::attachDetectorVolumesUpdator(), Acts::Svg::PortalConverter::convert(), Acts::GeometryView3D::drawPortal(), Acts::PortalJsonConverter::toJson(), and Acts::PortalJsonConverter::toJsonDetray().

+ Here is the caller graph for this function:

Acts::Surface & Acts::Experimental::Portal::surface ( )

Non-const access to the surface reference.

Definition at line 41 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 41 of file Portal.cpp

void Acts::Experimental::Portal::updateDetectorVolume ( const GeometryContext gctx,
NavigationState nState 
) const
noexcept

Update the current volume

Parameters
gctxis the Geometry context of this call
nState[in,out] the navigation state for the volume to be updated

Definition at line 120 of file Portal.cpp.

View newest version in sPHENIX GitHub at line 120 of file Portal.cpp

References Acts::Experimental::NavigationState::currentVolume, Acts::Experimental::NavigationState::direction, Acts::Direction::fromScalar(), Acts::Direction::index(), Acts::Experimental::NavigationState::position, position, and writeMapConfig::surface.

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class DetectorVolume
friend

Declare the DetectorVolume friend for portal setting.

Definition at line 60 of file Portal.hpp.

View newest version in sPHENIX GitHub at line 60 of file Portal.hpp

Member Data Documentation

AttachedDetectorVolumes Acts::Experimental::Portal::m_attachedVolumes
private

The portal attaches to the following volumes.

Definition at line 157 of file Portal.hpp.

View newest version in sPHENIX GitHub at line 157 of file Portal.hpp

std::shared_ptr<Surface> Acts::Experimental::Portal::m_surface
private

The surface representation of this portal.

Definition at line 150 of file Portal.hpp.

View newest version in sPHENIX GitHub at line 150 of file Portal.hpp

Referenced by Portal().

DetectorVolumeUpdators Acts::Experimental::Portal::m_volumeUpdators
private
Initial value:

The portal targets along/opposite the normal vector.

Definition at line 153 of file Portal.hpp.

View newest version in sPHENIX GitHub at line 153 of file Portal.hpp


The documentation for this class was generated from the following files: