Mantid
|
Defines a flat, rectangular beam profile that has a width, height and center point. More...
#include <RectangularBeamProfile.h>
Public Member Functions | |
Geometry::BoundingBox | defineActiveRegion (const Geometry::BoundingBox &) 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... | |
Kernel::V3D | maxPoint () const |
Returns the max point of the profile. More... | |
Kernel::V3D | minPoint () const |
Returns the min point of the profile. More... | |
RectangularBeamProfile (const Geometry::ReferenceFrame &frame, const Kernel::V3D ¢er, double width, double height) | |
Construct a beam profile. 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 |
const double | m_height |
const unsigned short | m_horIdx |
Kernel::V3D | m_min |
const unsigned short | m_upIdx |
const double | m_width |
Defines a flat, rectangular beam profile that has a width, height and center point.
The profile is assumed infinitely thin.
Definition at line 25 of file RectangularBeamProfile.h.
Mantid::Algorithms::RectangularBeamProfile::RectangularBeamProfile | ( | const Geometry::ReferenceFrame & | frame, |
const Kernel::V3D & | center, | ||
double | width, | ||
double | height | ||
) |
Construct a beam profile.
frame | Defines the direction of the beam, up and horizontal |
center | V3D defining the central point of the rectangle |
width | Width of beam |
height | Height of beam |
Definition at line 26 of file RectangularBeamProfile.cpp.
References height, m_beamDir, m_beamIdx, m_horIdx, m_min, and m_upIdx.
|
overridevirtual |
Compute a region that defines how the beam illuminates the given sample/can.
sampleBox | A reference to the bounding box of the sample |
Implements Mantid::Algorithms::IBeamProfile.
Definition at line 81 of file RectangularBeamProfile.cpp.
References m_beamIdx, m_height, m_horIdx, m_min, m_upIdx, m_width, maxPoint(), Mantid::Geometry::BoundingBox::maxPoint(), minPoint(), Mantid::Geometry::BoundingBox::minPoint(), Mantid::Kernel::V3D::X(), Mantid::Kernel::V3D::Y(), and Mantid::Kernel::V3D::Z().
|
overridevirtual |
Generate a random point within the beam profile using the supplied random number source.
rng | A reference to a random number generator |
Implements Mantid::Algorithms::IBeamProfile.
Definition at line 42 of file RectangularBeamProfile.cpp.
References m_beamDir, m_beamIdx, m_height, m_horIdx, m_min, m_upIdx, m_width, and Mantid::Kernel::PseudoRandomNumberGenerator::nextValue().
Referenced by generatePoint().
|
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.
rng | A reference to a random number generator |
bounds | A reference to the bounding area that defines the maximum allowed region for the generated point. |
Implements Mantid::Algorithms::IBeamProfile.
Definition at line 59 of file RectangularBeamProfile.cpp.
References generatePoint(), m_horIdx, m_upIdx, Mantid::Geometry::BoundingBox::maxPoint(), and Mantid::Geometry::BoundingBox::minPoint().
|
inline |
Returns the max point of the profile.
Definition at line 36 of file RectangularBeamProfile.h.
Referenced by defineActiveRegion().
|
inline |
Returns the min point of the profile.
Definition at line 34 of file RectangularBeamProfile.h.
References m_min.
Referenced by defineActiveRegion().
|
private |
Definition at line 50 of file RectangularBeamProfile.h.
Referenced by generatePoint(), and RectangularBeamProfile().
|
private |
Definition at line 45 of file RectangularBeamProfile.h.
Referenced by defineActiveRegion(), generatePoint(), and RectangularBeamProfile().
|
private |
Definition at line 48 of file RectangularBeamProfile.h.
Referenced by defineActiveRegion(), and generatePoint().
|
private |
Definition at line 46 of file RectangularBeamProfile.h.
Referenced by defineActiveRegion(), generatePoint(), and RectangularBeamProfile().
|
private |
Definition at line 49 of file RectangularBeamProfile.h.
Referenced by defineActiveRegion(), generatePoint(), and RectangularBeamProfile().
|
private |
Definition at line 44 of file RectangularBeamProfile.h.
Referenced by defineActiveRegion(), generatePoint(), and RectangularBeamProfile().
|
private |
Definition at line 47 of file RectangularBeamProfile.h.
Referenced by defineActiveRegion(), and generatePoint().