BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SpecularDetector1D.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Device/Detector/SpecularDetector1D.h
6 //! @brief Defines a detector for specular simulations.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_DEVICE_DETECTOR_SPECULARDETECTOR1D_H
21 #define BORNAGAIN_DEVICE_DETECTOR_SPECULARDETECTOR1D_H
22 
24 
26 
27 //! 1D detector for specular simulations. Use of this detector is deprecated.
28 //! @ingroup detector
29 
30 class SpecularDetector1D : public IDetector {
31 public:
35 
36  SpecularDetector1D* clone() const override;
37 
38  void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
39 
40  //! Returns detector masks container.
41  const DetectorMask* detectorMask() const override { return nullptr; }
42 
43  //! Returns region of interest if exists.
44  const RegionOfInterest* regionOfInterest() const override { return nullptr; }
45 
46  void resetRegionOfInterest() override {}
47 
48  // Set the angular axis. A SpecularDetector1D can only have a single axis
49  void setAxis(const IAxis& axis);
50 
51  //! Return default axes units
52  Axes::Units defaultAxesUnits() const override;
53 
54 protected:
56 
57  //! Returns the name for the axis with given index
58  std::string axisName(size_t index) const override;
59 
60  void initialize();
61 };
62 
63 #endif // BORNAGAIN_DEVICE_DETECTOR_SPECULARDETECTOR1D_H
64 #endif // USER_API
Defines common detector interface.
Collection of detector masks.
Definition: DetectorMask.h:28
Interface for one-dimensional axes.
Definition: IAxis.h:25
Abstract detector interface.
Definition: IDetector.h:36
const IAxis & axis(size_t index) const
Definition: IDetector.cpp:56
Visitor interface to visit ISampleNode objects.
Definition: INodeVisitor.h:146
virtual void visit(const BasicLattice2D *)
Definition: INodeVisitor.h:151
Defines rectangular area for the detector which will be simulated/fitted.
1D detector for specular simulations.
const DetectorMask * detectorMask() const override
Returns detector masks container.
const RegionOfInterest * regionOfInterest() const override
Returns region of interest if exists.
void setAxis(const IAxis &axis)
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
virtual ~SpecularDetector1D()
void resetRegionOfInterest() override
Resets region of interest making whole detector plane available for the simulation.
SpecularDetector1D * clone() const override
std::string axisName(size_t index) const override
Returns the name for the axis with given index.
Axes::Units defaultAxesUnits() const override
Return default axes units.
Data stucture containing both input and output of a single image pixel for specular simulation.