15 #ifndef BORNAGAIN_CORE_DETECTOR_IDETECTOR_H
16 #define BORNAGAIN_CORE_DETECTOR_IDETECTOR_H
56 size_t axisBinIndex(
size_t index,
size_t selected_axis)
const;
66 double total_transmission);
106 std::vector<const INode*>
getChildren()
const override;
116 virtual std::string
axisName(
size_t index)
const = 0;
119 virtual std::unique_ptr<IAxis>
createAxis(
size_t index,
size_t n_bins,
double min,
124 const std::vector<SimulationElement>& elements)
const;
Defines and implements templated class CloneableVector.
Defines class DetectionProperties.
Defines interface IUnitConverter and possible axis units.
Defines class SimulationAreaIterator.
Beam defined by wavelength, direction and intensity.
Detector properties (efficiency, transmission).
Collection of detector masks.
Interface for one-dimensional axes.
Interface for polymorphic classes that should not be copied, except by explicit cloning.
Interface for detector resolution algorithms.
Abstract detector interface.
void setDataToDetectorMap(OutputData< double > &detectorMap, const std::vector< SimulationElement > &elements) const
void applyDetectorResolution(OutputData< double > *p_intensity_map) const
Applies the detector resolution to the given intensity maps.
std::unique_ptr< IDetectorResolution > mP_detector_resolution
virtual std::string axisName(size_t index) const =0
Returns the name for the axis with given index.
virtual const DetectorMask * detectorMask() const =0
Returns detector masks container.
const SimulationAreaIterator & const_iterator
size_t dimension() const
Returns actual dimensionality of the detector (number of defined axes)
size_t axisBinIndex(size_t index, size_t selected_axis) const
Calculate axis index for given global index.
virtual std::unique_ptr< IAxis > createAxis(size_t index, size_t n_bins, double min, double max) const
Generates an axis with correct name and default binning for given index.
std::vector< const INode * > getChildren() const override
Returns a vector of children (const).
size_t totalSize() const
Returns total number of pixels.
size_t numberOfSimulationElements() const
Returns number of simulation elements.
const IAxis & getAxis(size_t index) const
void setResolutionFunction(const IResolutionFunction2D &resFunc)
DetectionProperties m_detection_properties
CloneableVector< IAxis > m_axes
void setAnalyzerProperties(const kvector_t direction, double efficiency, double total_transmission)
Sets the polarization analyzer characteristics of the detector.
virtual void init(const Beam &)
Inits detector with the beam settings.
void addAxis(const IAxis &axis)
OutputData< double > * createDetectorIntensity(const std::vector< SimulationElement > &elements) const
Returns new intensity map with detector resolution applied.
void setDetectorResolution(const IDetectorResolution &p_detector_resolution)
Sets the detector resolution.
std::unique_ptr< OutputData< double > > createDetectorMap() const
Returns empty detector map in given axes units.
virtual void resetRegionOfInterest()=0
Resets region of interest making whole detector plane available for the simulation.
void iterate(std::function< void(const_iterator)> func, bool visit_masks=false) const
IDetector * clone() const override=0
const IDetectorResolution * detectorResolution() const
Returns a pointer to detector resolution object.
void removeDetectorResolution()
Removes detector resolution function.
virtual const RegionOfInterest * regionOfInterest() const =0
Returns region of interest if exists.
virtual Axes::Units defaultAxesUnits() const
Return default axes units.
const DetectionProperties & detectionProperties() const
Returns detection properties.
Base class for tree-like structures containing parameterized objects.
Interface providing two-dimensional resolution function.
Template class to store data of any type in multi-dimensional space.
Defines rectangular area for the detector which will be simulated/fitted.
An iterator for SimulationArea.
Data stucture containing both input and output of a single detector cell.