Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Algorithms::CircularBeamProfile Class Referencefinal

Defines a flat, circular beam profile that has a radius and center point. More...

#include <CircularBeamProfile.h>

Inheritance diagram for Mantid::Algorithms::CircularBeamProfile:
Mantid::Algorithms::IBeamProfile

Public Member Functions

 CircularBeamProfile (const Geometry::ReferenceFrame &frame, const Kernel::V3D &center, double radius)
 Construct a beam profile. More...
 
Geometry::BoundingBox defineActiveRegion (const Geometry::BoundingBox &sampleBox) const override
 Compute a region that defines how the beam illuminates the given sample/can. More...
 
IBeamProfile::Ray generatePoint (Kernel::PseudoRandomNumberGenerator &rng) const override
 Generate a random point within the beam profile using the supplied random number source. More...
 
IBeamProfile::Ray generatePoint (Kernel::PseudoRandomNumberGenerator &rng, const Geometry::BoundingBox &bounds) const override
 Generate a random point on the profile that is within the given bounding area. More...
 
- Public Member Functions inherited from Mantid::Algorithms::IBeamProfile
virtual Geometry::BoundingBox defineActiveRegion (const Geometry::BoundingBox &) const =0
 
virtual Ray generatePoint (Kernel::PseudoRandomNumberGenerator &rng) const =0
 
virtual Ray generatePoint (Kernel::PseudoRandomNumberGenerator &rng, const Geometry::BoundingBox &) const =0
 
virtual ~IBeamProfile ()=default
 

Private Attributes

Kernel::V3D m_beamDir
 
const unsigned short m_beamIdx
 
Kernel::V3D m_center
 
const unsigned short m_horIdx
 
std::array< double, 3 > m_min
 
const double m_radius
 
const unsigned short m_upIdx
 

Detailed Description

Defines a flat, circular beam profile that has a radius and center point.

The profile is assumed infinitely thin.

Definition at line 25 of file CircularBeamProfile.h.

Constructor & Destructor Documentation

◆ CircularBeamProfile()

Mantid::Algorithms::CircularBeamProfile::CircularBeamProfile ( const Geometry::ReferenceFrame frame,
const Kernel::V3D center,
double  radius 
)

Construct a beam profile.

Parameters
frameDefines the direction of the beam, up and horizontal
centerV3D defining the central point of the circle
radiusRadius of beam

Definition at line 25 of file CircularBeamProfile.cpp.

References m_beamDir, m_beamIdx, m_center, m_horIdx, m_min, m_upIdx, and radius.

Member Function Documentation

◆ defineActiveRegion()

Geometry::BoundingBox Mantid::Algorithms::CircularBeamProfile::defineActiveRegion ( const Geometry::BoundingBox sampleBox) const
overridevirtual

Compute a region that defines how the beam illuminates the given sample/can.

Parameters
sampleBoxA reference to the bounding box of the sample
Returns
A BoundingBox defining the active region

Implements Mantid::Algorithms::IBeamProfile.

Definition at line 87 of file CircularBeamProfile.cpp.

References m_beamIdx, m_center, m_horIdx, m_min, m_radius, m_upIdx, Mantid::Geometry::BoundingBox::maxPoint(), Mantid::Geometry::BoundingBox::minPoint(), Mantid::Kernel::V3D::X(), Mantid::Kernel::V3D::Y(), and Mantid::Kernel::V3D::Z().

◆ generatePoint() [1/2]

IBeamProfile::Ray Mantid::Algorithms::CircularBeamProfile::generatePoint ( Kernel::PseudoRandomNumberGenerator rng) const
overridevirtual

Generate a random point within the beam profile using the supplied random number source.

Parameters
rngA reference to a random number generator
Returns
An IBeamProfile::Ray describing the start and direction

Implements Mantid::Algorithms::IBeamProfile.

Definition at line 41 of file CircularBeamProfile.cpp.

References m_beamDir, m_beamIdx, m_center, m_horIdx, m_radius, m_upIdx, and Mantid::Kernel::PseudoRandomNumberGenerator::nextValue().

Referenced by generatePoint().

◆ generatePoint() [2/2]

IBeamProfile::Ray Mantid::Algorithms::CircularBeamProfile::generatePoint ( Kernel::PseudoRandomNumberGenerator rng,
const Geometry::BoundingBox bounds 
) const
overridevirtual

Generate a random point on the profile that is within the given bounding area.

If the point is outside the area then it is pulled to the boundary of the bounding area.

Parameters
rngA reference to a random number generator
boundsA reference to the bounding area that defines the maximum allowed region for the generated point.
Returns
An IBeamProfile::Ray describing the start and direction

Implements Mantid::Algorithms::IBeamProfile.

Definition at line 64 of file CircularBeamProfile.cpp.

References generatePoint(), m_horIdx, m_upIdx, Mantid::Geometry::BoundingBox::maxPoint(), and Mantid::Geometry::BoundingBox::minPoint().

Member Data Documentation

◆ m_beamDir

Kernel::V3D Mantid::Algorithms::CircularBeamProfile::m_beamDir
private

Definition at line 41 of file CircularBeamProfile.h.

Referenced by CircularBeamProfile(), and generatePoint().

◆ m_beamIdx

const unsigned short Mantid::Algorithms::CircularBeamProfile::m_beamIdx
private

Definition at line 36 of file CircularBeamProfile.h.

Referenced by CircularBeamProfile(), defineActiveRegion(), and generatePoint().

◆ m_center

Kernel::V3D Mantid::Algorithms::CircularBeamProfile::m_center
private

Definition at line 40 of file CircularBeamProfile.h.

Referenced by CircularBeamProfile(), defineActiveRegion(), and generatePoint().

◆ m_horIdx

const unsigned short Mantid::Algorithms::CircularBeamProfile::m_horIdx
private

Definition at line 37 of file CircularBeamProfile.h.

Referenced by CircularBeamProfile(), defineActiveRegion(), and generatePoint().

◆ m_min

std::array<double, 3> Mantid::Algorithms::CircularBeamProfile::m_min
private

Definition at line 39 of file CircularBeamProfile.h.

Referenced by CircularBeamProfile(), and defineActiveRegion().

◆ m_radius

const double Mantid::Algorithms::CircularBeamProfile::m_radius
private

Definition at line 38 of file CircularBeamProfile.h.

Referenced by defineActiveRegion(), and generatePoint().

◆ m_upIdx

const unsigned short Mantid::Algorithms::CircularBeamProfile::m_upIdx
private

Definition at line 35 of file CircularBeamProfile.h.

Referenced by CircularBeamProfile(), defineActiveRegion(), and generatePoint().


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