BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
IsGISAXSDetector.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Device/Detector/IsGISAXSDetector.h
6 //! @brief Defines class IsGISAXSDetector.
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 #ifndef BORNAGAIN_DEVICE_DETECTOR_ISGISAXSDETECTOR_H
16 #define BORNAGAIN_DEVICE_DETECTOR_ISGISAXSDETECTOR_H
17 
19 
20 //! A spherical detector used for validation with IsGISAXS results.
21 //! @ingroup detector
22 
24 public:
26  IsGISAXSDetector(size_t n_phi, double phi_min, double phi_max, size_t n_alpha, double alpha_min,
27  double alpha_max);
28  IsGISAXSDetector(const IsGISAXSDetector& other);
29 
30  IsGISAXSDetector* clone() const override;
31 
32  void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
33 
34 protected:
35  //! Generates an axis with correct name and default binning for given index
36  std::unique_ptr<IAxis> createAxis(size_t index, size_t n_bins, double min,
37  double max) const override;
38 
39  //! Returns index of pixel that contains the specular wavevector.
40  //! If no pixel contains this specular wavevector, the number of pixels is
41  //! returned. This corresponds to an overflow index.
42  size_t indexOfSpecular(const Beam& beam) const override;
43 };
44 
45 #endif // BORNAGAIN_DEVICE_DETECTOR_ISGISAXSDETECTOR_H
Defines class SphericalDetector.
An incident neutron or x-ray beam.
Definition: Beam.h:27
Visitor interface to visit ISampleNode objects.
Definition: INodeVisitor.h:146
A spherical detector used for validation with IsGISAXS results.
std::unique_ptr< IAxis > createAxis(size_t index, size_t n_bins, double min, double max) const override
Generates an axis with correct name and default binning for given index.
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
IsGISAXSDetector * clone() const override
size_t indexOfSpecular(const Beam &beam) const override
Returns index of pixel that contains the specular wavevector.
A detector with coordinate axes along angles phi and alpha.