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

Defines a single instance of a SampleEnvironment. More...

#include <SampleEnvironment.h>

Public Member Functions

void add (const IObject_const_sptr &component)
 
Geometry::BoundingBox boundingBox () const
 
const std::string containerID () const
 
const IObjectgetComponent (const size_t index) const
 Returns the requested IObject. More...
 
const IObject_const_sptr getComponentPtr (const size_t index) const
 
const ContainergetContainer () const
 
int interceptSurfaces (Track &track) const
 Update the given track with intersections within the environment. More...
 
bool isValid (const Kernel::V3D &point) const
 Is the point given a valid point within the environment. More...
 
const std::string name () const
 
size_t nelements () const
 
 SampleEnvironment (std::string name, const Container_const_sptr &getContainer)
 Constructor specifying a name for the environment. More...
 

Private Attributes

std::vector< IObject_const_sptrm_components
 
std::string m_name
 

Detailed Description

Defines a single instance of a SampleEnvironment.

It houses a single can along with the other components specified by a SampleEnvironmentSpec.

Definition at line 26 of file SampleEnvironment.h.

Constructor & Destructor Documentation

◆ SampleEnvironment()

Mantid::Geometry::SampleEnvironment::SampleEnvironment ( std::string  name,
const Container_const_sptr container 
)

Constructor specifying a name for the environment.

It is empty by default and required by various other users of it

Parameters
nameA human-readable name for the kit
containerThe object that represents the can

Definition at line 30 of file SampleEnvironment.cpp.

Member Function Documentation

◆ add()

void Mantid::Geometry::SampleEnvironment::add ( const IObject_const_sptr component)
Parameters
componentAn object defining some component of the environment

Definition at line 86 of file SampleEnvironment.cpp.

References m_components.

◆ boundingBox()

Geometry::BoundingBox Mantid::Geometry::SampleEnvironment::boundingBox ( ) const

◆ containerID()

const std::string Mantid::Geometry::SampleEnvironment::containerID ( ) const
inline
Returns
The name of can

Definition at line 33 of file SampleEnvironment.h.

◆ getComponent()

const IObject & Mantid::Geometry::SampleEnvironment::getComponent ( const size_t  index) const

◆ getComponentPtr()

const IObject_const_sptr Mantid::Geometry::SampleEnvironment::getComponentPtr ( const size_t  index) const

◆ getContainer()

const Container & Mantid::Geometry::SampleEnvironment::getContainer ( ) const
inline

◆ interceptSurfaces()

int Mantid::Geometry::SampleEnvironment::interceptSurfaces ( Track track) const

Update the given track with intersections within the environment.

Parameters
trackThe track is updated with an intersection with the environment
Returns
The total number of segments added to the track

Definition at line 78 of file SampleEnvironment.cpp.

References m_components.

Referenced by Mantid::Algorithms::MCInteractionVolume::calculateBeforeAfterTrack(), Mantid::Algorithms::DiscusMultipleScatteringCorrection::scatter(), and Mantid::Algorithms::DiscusMultipleScatteringCorrection::start_point().

◆ isValid()

bool Mantid::Geometry::SampleEnvironment::isValid ( const Kernel::V3D point) const

Is the point given a valid point within the environment.

Parameters
pointIs the point valid within the environment
Returns
True if the point is within the environment

Definition at line 67 of file SampleEnvironment.cpp.

References m_components.

◆ name()

const std::string Mantid::Geometry::SampleEnvironment::name ( ) const
inline
Returns
The name of kit

Definition at line 31 of file SampleEnvironment.h.

◆ nelements()

size_t Mantid::Geometry::SampleEnvironment::nelements ( ) const
inline

Member Data Documentation

◆ m_components

std::vector<IObject_const_sptr> Mantid::Geometry::SampleEnvironment::m_components
private

◆ m_name

std::string Mantid::Geometry::SampleEnvironment::m_name
private

Definition at line 60 of file SampleEnvironment.h.


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