15 #ifndef BORNAGAIN_CORE_PIXEL_SIMULATIONELEMENT_H
16 #define BORNAGAIN_CORE_PIXEL_SIMULATIONELEMENT_H
32 std::unique_ptr<IPixel> pixel);
76 double getAlpha(
double x,
double y)
const;
77 double getPhi(
double x,
double y)
const;
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.
PolarizationHandler m_polarization
void setSpecular(bool is_specular)
Set specularity indication on/off.
double getIntensity() const
std::unique_ptr< IPixel > mP_pixel
double getSolidAngle() const
double m_phi_i
wavelength and angles of beam
SimulationElement(double wavelength, double alpha_i, double phi_i, std::unique_ptr< IPixel > pixel)
double m_intensity
simulated intensity for detector cell
void swapContent(SimulationElement &other)
void addIntensity(double intensity)
kvector_t getMeanKf() const
double getWavelength() const
double getPhiMean() const
void setIntensity(double intensity)
double getIntegrationFactor(double x, double y) const
void setPolarization(const Eigen::Matrix2cd &polarization)
Sets the polarization density matrix (in spin basis along z-axis)
kvector_t getKf(double x, double y) const
Returns outgoing wavevector Kf for in-pixel coordinates x,y.
kvector_t m_mean_kf
cached value of mean_kf
kvector_t m_k_i
cached value of k_i
kvector_t getMeanQ() const
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.
double getAlphaMean() const
double getAlpha(double x, double y) const
bool isSpecular() const
Tells if simulation element corresponds to a specular peak.
SimulationElement & operator=(const SimulationElement &other)
double getPhi(double x, double y) const
const double wavelength(0.154)