Mantid
|
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 IObject & | getComponent (const size_t index) const |
Returns the requested IObject. More... | |
const IObject_const_sptr | getComponentPtr (const size_t index) const |
const Container & | getContainer () 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_sptr > | m_components |
std::string | m_name |
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.
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
name | A human-readable name for the kit |
container | The object that represents the can |
Definition at line 30 of file SampleEnvironment.cpp.
void Mantid::Geometry::SampleEnvironment::add | ( | const IObject_const_sptr & | component | ) |
component | An object defining some component of the environment |
Definition at line 86 of file SampleEnvironment.cpp.
References m_components.
Geometry::BoundingBox Mantid::Geometry::SampleEnvironment::boundingBox | ( | ) | const |
Definition at line 54 of file SampleEnvironment.cpp.
References Mantid::Geometry::BoundingBox::grow(), and m_components.
Referenced by Mantid::Algorithms::BeamProfileFactory::createBeamProfile(), Mantid::Algorithms::MCInteractionVolume::getFullBoundingBox(), and Mantid::Algorithms::DiscusMultipleScatteringCorrection::prepareSampleBeamGeometry().
|
inline |
Definition at line 33 of file SampleEnvironment.h.
const IObject & Mantid::Geometry::SampleEnvironment::getComponent | ( | const size_t | index | ) | const |
Returns the requested IObject.
The zero-th index is considered the container
std::out_of_range |
Definition at line 33 of file SampleEnvironment.cpp.
References index, m_components, and nelements().
Referenced by Mantid::Algorithms::AbsorptionCorrection::constructSample(), export_SampleEnvironment(), Mantid::Algorithms::MCInteractionVolume::generatePointInObjectByIndex(), Mantid::Algorithms::MCInteractionStatistics::MCInteractionStatistics(), Mantid::Algorithms::MCInteractionVolume::MCInteractionVolume(), and Mantid::Algorithms::DiscusMultipleScatteringCorrection::prepareStructureFactors().
const IObject_const_sptr Mantid::Geometry::SampleEnvironment::getComponentPtr | ( | const size_t | index | ) | const |
Definition at line 42 of file SampleEnvironment.cpp.
References index, m_components, and nelements().
Referenced by Mantid::Algorithms::DiscusMultipleScatteringCorrection::prepareStructureFactors().
|
inline |
Definition at line 35 of file SampleEnvironment.h.
Referenced by Mantid::Algorithms::AbsorptionCorrection::constructSample(), Mantid::Algorithms::PaalmanPingsAbsorptionCorrection::constructSample(), export_SampleEnvironment(), Mantid::Algorithms::DiscusMultipleScatteringCorrection::prepareStructureFactors(), and Mantid::DataHandling::SetSample::setSampleShape().
int Mantid::Geometry::SampleEnvironment::interceptSurfaces | ( | Track & | track | ) | const |
Update the given track with intersections within the environment.
track | The track is updated with an intersection with the environment |
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().
bool Mantid::Geometry::SampleEnvironment::isValid | ( | const Kernel::V3D & | point | ) | const |
Is the point given a valid point within the environment.
point | Is the point valid within the environment |
Definition at line 67 of file SampleEnvironment.cpp.
References m_components.
|
inline |
Definition at line 31 of file SampleEnvironment.h.
|
inline |
Definition at line 42 of file SampleEnvironment.h.
Referenced by export_SampleEnvironment(), getComponent(), Mantid::Algorithms::MCInteractionVolume::getComponentIndex(), getComponentPtr(), Mantid::Algorithms::MCInteractionStatistics::MCInteractionStatistics(), Mantid::Algorithms::MCInteractionVolume::MCInteractionVolume(), Mantid::Algorithms::DiscusMultipleScatteringCorrection::prepareStructureFactors(), Mantid::Algorithms::DiscusMultipleScatteringCorrection::scatter(), and Mantid::Algorithms::DiscusMultipleScatteringCorrection::start_point().
|
private |
Definition at line 62 of file SampleEnvironment.h.
Referenced by add(), boundingBox(), getComponent(), getComponentPtr(), interceptSurfaces(), and isValid().
|
private |
Definition at line 60 of file SampleEnvironment.h.