59 "Instrument::initDetector() -> Error. Detector is not initialized.");
65 std::vector<const INode*> result;
74 m_detector->setResolutionFunction(p_resolution_function);
84 m_detector->applyDetectorResolution(p_intensity_map);
144 throw std::runtime_error(
"Error: Detector is not twodimensional");
153 throw std::runtime_error(
"Error: Detector is not twodimensional");
168 double total_transmission)
170 m_detector->setAnalyzerProperties(direction, efficiency, total_transmission);
#define ASSERT(condition)
Defines class Histogram2D.
Defines interface class IResolutionFunction2D.
Defines class Instrument.
Defines class SphericalDetector.
Beam defined by wavelength, direction and intensity.
void setPolarization(const kvector_t bloch_vector)
Sets the polarization density matrix according to the given Bloch vector.
void setIntensity(double intensity)
Sets the beam intensity in neutrons/sec.
double getIntensity() const
Returns the beam intensity in neutrons/sec.
void setCentralK(double wavelength, double alpha_i, double phi_i)
Sets the wavevector in terms of wavelength and incoming angles.
Collection of detector masks.
Interface for one-dimensional axes.
Abstract 2D detector interface.
Abstract detector interface.
IDetector * clone() const override=0
Base class for tree-like structures containing parameterized objects.
void registerChild(INode *node)
const std::string & getName() const
void setName(const std::string &name)
Interface providing two-dimensional resolution function.
Assembles beam, detector and their relative positions with respect to the sample.
void applyDetectorResolution(OutputData< double > *p_intensity_map) const
apply the detector resolution to the given intensity map
void setAnalyzerProperties(const kvector_t direction, double efficiency, double total_transmission)
Sets the polarization analyzer characteristics of the detector.
void setBeamIntensity(double intensity)
const IAxis & getDetectorAxis(size_t index) const
double getBeamIntensity() const
const DetectorMask * getDetectorMask() const
void setBeamParameters(double wavelength, double alpha_i, double phi_i)
Sets the beam wavelength and incoming angles.
void setDetector(const IDetector &detector)
Sets the detector (axes can be overwritten later)
void setDetectorResolutionFunction(const IResolutionFunction2D &p_resolution_function)
Sets detector resolution function.
void initDetector()
init detector with beam settings
void removeDetectorResolution()
Removes detector resolution function.
const IDetector * getDetector() const
std::vector< const INode * > getChildren() const
Returns a vector of children (const).
void setBeam(const Beam &beam)
size_t getDetectorDimension() const
void setBeamPolarization(const kvector_t bloch_vector)
Sets the beam's polarization according to the given Bloch vector.
IDetector2D & detector2D()
Instrument & operator=(const Instrument &other)
std::unique_ptr< IDetector > m_detector
A spherical detector with axes and resolution function.
const double wavelength(0.154)