BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RectangularPixel.h
Go to the documentation of this file.
1
// ************************************************************************** //
2
//
3
// BornAgain: simulate and fit scattering at grazing incidence
4
//
5
//! @file Device/Detector/RectangularPixel.h
6
//! @brief Defines class RectangularPixel.
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_CORE_DETECTOR_RECTANGULARPIXEL_H
16
#define BORNAGAIN_CORE_DETECTOR_RECTANGULARPIXEL_H
17
18
#include "
Base/Pixel/IPixel.h
"
19
20
//! A pixel in a RectangularDetector.
21
22
class
RectangularPixel
:
public
IPixel
23
{
24
public
:
25
RectangularPixel
(
kvector_t
corner_pos,
kvector_t
width,
kvector_t
height);
26
27
RectangularPixel
* clone()
const override
;
28
RectangularPixel
* createZeroSizePixel(
double
x,
double
y)
const override
;
29
kvector_t
getK(
double
x,
double
y,
double
wavelength)
const override
;
30
kvector_t
getPosition(
double
x,
double
y)
const
;
31
double
getIntegrationFactor(
double
x,
double
y)
const override
;
32
double
getSolidAngle()
const override
;
33
34
private
:
35
kvector_t
normalizeLength(
const
kvector_t
direction,
double
length)
const
;
36
double
calculateSolidAngle()
const
;
37
kvector_t
m_corner_pos;
38
kvector_t
m_width;
39
kvector_t
m_height;
40
double
m_solid_angle;
41
kvector_t
m_normal;
42
};
43
44
#endif
// BORNAGAIN_CORE_DETECTOR_RECTANGULARPIXEL_H
IPixel.h
Defines pure virtual interface IPixel (has no cpp file)
BasicVector3D< double >
IPixel
Interface for a function that maps [0,1]x[0,1] to the kvectors in a pixel.
Definition:
IPixel.h:24
RectangularPixel
A pixel in a RectangularDetector.
Definition:
RectangularPixel.h:23
Device
Detector
RectangularPixel.h
Generated by
1.9.1