15 #ifndef BORNAGAIN_CORE_DETECTOR_RECTANGULARDETECTOR_H
16 #define BORNAGAIN_CORE_DETECTOR_RECTANGULARDETECTOR_H
52 void init(
const Beam& beam)
override;
86 std::string
axisName(
size_t index)
const override;
Defines interface IDetector2D.
BasicVector3D< double > kvector_t
Beam defined by wavelength, direction and intensity.
Abstract 2D detector interface.
Visitor interface to visit ISample objects.
Interface for a function that maps [0,1]x[0,1] to the kvectors in a pixel.
A flat rectangular detector with axes and resolution function.
void setDirectBeamPosition(double u0, double v0)
double m_dbeam_v0
position of direct beam in detector coordinates
void initUandV(double alpha_i)
void init(const Beam &beam) override
Inits detector with the beam settings.
double getDistance() const
double m_v0
position of normal vector hitting point in detector coordinates
void setPerpendicularToSampleX(double distance, double u0, double v0)
void setPerpendicularToDirectBeam(double distance, double u0, double v0)
kvector_t m_direction
direction vector of detector coordinate system
@ PERPENDICULAR_TO_DIRECT_BEAM
@ PERPENDICULAR_TO_SAMPLE
@ PERPENDICULAR_TO_REFLECTED_BEAM_DPOS
@ PERPENDICULAR_TO_REFLECTED_BEAM
void initNormalVector(const kvector_t central_k)
void setPerpendicularToReflectedBeam(double distance, double u0=0.0, double v0=0.0)
kvector_t m_normal_to_detector
Axes::Units defaultAxesUnits() const override
return default axes units
EDetectorArrangement getDetectorArrangment() const
RectangularDetector * clone() const override
size_t indexOfSpecular(const Beam &beam) const override
Returns index of pixel that contains the specular wavevector.
void setPosition(const kvector_t normal_to_detector, double u0, double v0, const kvector_t direction=kvector_t(0.0, -1.0, 0.0))
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
IPixel * createPixel(size_t index) const override
Creates an IPixel for the given OutputData object and index.
double getDirectBeamV0() const
kvector_t getDirectionVector() const
double m_distance
distance from sample origin to the detector plane
std::string axisName(size_t index) const override
Returns the name for the axis with given index.
EDetectorArrangement m_detector_arrangement
double getDirectBeamU0() const
RectangularDetector(size_t nxbins, double width, size_t nybins, double height)
Rectangular detector constructor.
kvector_t getNormalVector() const
void setDistanceAndOffset(double distance, double u0, double v0)
void swapContent(RectangularDetector &other)
swap function
RectangularPixel * regionOfInterestPixel() const
A pixel in a RectangularDetector.