Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Geometry::ReferenceFrame Class Reference

ReferenceFrame : Holds reference frame information from the geometry description file. More...

#include <ReferenceFrame.h>

Public Member Functions

Handedness getHandedness () const
 Gets the handedness. More...
 
bool isVectorPointingAlongBeam (const Mantid::Kernel::V3D &v) const
 Test whether or not a vector is in the beam direction. More...
 
std::string origin () const
 Gets the origin. More...
 
PointingAlong pointingAlongBeam () const
 Gets the beam pointing along direction. More...
 
std::string pointingAlongBeamAxis () const
 Pointing along beam axis as a string. More...
 
PointingAlong pointingHorizontal () const
 Gets the pointing horizontal direction, i.e perpendicular to up & along beam. More...
 
std::string pointingHorizontalAxis () const
 Pointing horizontal to beam as a string. More...
 
PointingAlong pointingUp () const
 Gets the pointing up direction. More...
 
std::string pointingUpAxis () const
 Pointing up axis as a string. More...
 
 ReferenceFrame ()
 Default constructor. More...
 
 ReferenceFrame (PointingAlong up, PointingAlong alongBeam, Handedness handedness, std::string origin)
 Constructor. More...
 
 ReferenceFrame (PointingAlong up, PointingAlong alongBeam, PointingAlong thetaSign, Handedness handedness, std::string origin)
 Alternative constructor with theta sign axis. More...
 
Mantid::Kernel::V3D vecPointingAlongBeam () const
 Convert along beam axis into a 3D direction. More...
 
Mantid::Kernel::V3D vecPointingHorizontal () const
 Convert along horizontal axis into a 3D direction. More...
 
Mantid::Kernel::V3D vecPointingUp () const
 Convert up axis into a 3D direction. More...
 
Mantid::Kernel::V3D vecThetaSign () const
 Convert along the axis defining the 2theta sign. More...
 
virtual ~ReferenceFrame ()=default
 Destructor. More...
 

Private Member Functions

ReferenceFrameoperator= (const ReferenceFrame &)
 Disabled assignment. More...
 

Private Attributes

PointingAlong m_alongBeam
 Beam pointing along axis. More...
 
Handedness m_handedness
 Handedness. More...
 
std::string m_origin
 Origin. More...
 
PointingAlong m_thetaSign
 Axis defining the 2theta sign. More...
 
PointingAlong m_up
 Pointing up axis. More...
 
Mantid::Kernel::V3D m_vecPointingAlongBeam
 Vector pointing along the beam. More...
 
Mantid::Kernel::V3D m_vecPointingUp
 Vector pointing up instrument. More...
 
Mantid::Kernel::V3D m_vecThetaSign
 Vector denoting the direction defining the 2theta sign. More...
 

Detailed Description

ReferenceFrame : Holds reference frame information from the geometry description file.

Date
2012-01-27

Definition at line 26 of file ReferenceFrame.h.

Constructor & Destructor Documentation

◆ ReferenceFrame() [1/3]

Mantid::Geometry::ReferenceFrame::ReferenceFrame ( )

Default constructor.

up=Y, beam=Z, thetaSign=Y

Definition at line 54 of file ReferenceFrame.cpp.

◆ ReferenceFrame() [2/3]

Mantid::Geometry::ReferenceFrame::ReferenceFrame ( PointingAlong  up,
PointingAlong  alongBeam,
Handedness  handedness,
std::string  origin 
)

Constructor.

Constructor specifying thetaSign=up.

Parameters
up:pointing up axis
alongBeam: axis pointing along the beam
handedness: Handedness
origin: origin

Definition at line 62 of file ReferenceFrame.cpp.

◆ ReferenceFrame() [3/3]

Mantid::Geometry::ReferenceFrame::ReferenceFrame ( PointingAlong  up,
PointingAlong  alongBeam,
PointingAlong  thetaSign,
Handedness  handedness,
std::string  origin 
)

Alternative constructor with theta sign axis.

Constructor specifying all attributes.

Parameters
up: pointing up axis
alongBeam: axis pointing along the beam
thetaSign: axis defining the sign of 2theta
handedness: Handedness
origin: origin

Definition at line 73 of file ReferenceFrame.cpp.

References m_alongBeam, m_thetaSign, m_up, m_vecPointingAlongBeam, m_vecPointingUp, and m_vecThetaSign.

◆ ~ReferenceFrame()

virtual Mantid::Geometry::ReferenceFrame::~ReferenceFrame ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getHandedness()

Handedness Mantid::Geometry::ReferenceFrame::getHandedness ( ) const

Gets the handedness.

Returns
handedness

Definition at line 143 of file ReferenceFrame.cpp.

References m_handedness.

Referenced by Mantid::DataHandling::SetSample::createFlatPlateHolderXML().

◆ isVectorPointingAlongBeam()

bool Mantid::Geometry::ReferenceFrame::isVectorPointingAlongBeam ( const Mantid::Kernel::V3D v) const

Test whether or not a vector is in the beam direction.

Convenience method for checking whether or not a vector is aligned with the along beam vector.

Parameters
vvector to be tested against along beam vector
Returns
result of whther the along beam and test vector are parallel.

Definition at line 180 of file ReferenceFrame.cpp.

References m_vecPointingAlongBeam, Mantid::Kernel::normalize(), and Mantid::Kernel::V3D::scalar_prod().

◆ operator=()

ReferenceFrame & Mantid::Geometry::ReferenceFrame::operator= ( const ReferenceFrame )
private

Disabled assignment.

◆ origin()

std::string Mantid::Geometry::ReferenceFrame::origin ( ) const

Gets the origin.

Returns
origin

Definition at line 148 of file ReferenceFrame.cpp.

References m_origin.

◆ pointingAlongBeam()

PointingAlong Mantid::Geometry::ReferenceFrame::pointingAlongBeam ( ) const

Gets the beam pointing along direction.

Returns
axis

Definition at line 96 of file ReferenceFrame.cpp.

References m_alongBeam.

Referenced by Mantid::DataHandling::SetSample::createFlatPlateHolderXML(), Mantid::DataHandling::SetSample::createFlatPlateXML(), and export_ReferenceFrame().

◆ pointingAlongBeamAxis()

std::string Mantid::Geometry::ReferenceFrame::pointingAlongBeamAxis ( ) const

Pointing along beam axis as a string.

Get the axis label for the pointing along direction.

Returns
label for up

Definition at line 108 of file ReferenceFrame.cpp.

References m_alongBeam.

Referenced by export_ReferenceFrame().

◆ pointingHorizontal()

PointingAlong Mantid::Geometry::ReferenceFrame::pointingHorizontal ( ) const

Gets the pointing horizontal direction, i.e perpendicular to up & along beam.

Returns
Axis that is perpendicular to Up & beam direction

Definition at line 121 of file ReferenceFrame.cpp.

References m_alongBeam, m_up, Mantid::Geometry::X, Mantid::Geometry::Y, and Mantid::Geometry::Z.

Referenced by Mantid::DataHandling::SetSample::createFlatPlateHolderXML(), Mantid::DataHandling::SetSample::createFlatPlateXML(), pointingHorizontalAxis(), and vecPointingHorizontal().

◆ pointingHorizontalAxis()

std::string Mantid::Geometry::ReferenceFrame::pointingHorizontalAxis ( ) const

Pointing horizontal to beam as a string.

Get the axis label for the pointing horizontal direction.

Returns
Axis label for the axis that is perpendicular to the beam and up direction in the instrument

Definition at line 115 of file ReferenceFrame.cpp.

References pointingHorizontal().

Referenced by export_ReferenceFrame().

◆ pointingUp()

PointingAlong Mantid::Geometry::ReferenceFrame::pointingUp ( ) const

Gets the pointing up direction.

Returns
axis

Definition at line 91 of file ReferenceFrame.cpp.

References m_up.

Referenced by Mantid::DataHandling::SetSample::createCylinderLikeXML(), Mantid::DataHandling::SetSample::createFlatPlateXML(), and export_ReferenceFrame().

◆ pointingUpAxis()

std::string Mantid::Geometry::ReferenceFrame::pointingUpAxis ( ) const

Pointing up axis as a string.

Get the axis label for the pointing up direction.

Returns
label for up

Definition at line 102 of file ReferenceFrame.cpp.

References m_up.

Referenced by export_ReferenceFrame().

◆ vecPointingAlongBeam()

V3D Mantid::Geometry::ReferenceFrame::vecPointingAlongBeam ( ) const

Convert along beam axis into a 3D direction.

Getter for the along beam vector.

Returns
along beam direction.

Definition at line 166 of file ReferenceFrame.cpp.

References m_vecPointingAlongBeam.

Referenced by export_ReferenceFrame().

◆ vecPointingHorizontal()

V3D Mantid::Geometry::ReferenceFrame::vecPointingHorizontal ( ) const

Convert along horizontal axis into a 3D direction.

Calculate the horizontal vector.

Returns
horizontal direction.

Definition at line 172 of file ReferenceFrame.cpp.

References pointingHorizontal().

◆ vecPointingUp()

V3D Mantid::Geometry::ReferenceFrame::vecPointingUp ( ) const

Convert up axis into a 3D direction.

Getter for the up instrument direction.

Returns
up direction.

Definition at line 154 of file ReferenceFrame.cpp.

References m_vecPointingUp.

Referenced by export_ReferenceFrame().

◆ vecThetaSign()

V3D Mantid::Geometry::ReferenceFrame::vecThetaSign ( ) const

Convert along the axis defining the 2theta sign.

Getter for the direction defining the theta sign.

Returns
theta sign direction.

Definition at line 160 of file ReferenceFrame.cpp.

References m_vecThetaSign.

Member Data Documentation

◆ m_alongBeam

PointingAlong Mantid::Geometry::ReferenceFrame::m_alongBeam
private

Beam pointing along axis.

Definition at line 71 of file ReferenceFrame.h.

Referenced by pointingAlongBeam(), pointingAlongBeamAxis(), pointingHorizontal(), and ReferenceFrame().

◆ m_handedness

Handedness Mantid::Geometry::ReferenceFrame::m_handedness
private

Handedness.

Definition at line 75 of file ReferenceFrame.h.

Referenced by getHandedness().

◆ m_origin

std::string Mantid::Geometry::ReferenceFrame::m_origin
private

Origin.

Definition at line 77 of file ReferenceFrame.h.

Referenced by origin().

◆ m_thetaSign

PointingAlong Mantid::Geometry::ReferenceFrame::m_thetaSign
private

Axis defining the 2theta sign.

Definition at line 73 of file ReferenceFrame.h.

Referenced by ReferenceFrame().

◆ m_up

PointingAlong Mantid::Geometry::ReferenceFrame::m_up
private

Pointing up axis.

Definition at line 69 of file ReferenceFrame.h.

Referenced by pointingHorizontal(), pointingUp(), pointingUpAxis(), and ReferenceFrame().

◆ m_vecPointingAlongBeam

Mantid::Kernel::V3D Mantid::Geometry::ReferenceFrame::m_vecPointingAlongBeam
private

Vector pointing along the beam.

Definition at line 79 of file ReferenceFrame.h.

Referenced by isVectorPointingAlongBeam(), ReferenceFrame(), and vecPointingAlongBeam().

◆ m_vecPointingUp

Mantid::Kernel::V3D Mantid::Geometry::ReferenceFrame::m_vecPointingUp
private

Vector pointing up instrument.

Definition at line 81 of file ReferenceFrame.h.

Referenced by ReferenceFrame(), and vecPointingUp().

◆ m_vecThetaSign

Mantid::Kernel::V3D Mantid::Geometry::ReferenceFrame::m_vecThetaSign
private

Vector denoting the direction defining the 2theta sign.

Definition at line 83 of file ReferenceFrame.h.

Referenced by ReferenceFrame(), and vecThetaSign().


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