16 #include "Base/Const/Units.h"
17 #include "Device/Detector/SphericalDetector.h"
32 "Resolution function",
"Detector resolution function",
"resolutionFunction",
33 initResolutionFunction);
35 m_phiAxis.initNbins(
"Nbins",
"Number of phi-axis bins");
36 m_phiAxis.initMin(
"Min",
"Lower edge of first phi-bin", -1.0,
Unit::degree,
37 RealLimits::limited(-90, 90));
38 m_phiAxis.initMax(
"Max",
"Upper edge of last phi-bin", 1.0,
Unit::degree,
39 RealLimits::limited(-90, 90));
41 m_alphaAxis.initNbins(
"Nbins",
"Number of alpha-axis bins");
42 m_alphaAxis.initMin(
"Min",
"Lower edge of first alpha-bin", 0.0,
Unit::degree,
43 RealLimits::limited(-90, 90));
44 m_alphaAxis.initMax(
"Max",
"Upper edge of last alpha-bin", 2.0,
Unit::degree,
45 RealLimits::limited(-90, 90));
56 m_phiAxis.rwAxisProperty(s,
"phiAxis");
57 m_alphaAxis.rwAxisProperty(s,
"alphaAxis");
65 const int n_x = m_phiAxis.nbins();
66 const double x_min = Units::deg2rad(m_phiAxis.min());
67 const double x_max = Units::deg2rad(m_phiAxis.max());
69 const int n_y = m_alphaAxis.nbins();
70 const double y_min = Units::deg2rad(m_alphaAxis.min());
71 const double y_max = Units::deg2rad(m_alphaAxis.max());
73 return std::make_unique<SphericalDetector>(n_x, x_min, x_max, n_y, y_min, y_max);
78 return m_phiAxis.nbins();
83 return m_alphaAxis.nbins();
88 m_phiAxis.setNbins(nx);
93 m_alphaAxis.setNbins(ny);
Defines class ResolutionFunctionItemCatalog.
Defines family of ResolutionFunctionItem.
Defines class SphericalDetectorItem.
MaskItems m_maskItems
for creation of domain detector; only filled and relevant in jobs
SelectionProperty< ResolutionFunctionItem * > m_resolutionFunction
virtual void setUnit(const std::variant< QString, Unit > &)
Set the unit of the distributed value.
void initWithInitializer(const QString &label, const QString &tooltip, const QString &persistentTag, std::function< void(T newItem, const T oldItem)> initializer)
Initialize by means of a catalog class and an initializer function.
int xSize() const override
Returns the size of x-axis of the detector.
void setYSize(size_t ny) override
sets the size of y-axis of the detector
std::unique_ptr< IDetector > createDomainDetector() const override
int ySize() const override
Returns the size of y-axis of the detector.
void serialize(Streamer &s) override
void setXSize(size_t nx) override
sets the size of x-axis of the detector
double axesToCoreUnitsFactor() const override
Scales the values provided by axes (to perform deg->rad conversion on the way to domain).
Supports serialization to or deserialization from QXmlStream.
QXmlStreamReader * xmlReader()
Returns stream reader or nullptr.
void assertVersion(unsigned expectedVersion) const
As reader, throws DeserializationException unless the expected version is read. As writer,...
void rwClass(Streamer &s, const QString &tag, T &t)
Serializes an item from a class that provides the function void serialize(Streamer&).