15 #ifndef BORNAGAIN_CORE_PIXEL_SIMULATIONELEMENT_H
16 #define BORNAGAIN_CORE_PIXEL_SIMULATIONELEMENT_H
32 std::unique_ptr<IPixel> pixel);
59 double getWavelength()
const {
return m_wavelength; }
60 double getAlphaI()
const {
return m_alpha_i; }
61 double getPhiI()
const {
return m_phi_i; }
62 double getAlphaMean()
const {
return getAlpha(0.5, 0.5); }
63 double getPhiMean()
const {
return getPhi(0.5, 0.5); }
64 void setIntensity(
double intensity) { m_intensity = intensity; }
65 void addIntensity(
double intensity) { m_intensity += intensity; }
66 double getIntensity()
const {
return m_intensity; }
72 double getIntegrationFactor(
double x,
double y)
const;
74 double getSolidAngle()
const;
76 double getAlpha(
double x,
double y)
const;
77 double getPhi(
double x,
double y)
const;
80 void setSpecular(
bool is_specular) { m_is_specular = is_specular; }
88 kvector_t getKf(
double x,
double y)
const;
91 double m_wavelength, m_alpha_i, m_phi_i;
95 std::unique_ptr<IPixel> mP_pixel;
Defines complex_t, and a few elementary functions.
Defines pure virtual interface IPixel (has no cpp file)
Defines class PolarizationHandler.
Interface for a function that maps [0,1]x[0,1] to the kvectors in a pixel.
Convenience class for handling polarization density matrix and polarization analyzer operator.
void setPolarization(const Eigen::Matrix2cd &polarization)
Sets the polarization density matrix (in spin basis along z-axis)
void setAnalyzerOperator(const Eigen::Matrix2cd &analyzer)
Sets the polarization analyzer operator (in spin basis along z-axis)
Data stucture containing both input and output of a single detector cell.
void setSpecular(bool is_specular)
Set specularity indication on/off.
void setPolarization(const Eigen::Matrix2cd &polarization)
Sets the polarization density matrix (in spin basis along z-axis)
void setAnalyzerOperator(const Eigen::Matrix2cd &polarization_operator)
Sets the polarization analyzer operator (in spin basis along z-axis)
kvector_t getQ(double x, double y) const
Returns scattering vector Q, with Kf determined from in-pixel coordinates x,y.
const PolarizationHandler & polarizationHandler() const
Returns assigned PolarizationHandler.
bool isSpecular() const
Tells if simulation element corresponds to a specular peak.