44 m_d->ui.setupUi(
this);
57 connect(
m_d->ui.phisectionwidget,SIGNAL(enabledPhiRangesChanged(
const QList<VP1Interval>&)),
108 QList<VP1Interval> l;
110 if (!
m_d->ui.checkBox_cut_phi && !
m_d->ui.checkBox_phiCuts)
114 if ( !
m_d->ui.checkBox_cut_phi->isChecked() && !
m_d->ui.checkBox_phiCuts->isChecked() ) {
115 l <<
VP1Interval(-std::numeric_limits<double>::infinity(),std::numeric_limits<double>::infinity());
119 if (
m_d->ui.checkBox_cut_phi->isChecked() && ( !
m_d->ui.phisectionwidget ||
m_d->ui.phisectionwidget->allSectorsOff() ) )
122 if (
m_d->ui.checkBox_cut_phi->isChecked() &&
m_d->ui.phisectionwidget->allSectorsOn() ) {
123 l <<
VP1Interval(-std::numeric_limits<double>::infinity(),std::numeric_limits<double>::infinity());
125 }
else if (
m_d->ui.checkBox_cut_phi->isChecked() ) {
126 return m_d->ui.phisectionwidget->enabledPhiRanges();
128 if (
m_d->ui.checkBox_phiCuts->isChecked() ) {
129 double phi_min =
m_d->ui.dsb_phiCuts_min->value();
130 double phi_max =
m_d->ui.dsb_phiCuts_max->value();
131 return m_d->ui.phisectionwidget->enabledPhiRanges(phi_min, phi_max);
154 if (!
m_d->ui.checkBox_cut_etarange_forcesymmetric)
156 if (sender()==
m_d->ui.checkBox_cut_etarange_forcesymmetric) {
158 m_d->adaptSpinBoxRangesForSymmetry(
m_d->ui.checkBox_cut_etarange_forcesymmetric->isChecked());
159 if (
m_d->ui.checkBox_cut_etarange_forcesymmetric->isChecked()) {
161 const double eta = std::max(fabs(
m_d->ui.doubleSpinBox_cut_etalower->value()),fabs(
m_d->ui.doubleSpinBox_cut_etaupper->value()));
162 m_d->ui.doubleSpinBox_cut_etalower->setValue(-
eta);
163 m_d->ui.doubleSpinBox_cut_etaupper->setValue(
eta);
165 }
else if (
m_d->ui.checkBox_cut_etarange_forcesymmetric->isChecked()) {
167 if (sender()==
m_d->ui.doubleSpinBox_cut_etalower) {
168 m_d->ui.doubleSpinBox_cut_etaupper->setValue(-
m_d->ui.doubleSpinBox_cut_etalower->value());
169 }
else if (sender()==
m_d->ui.doubleSpinBox_cut_etaupper) {
170 m_d->ui.doubleSpinBox_cut_etalower->setValue(-
m_d->ui.doubleSpinBox_cut_etaupper->value());
252 const double rangemax =
m_d->ui.doubleSpinBox_cut_etaupper->maximum();
253 e1 = std::max(-rangemax,e1);
254 e1 = std::min(rangemax,e1);
255 e2 = std::max(-rangemax,e2);
256 e2 = std::min(rangemax,e2);
257 if (e1>=e2||e1!=e1||e2!=e2) {
262 bool save = blockSignals(
true);
263 bool save1 =
m_d->ui.doubleSpinBox_cut_etalower->blockSignals(
true);
264 bool save2 =
m_d->ui.doubleSpinBox_cut_etaupper->blockSignals(
true);
265 bool save3 =
m_d->ui.checkBox_cut_etarange->blockSignals(
true);
266 bool save4 =
m_d->ui.checkBox_cut_etarange_forcesymmetric->blockSignals(
true);
268 m_d->ui.checkBox_cut_etarange->setChecked(
true);
269 m_d->ui.checkBox_cut_etarange_forcesymmetric->setChecked(e1==-e2);
270 m_d->adaptSpinBoxRangesForSymmetry(e1==-e2);
271 m_d->ui.doubleSpinBox_cut_etalower->setValue(e1);
272 m_d->ui.doubleSpinBox_cut_etaupper->setValue(e2);
275 m_d->ui.doubleSpinBox_cut_etalower->blockSignals(save1);
276 m_d->ui.doubleSpinBox_cut_etaupper->blockSignals(save2);
277 m_d->ui.checkBox_cut_etarange->blockSignals(save3);
278 m_d->ui.checkBox_cut_etarange_forcesymmetric->blockSignals(save4);