BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SphericalPixel.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Device/Detector/SphericalPixel.h
6 //! @brief Defines class SphericalPixel.
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_SPHERICALPIXEL_H
21 #define BORNAGAIN_DEVICE_DETECTOR_SPHERICALPIXEL_H
22 
23 #include "Base/Pixel/IPixel.h"
24 
25 struct Bin1D;
26 
27 //! A pixel in a SphericalDetector
28 
29 class SphericalPixel : public IPixel {
30 public:
31  SphericalPixel(const Bin1D& alpha_bin, const Bin1D& phi_bin);
32 
33  SphericalPixel* clone() const override;
34  SphericalPixel* createZeroSizePixel(double x, double y) const override;
35  kvector_t getK(double x, double y, double wavelength) const override;
36  double integrationFactor(double x, double y) const override;
37  double solidAngle() const override;
38 
39 private:
40  const double m_alpha;
41  const double m_phi;
42  const double m_dalpha;
43  const double m_dphi;
44  mutable double m_solid_angle;
45 };
46 
47 #endif // BORNAGAIN_DEVICE_DETECTOR_SPHERICALPIXEL_H
48 #endif // USER_API
Defines and implements interface IPixel.
Interface for a function that maps [0,1]x[0,1] to the kvectors in a pixel.
Definition: IPixel.h:25
A pixel in a SphericalDetector.
const double m_dalpha
double solidAngle() const override
const double m_dphi
SphericalPixel * createZeroSizePixel(double x, double y) const override
SphericalPixel * clone() const override
double m_solid_angle
const double m_alpha
SphericalPixel(const Bin1D &alpha_bin, const Bin1D &phi_bin)
double integrationFactor(double x, double y) const override
kvector_t getK(double x, double y, double wavelength) const override
const double m_phi
Definition: Bin.h:20