diff --git a/Core/Binning/SimulationElement.cpp b/Core/Binning/SimulationElement.cpp index e9c8340340fc3229498036a04056fb57c9aaa198..aaee117d627b1573fef62b29d8623d131c907f68 100644 --- a/Core/Binning/SimulationElement.cpp +++ b/Core/Binning/SimulationElement.cpp @@ -21,14 +21,15 @@ SimulationElement::SimulationElement(double wavelength, double alpha_i, double phi_i, const IPixelMap* pixelmap) : m_wavelength(wavelength), m_alpha_i(alpha_i), m_phi_i(phi_i), m_intensity(0.0) + , m_contains_specular(false) { mP_pixel_map.reset(pixelmap->clone()); initPolarization(); } SimulationElement::SimulationElement(const SimulationElement &other) - : m_wavelength(other.m_wavelength), m_alpha_i(other.m_alpha_i), m_phi_i(other.m_phi_i), - m_intensity(other.m_intensity) + : m_wavelength(other.m_wavelength), m_alpha_i(other.m_alpha_i), m_phi_i(other.m_phi_i) + , m_intensity(other.m_intensity), m_contains_specular(other.m_contains_specular) { mP_pixel_map.reset(other.mP_pixel_map->clone()); m_polarization = other.m_polarization; @@ -47,8 +48,8 @@ SimulationElement& SimulationElement::operator=(const SimulationElement &other) } SimulationElement::SimulationElement(const SimulationElement &other, double x, double y) - : m_wavelength(other.m_wavelength), m_alpha_i(other.m_alpha_i), m_phi_i(other.m_phi_i), - m_intensity(other.m_intensity) + : m_wavelength(other.m_wavelength), m_alpha_i(other.m_alpha_i), m_phi_i(other.m_phi_i) + , m_intensity(other.m_intensity), m_contains_specular(other.m_contains_specular) { mP_pixel_map.reset(other.mP_pixel_map->createZeroSizeMap(x, y)); m_polarization = other.m_polarization; @@ -84,6 +85,7 @@ void SimulationElement::swapContent(SimulationElement &other) std::swap(m_polarization, other.m_polarization); std::swap(m_analyzer_operator, other.m_analyzer_operator); std::swap(mP_pixel_map, other.mP_pixel_map); + std::swap(m_contains_specular, other.m_contains_specular); } void SimulationElement::initPolarization() @@ -108,6 +110,11 @@ bool SimulationElement::containsSpecularWavevector() const return mP_pixel_map->contains(k); } +void SimulationElement::setSpecular(bool contains_specular) +{ + m_contains_specular = contains_specular; +} + kvector_t SimulationElement::getK(double x, double y) const { return mP_pixel_map->getK(x, y, m_wavelength); } diff --git a/Core/Binning/SimulationElement.h b/Core/Binning/SimulationElement.h index 845ce0c4dd8e41ceef923067182ef026ad1a0760..2a2067051a7dc42f2fe8e93f7c14da14a0c9b4d9 100644 --- a/Core/Binning/SimulationElement.h +++ b/Core/Binning/SimulationElement.h @@ -85,6 +85,9 @@ public: //! check if element contains given wavevector bool containsSpecularWavevector() const; + //! indicate that this element contains the specular wavevector + void setSpecular(bool contains_specular); + private: //! swap function void swapContent(SimulationElement &other); @@ -99,6 +102,7 @@ private: Eigen::Matrix2cd m_analyzer_operator; //!< polarization analyzer operator #endif std::unique_ptr<IPixelMap> mP_pixel_map; + bool m_contains_specular; };