15 #ifndef BORNAGAIN_CORE_DETECTOR_IDETECTOR_H
16 #define BORNAGAIN_CORE_DETECTOR_IDETECTOR_H
48 void addAxis(
const IAxis& axis);
50 const IAxis& getAxis(
size_t index)
const;
56 size_t axisBinIndex(
size_t index,
size_t selected_axis)
const;
66 double total_transmission);
106 std::vector<const INode*>
getChildren()
const override;
108 void iterate(std::function<
void(const_iterator)> func,
bool visit_masks =
false)
const;
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;
128 std::unique_ptr<IDetectorResolution> mP_detector_resolution;
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 applyDetectorResolution(OutputData< double > *p_intensity_map) const
Applies the detector resolution to the given intensity maps.
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.
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.
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.
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.
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.