15 #ifndef BORNAGAIN_CORE_DETECTOR_RECTANGULARDETECTOR_H 
   16 #define BORNAGAIN_CORE_DETECTOR_RECTANGULARDETECTOR_H 
   29     enum EDetectorArrangement {
 
   31         PERPENDICULAR_TO_SAMPLE,
 
   32         PERPENDICULAR_TO_DIRECT_BEAM,
 
   33         PERPENDICULAR_TO_REFLECTED_BEAM,
 
   34         PERPENDICULAR_TO_REFLECTED_BEAM_DPOS
 
   52     void init(
const Beam& beam) 
override;
 
   54     void setPosition(
const kvector_t normal_to_detector, 
double u0, 
double v0,
 
   57     void setPerpendicularToSampleX(
double distance, 
double u0, 
double v0);
 
   58     void setPerpendicularToDirectBeam(
double distance, 
double u0, 
double v0);
 
   59     void setPerpendicularToReflectedBeam(
double distance, 
double u0 = 0.0, 
double v0 = 0.0);
 
   61     void setDirectBeamPosition(
double u0, 
double v0);
 
   63     double getWidth() 
const;
 
   64     double getHeight() 
const;
 
   65     size_t getNbinsX() 
const;
 
   66     size_t getNbinsY() 
const;
 
   71     double getDistance() 
const;
 
   72     double getDirectBeamU0() 
const;
 
   73     double getDirectBeamV0() 
const;
 
   74     EDetectorArrangement getDetectorArrangment() 
const;
 
   86     std::string 
axisName(
size_t index) 
const override;
 
   97     void setDistanceAndOffset(
double distance, 
double u0, 
double v0);
 
   98     void initNormalVector(
const kvector_t central_k);
 
   99     void initUandV(
double alpha_i);
 
  105     double m_dbeam_u0, m_dbeam_v0; 
 
  106     EDetectorArrangement m_detector_arrangement;
 
Defines interface IDetector2D.
 
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 init(const Beam &beam) override
Inits detector with the beam settings.
 
Axes::Units defaultAxesUnits() const override
return default axes units
 
size_t indexOfSpecular(const Beam &beam) const override
Returns index of pixel that contains the specular wavevector.
 
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.
 
std::string axisName(size_t index) const override
Returns the name for the axis with given index.
 
RectangularDetector(size_t nxbins, double width, size_t nybins, double height)
Rectangular detector constructor.
 
void swapContent(RectangularDetector &other)
swap function
 
A pixel in a RectangularDetector.