15 #ifndef BORNAGAIN_DEVICE_DETECTOR_RECTANGULARDETECTOR_H
16 #define BORNAGAIN_DEVICE_DETECTOR_RECTANGULARDETECTOR_H
47 std::string
className() const final {
return "RectangularDetector"; }
52 R3 direction = R3(0.0, -1.0, 0.0));
85 std::string
axisName(
size_t index)
const override;
Defines common detector interface.
An incident neutron or x-ray beam.
Interface for objects that provide axis translations to different units for IDetector objects.
A direction in three-dimensional space.
Abstract base class for one-dimensional axes.
Interface to provide axis translations to different units for simulation output.
Abstract detector interface.
Interface for a function that maps [0,1]x[0,1] to the kvectors in a pixel. Abstract base class for Sp...
A flat rectangular detector with axes and resolution function.
R3 getDirectionVector() const
RectangularDetector(const RectangularDetector &other)
void initNormalVector(R3 central_k)
CoordSystem2D * scatteringCoords(const Beam &beam) const override
R3 m_direction
direction vector of detector coordinate system
R3 getNormalVector() const
void setDirectBeamPosition(double u0, double v0)
double m_dbeam_v0
position of direct beam in detector coordinates
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
void initUandV(double alpha_i)
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)
@ PERPENDICULAR_TO_DIRECT_BEAM
@ PERPENDICULAR_TO_SAMPLE
@ PERPENDICULAR_TO_REFLECTED_BEAM_DPOS
@ PERPENDICULAR_TO_REFLECTED_BEAM
void setPerpendicularToReflectedBeam(double distance, double u0=0.0, double v0=0.0)
~RectangularDetector() override
EDetectorArrangement getDetectorArrangment() const
Coords defaultCoords() const override
Returns default axes units.
RectangularDetector * clone() const override
size_t indexOfSpecular(const Beam &beam) const override
Returns index of pixel that contains the specular wavevector. If no pixel contains this specular wave...
void setDetectorPosition(R3 normal_to_detector, double u0, double v0, R3 direction=R3(0.0, -1.0, 0.0))
IPixel * createPixel(size_t index) const override
Creates an IPixel for the given Datafield object and index.
double getDirectBeamV0() 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
void setDetectorNormal(const Direction &direction) override
Inits detector with the beam settings.
RectangularDetector(size_t nxbins, double width, size_t nybins, double height)
Rectangular detector constructor.
ICoordSystem * offspecCoords(IAxis *beamAxis, const Direction &beamDirection) const override
void setDistanceAndOffset(double distance, double u0, double v0)
void swapContent(RectangularDetector &other)
swap function
RectangularPixel * regionOfInterestPixel() const
A pixel in a RectangularDetector.