27 :
IBeamProfile(), m_upIdx(frame.pointingUp()), m_beamIdx(frame.pointingAlongBeam()),
28 m_horIdx(frame.pointingHorizontal()), m_radius(
radius),
m_min(), m_center(center), m_beamDir() {
44 const double R = std::sqrt(rng.
nextValue() * rsq);
45 const double theta = rng.
nextValue() * M_PI * 2;
67 auto &rngPt = rngRay.startPos;
90 const auto &sampleMin(sampleBox.
minPoint());
91 const auto &sampleMax(sampleBox.
maxPoint());
92 V3D minPoint, maxPoint;
CircularBeamProfile(const Geometry::ReferenceFrame &frame, const Kernel::V3D ¢er, double radius)
Construct a beam profile.
const unsigned short m_beamIdx
const unsigned short m_horIdx
const unsigned short m_upIdx
IBeamProfile::Ray generatePoint(Kernel::PseudoRandomNumberGenerator &rng) const override
Generate a random point within the beam profile using the supplied random number source.
std::array< double, 3 > m_min
Geometry::BoundingBox defineActiveRegion(const Geometry::BoundingBox &sampleBox) const override
Compute a region that defines how the beam illuminates the given sample/can.
Base class for all classes defining a beam profile.
A simple structure that defines an axis-aligned cuboid shaped bounding box for a geometrical object.
const Kernel::V3D & minPoint() const
Returns the min point of the box.
const Kernel::V3D & maxPoint() const
Returns the min point of the box.
ReferenceFrame : Holds reference frame information from the geometry description file.
Defines a 1D pseudo-random number generator, i.e.
virtual double nextValue()=0
Return the next double in the sequence.
constexpr double X() const noexcept
Get x.
constexpr double Y() const noexcept
Get y.
constexpr double Z() const noexcept
Get z.
Helper class which provides the Collimation Length for SANS instruments.