16 #ifndef BORNAGAIN_DEVICE_DETECTOR_IDETECTOR_H
17 #define BORNAGAIN_DEVICE_DETECTOR_IDETECTOR_H
52 double total_transmission);
62 std::vector<const INode*>
getChildren()
const override;
70 size_t axisBinIndex(
size_t index,
size_t selected_axis)
const;
82 const DetectionProperties& detectionProperties() const { return m_detection_properties; }
104 virtual std::string
axisName(
size_t index)
const = 0;
107 virtual std::unique_ptr<IAxis>
createAxis(
size_t index,
size_t n_bins,
double min,
112 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.
An incident neutron or x-ray beam.
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.
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.
size_t totalSize() const
Returns total number of pixels.
size_t numberOfSimulationElements() const
Returns number of simulation elements.
std::unique_ptr< IDetectorResolution > m_detector_resolution
const IAxis & axis(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.
virtual const RegionOfInterest * regionOfInterest() const =0
Returns region of interest if exists.
virtual Axes::Units defaultAxesUnits() const
Return default axes units.
Base class for tree-like structures containing parameterized objects.
Interface providing two-dimensional resolution function.
Templated class to store data of type double or CumulativeValue 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.