29 double alpha_min,
double alpha_max)
36 :
SphericalDetector(n_bin, phi - width / 2, phi + width / 2, n_bin, alpha - width / 2,
53 return Axes::Units::RADIANS;
63 const Bin1D alpha_bin = alpha_axis.
bin(alpha_index);
64 const Bin1D phi_bin = phi_axis.
bin(phi_index);
76 throw std::runtime_error(
77 "SphericalDetector::getAxisName(size_t index) -> Error! index > 1");
Defines M_PI and some more mathematical constants.
Defines interface IDetectorResolution.
Defines class SimulationElement.
Defines class SphericalDetector.
Defines class SphericalPixel.
Defines some unit conversion factors and other constants in namespace Units.
An incident neutron or x-ray beam.
Direction direction() const
Interface for one-dimensional axes.
virtual bool contains(double value) const
Returns true if axis contains given point.
virtual size_t findClosestIndex(double value) const =0
find bin index which is best match for given value
virtual Bin1D bin(size_t index) const =0
retrieve a 1d bin for the given index
Abstract 2D detector interface.
void setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)
Sets detector parameters using angle ranges.
size_t getGlobalIndex(size_t x, size_t y) const
Calculate global index from two axis indices.
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.
size_t totalSize() const
Returns total number of pixels.
const IAxis & axis(size_t index) const
void setName(const std::string &name)
Interface for a function that maps [0,1]x[0,1] to the kvectors in a pixel.
A detector with coordinate axes along angles phi and alpha.
std::string axisName(size_t index) const override
Returns the name for the axis with given index.
size_t indexOfSpecular(const Beam &beam) const override
Returns index of pixel that contains the specular wavevector.
IPixel * createPixel(size_t index) const override
Creates an IPixel for the given OutputData object and index.
Axes::Units defaultAxesUnits() const override
return default axes units
SphericalDetector * clone() const override
A pixel in a SphericalDetector.