Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::Direction Exception Referencefinal

#include <acts/blob/sPHENIX/Core/include/Acts/Definitions/Direction.hpp>

Public Member Functions

constexpr std::size_t index () const
 
constexpr int sign () const
 
constexpr Direction invert () const
 
std::string toString () const
 
constexpr Direction ()=default
 
constexpr Direction (Value value)
 
constexpr bool operator== (Direction other) const
 
constexpr bool operator!= (Direction other) const
 

Static Public Member Functions

static constexpr Direction fromScalar (ActsScalar scalar)
 
static constexpr Direction fromScalarZeroAsPositive (ActsScalar scalar)
 
static constexpr Direction fromIndex (std::size_t index)
 

Static Public Attributes

static constexpr auto Negative = Value::Negative
 
static constexpr auto Positive = Value::Positive
 
static constexpr auto Backward = Value::Negative
 
static constexpr auto Forward = Value::Positive
 

Private Types

enum  Value : int
 

Private Attributes

Value m_value = Value::Positive
 

Detailed Description

The direction is always with respect to a given momentum, surface normal or other general axes

Definition at line 22 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 22 of file Direction.hpp

Member Enumeration Documentation

enum Acts::Direction::Value : int
private

Definition at line 24 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 24 of file Direction.hpp

Constructor & Destructor Documentation

constexpr Acts::Direction::Direction ( )
inlinedefault
constexpr Acts::Direction::Direction ( Value  value)
inline

Definition at line 95 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 95 of file Direction.hpp

Member Function Documentation

static constexpr Direction Acts::Direction::fromIndex ( std::size_t  index)
inlinestatic

Convert and index [0,1] to a direction e.g. for sorting in std::array<T, 2u>

Parameters
indexis the direction at input

Definition at line 62 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 62 of file Direction.hpp

References physmon_ckf_tracking::u.

Referenced by BOOST_AUTO_TEST_CASE(), and Acts::Experimental::DetectorVolume::closePortals().

+ Here is the caller graph for this function:

static constexpr Direction Acts::Direction::fromScalar ( ActsScalar  scalar)
inlinestatic

This turns a signed value into a direction. Will assert on zero.

Parameters
scalaris the signed value
Returns
a direction enum

Definition at line 41 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 41 of file Direction.hpp

References assert.

Referenced by BOOST_AUTO_TEST_CASE(), Acts::TrackingVolume::glueTrackingVolume(), Acts::TrackingVolume::glueTrackingVolumes(), Acts::GenericCuboidVolumeBounds::orientedSurfaces(), transportFreely(), and Acts::Experimental::Portal::updateDetectorVolume().

+ Here is the caller graph for this function:

static constexpr Direction Acts::Direction::fromScalarZeroAsPositive ( ActsScalar  scalar)
inlinestatic

This turns a signed value into a direction and 0 will be handled as a positive direction. Only use this when you are convinced that the 0 case is properly handled downstream.

Parameters
scalaris the signed value
Returns
a direction enum

Definition at line 53 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 53 of file Direction.hpp

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_DATA_TEST_CASE(), and ActsExamples::VertexPerformanceWriter::writeT().

+ Here is the caller graph for this function:

constexpr std::size_t Acts::Direction::index ( ) const
inline

Convert dir to index [0,1] which allows to store direction dependent objects in std::array<T, 2u>

Returns
either 0 or 1

Definition at line 73 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 73 of file Direction.hpp

References m_value, and physmon_ckf_tracking::u.

Referenced by Acts::Experimental::Portal::assignDetectorVolumeUpdator(), Acts::Experimental::Portal::fuse(), and Acts::Experimental::Portal::updateDetectorVolume().

+ Here is the caller graph for this function:

constexpr Direction Acts::Direction::invert ( ) const
inline

Reverse the direction

Returns
an opposite direction

Definition at line 88 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 88 of file Direction.hpp

References m_value.

Referenced by Acts::Experimental::Portal::fuse().

+ Here is the caller graph for this function:

constexpr bool Acts::Direction::operator!= ( Direction  other) const
inline

Definition at line 101 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 101 of file Direction.hpp

References m_value.

constexpr bool Acts::Direction::operator== ( Direction  other) const
inline

Definition at line 97 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 97 of file Direction.hpp

References m_value.

constexpr int Acts::Direction::sign ( ) const
inline

Turns the direction into a signed value

Returns
a signed value

Definition at line 83 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 83 of file Direction.hpp

References m_value.

Referenced by Acts::operator*(), and Acts::operator*=().

+ Here is the caller graph for this function:

std::string Acts::Direction::toString ( ) const

Definition at line 13 of file Direction.cpp.

View newest version in sPHENIX GitHub at line 13 of file Direction.cpp

References assert, and m_value.

Referenced by Acts::operator<<().

+ Here is the caller graph for this function:

Member Data Documentation

Value Acts::Direction::m_value = Value::Positive
private

Definition at line 106 of file Direction.hpp.

View newest version in sPHENIX GitHub at line 106 of file Direction.hpp

Referenced by index(), invert(), operator!=(), operator==(), sign(), and toString().


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