Skip to content
Snippets Groups Projects
Commit 0816055c authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

GUI use new Det2D API

parent 093fd44d
No related branches found
No related tags found
1 merge request!2189Detector2D now parameterized through width and center in phi,alpha (#854)
......@@ -59,12 +59,16 @@ std::unique_ptr<IDetector> DetectorItem::createDetector() const
const int n_x = m_phiAxis.nbins();
const double x_min = Units::deg2rad(m_phiAxis.min());
const double x_max = Units::deg2rad(m_phiAxis.max());
const double x_wid = x_max - x_min;
const double x_cen = (x_min + x_max) / 2;
const int n_y = m_alphaAxis.nbins();
const double y_min = Units::deg2rad(m_alphaAxis.min());
const double y_max = Units::deg2rad(m_alphaAxis.max());
const double y_wid = y_max - y_min;
const double y_cen = (y_min + y_max) / 2;
auto result = std::make_unique<OldDetec2D>(n_x, x_min, x_max, n_y, y_min, y_max);
auto result = std::make_unique<Detector2D>(x_wid, y_wid, n_x, n_y, x_cen, y_cen);
if (m_maskContainerItem) {
const QVector<MaskItem*> maskItems = m_maskContainerItem->maskItems();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment