89 m_d->ui.setupUi(
this);
97 auto cutsDialog = std::make_unique<QDialog>(
nullptr, Qt::WindowStaysOnTopHint);
98 m_d->ui_cuts.setupUi(cutsDialog.get());
99 cutsDialog->setSizeGripEnabled(
true);
100 cutsDialog->setMinimumSize(320, 240);
101 m_d->ui_cuts.cutsContentLayout->setAlignment(Qt::AlignTop);
102 QScreen* screen = QGuiApplication::screenAt(QCursor::pos());
104 screen = QGuiApplication::primaryScreen();
105 const QSize preferredSize(520, 640);
106 cutsDialog->resize(screen ? preferredSize.boundedTo(screen->availableGeometry().size() * 0.85)
108 initDialog(std::move(cutsDialog),
m_d->ui.pushButton_settings_cuts,
109 m_d->ui_cuts.pushButton_close);
111 m_d->ui_display.widget_drawOptions->setLineWidths(1.5);
112 m_d->ui_display.widget_drawOptions->setPointSizes(2.5);
113 m_d->ui_display.widget_drawOptions->setComplexityDisabled();
115 m_d->ui_cuts.etaPhiCutWidget->setEtaCutEnabled(
false);
170 connect(
m_d->ui_cuts.checkBox_mdtAllowedADCMin, &QCheckBox::toggled,
171 m_d->ui_cuts.spinBox_mdtAllowedADCMin, &QDoubleSpinBox::setEnabled);
174 connect(
m_d->ui_cuts.checkBox_mdtAllowedADCMax, &QCheckBox::toggled,
175 m_d->ui_cuts.spinBox_mdtAllowedADCMax, &QDoubleSpinBox::setEnabled);
179 connect(
m_d->ui_cuts.checkBox_mdtAllowedTDCMin, &QCheckBox::toggled,
180 m_d->ui_cuts.spinBox_mdtAllowedTDCMin, &QDoubleSpinBox::setEnabled);
183 connect(
m_d->ui_cuts.checkBox_mdtAllowedTDCMax, &QCheckBox::toggled,
184 m_d->ui_cuts.spinBox_mdtAllowedTDCMax, &QDoubleSpinBox::setEnabled);
188 connect(
m_d->ui_cuts.checkBox_mmAllowedChargeMin, &QCheckBox::toggled,
189 m_d->ui_cuts.spinBox_mmAllowedChargeMin, &QDoubleSpinBox::setEnabled);
192 connect(
m_d->ui_cuts.checkBox_mmAllowedChargeMax, &QCheckBox::toggled,
193 m_d->ui_cuts.spinBox_mmAllowedChargeMax, &QDoubleSpinBox::setEnabled);
197 connect(
m_d->ui_cuts.checkBox_mmAllowedTimeMin, &QCheckBox::toggled,
198 m_d->ui_cuts.spinBox_mmAllowedTimeMin, &QDoubleSpinBox::setEnabled);
201 connect(
m_d->ui_cuts.checkBox_mmAllowedTimeMax, &QCheckBox::toggled,
202 m_d->ui_cuts.spinBox_mmAllowedTimeMax, &QDoubleSpinBox::setEnabled);
206 connect(
m_d->ui_cuts.checkBox_stgcAllowedChargeMin, &QCheckBox::toggled,
207 m_d->ui_cuts.spinBox_stgcAllowedChargeMin, &QDoubleSpinBox::setEnabled);
210 connect(
m_d->ui_cuts.checkBox_stgcAllowedChargeMax, &QCheckBox::toggled,
211 m_d->ui_cuts.spinBox_stgcAllowedChargeMax, &QDoubleSpinBox::setEnabled);
215 connect(
m_d->ui_cuts.checkBox_stgcAllowedTimeMin, &QCheckBox::toggled,
216 m_d->ui_cuts.spinBox_stgcAllowedTimeMin, &QDoubleSpinBox::setEnabled);
219 connect(
m_d->ui_cuts.checkBox_stgcAllowedTimeMax, &QCheckBox::toggled,
220 m_d->ui_cuts.spinBox_stgcAllowedTimeMax, &QDoubleSpinBox::setEnabled);
238 connect(
m_d->ui_cuts.checkBox_rpcAllowedTimeMin, &QCheckBox::toggled,
239 m_d->ui_cuts.spinBox_rpcAllowedTimeMin, &QDoubleSpinBox::setEnabled);
242 connect(
m_d->ui_cuts.checkBox_rpcAllowedTimeMax, &QCheckBox::toggled,
243 m_d->ui_cuts.spinBox_rpcAllowedTimeMax, &QDoubleSpinBox::setEnabled);
247 connect(
m_d->ui_cuts.checkBox_rpcAllowedToTMin, &QCheckBox::toggled,
248 m_d->ui_cuts.spinBox_rpcAllowedToTMin, &QDoubleSpinBox::setEnabled);
251 connect(
m_d->ui_cuts.checkBox_rpcAllowedToTMax, &QCheckBox::toggled,
252 m_d->ui_cuts.spinBox_rpcAllowedToTMax, &QDoubleSpinBox::setEnabled);
300 s.save(
m_d->ui_cuts.etaPhiCutWidget);
301 s.save(
m_d->ui_cuts.checkBox_cut_indet_barrelA);
302 s.save(
m_d->ui_cuts.checkBox_cut_indet_barrelC);
303 s.save(
m_d->ui_cuts.checkBox_cut_indet_endcapA);
304 s.save(
m_d->ui_cuts.checkBox_cut_indet_endcapC);
305 s.save(
m_d->ui_cuts.checkbox_cut_trt_needHT);
306 s.save(
m_d->ui_cuts.checkbox_cut_trt_TotMin);
307 s.save(
m_d->ui_cuts.spinBox_cut_trt_ToTMin);
308 s.save(
m_d->ui_cuts.checkbox_cut_trt_TotMax);
309 s.save(
m_d->ui_cuts.spinBox_cut_trt_ToTMax);
310 s.save(
m_d->ui_display.checkBox_showVolumeOutLines);
311 s.save(
m_d->ui_display.widget_drawOptions);
312 s.save(
m_d->ui_display.checkBox_trtHTUseSpecialMat);
313 s.save(
m_d->ui_display.checkBox_bcmHighAttUseSpecialMat);
314 s.save(
m_d->ui_display.matButton_trtht);
315 s.save(
m_d->ui_display.matButton_bcmhighatt);
316 s.save(
m_d->ui_int.checkBox_printinfo);
317 s.save(
m_d->ui_int.checkBox_printinfo_verbose);
318 s.save(
m_d->ui_int.checkBox_zoom);
319 s.save(
m_d->ui_cuts.spinBox_lucid_qdc_min);
321 s.save(
m_d->ui_cuts.checkBox_mdtAllowedADCMin);
322 s.save(
m_d->ui_cuts.spinBox_mdtAllowedADCMin);
323 s.save(
m_d->ui_cuts.checkBox_mdtAllowedADCMax);
324 s.save(
m_d->ui_cuts.spinBox_mdtAllowedADCMax);
325 s.save(
m_d->ui_cuts.checkBox_mdtAllowedTDCMin);
326 s.save(
m_d->ui_cuts.spinBox_mdtAllowedTDCMin);
327 s.save(
m_d->ui_cuts.checkBox_mdtAllowedTDCMax);
328 s.save(
m_d->ui_cuts.spinBox_mdtAllowedTDCMax);
329 s.save(
m_d->ui_cuts.checkBox_mmAllowedChargeMin);
330 s.save(
m_d->ui_cuts.spinBox_mmAllowedChargeMin);
331 s.save(
m_d->ui_cuts.checkBox_mmAllowedChargeMax);
332 s.save(
m_d->ui_cuts.spinBox_mmAllowedChargeMax);
333 s.save(
m_d->ui_cuts.checkBox_mmAllowedTimeMin);
334 s.save(
m_d->ui_cuts.spinBox_mmAllowedTimeMin);
335 s.save(
m_d->ui_cuts.checkBox_mmAllowedTimeMax);
336 s.save(
m_d->ui_cuts.spinBox_mmAllowedTimeMax);
337 s.save(
m_d->ui_cuts.checkBox_stgcAllowedChargeMin);
338 s.save(
m_d->ui_cuts.spinBox_stgcAllowedChargeMin);
339 s.save(
m_d->ui_cuts.checkBox_stgcAllowedChargeMax);
340 s.save(
m_d->ui_cuts.spinBox_stgcAllowedChargeMax);
341 s.save(
m_d->ui_cuts.checkBox_stgcAllowedTimeMin);
342 s.save(
m_d->ui_cuts.spinBox_stgcAllowedTimeMin);
343 s.save(
m_d->ui_cuts.checkBox_stgcAllowedTimeMax);
344 s.save(
m_d->ui_cuts.spinBox_stgcAllowedTimeMax);
345 s.save(
m_d->ui_cuts.checkBox_mdtExcludeMasked);
347 s.save(
m_d->ui_cuts.checkBox_stgcShowPads);
348 s.save(
m_d->ui_cuts.checkBox_stgcShowStrips);
349 s.save(
m_d->ui_cuts.checkBox_stgcShowWires);
350 s.save(
m_d->ui_cuts.checkBox_stgcExcludeDead);
351 s.save(
m_d->ui_cuts.checkBox_stgcExcludePileup);
353 s.save(
m_d->ui_cuts.checkBox_tgcShowStrips);
354 s.save(
m_d->ui_cuts.checkBox_tgcShowWires);
355 s.save(
m_d->ui_cuts.checkBox_tgcShowPrevious);
356 s.save(
m_d->ui_cuts.checkBox_tgcShowCurrent);
357 s.save(
m_d->ui_cuts.checkBox_tgcShowNext);
358 s.save(
m_d->ui_cuts.checkBox_tgcShowNextNext);
359 s.save(
m_d->ui_cuts.checkBox_tgcShowUndefined);
360 s.save(
m_d->ui_cuts.checkBox_tgcShowUnknown);
362 s.save(
m_d->ui_cuts.checkBox_rpcShowEta);
363 s.save(
m_d->ui_cuts.checkBox_rpcShowPhi);
364 s.save(
m_d->ui_cuts.checkBox_rpcShowPrimarySide);
365 s.save(
m_d->ui_cuts.checkBox_rpcShowOppositeSide);
366 s.save(
m_d->ui_cuts.checkBox_rpcKeepMissingToT);
367 s.save(
m_d->ui_cuts.checkBox_rpcAllowedTimeMin);
368 s.save(
m_d->ui_cuts.spinBox_rpcAllowedTimeMin);
369 s.save(
m_d->ui_cuts.checkBox_rpcAllowedTimeMax);
370 s.save(
m_d->ui_cuts.spinBox_rpcAllowedTimeMax);
371 s.save(
m_d->ui_cuts.checkBox_rpcAllowedToTMin);
372 s.save(
m_d->ui_cuts.spinBox_rpcAllowedToTMin);
373 s.save(
m_d->ui_cuts.checkBox_rpcAllowedToTMax);
374 s.save(
m_d->ui_cuts.spinBox_rpcAllowedToTMax);
384 if (s.version()<0||s.version()>6) {
385 message(
"Warning: State data in .vp1 file has unsupported version ("+
str(s.version())+
")");
388 s.restore(
m_d->ui_cuts.etaPhiCutWidget);
389 s.restore(
m_d->ui_cuts.checkBox_cut_indet_barrelA);
390 s.restore(
m_d->ui_cuts.checkBox_cut_indet_barrelC);
391 s.restore(
m_d->ui_cuts.checkBox_cut_indet_endcapA);
392 s.restore(
m_d->ui_cuts.checkBox_cut_indet_endcapC);
393 s.restore(
m_d->ui_cuts.checkbox_cut_trt_needHT);
394 s.restore(
m_d->ui_cuts.checkbox_cut_trt_TotMin);
395 s.restore(
m_d->ui_cuts.spinBox_cut_trt_ToTMin);
396 s.restore(
m_d->ui_cuts.checkbox_cut_trt_TotMax);
397 s.restore(
m_d->ui_cuts.spinBox_cut_trt_ToTMax);
398 s.restore(
m_d->ui_display.checkBox_showVolumeOutLines);
399 s.restore(
m_d->ui_display.widget_drawOptions);
400 s.restore(
m_d->ui_display.checkBox_trtHTUseSpecialMat);
401 s.restore(
m_d->ui_display.checkBox_bcmHighAttUseSpecialMat);
402 s.restore(
m_d->ui_display.matButton_trtht);
403 s.restore(
m_d->ui_display.matButton_bcmhighatt);
404 s.restore(
m_d->ui_int.checkBox_printinfo);
405 s.restore(
m_d->ui_int.checkBox_printinfo_verbose);
406 s.restore(
m_d->ui_int.checkBox_zoom);
408 s.restore(
m_d->ui_cuts.spinBox_lucid_qdc_min);
409 if (s.version() >= 2) {
410 s.restore(
m_d->ui_cuts.checkBox_mdtAllowedADCMin);
411 s.restore(
m_d->ui_cuts.spinBox_mdtAllowedADCMin);
412 s.restore(
m_d->ui_cuts.checkBox_mdtAllowedADCMax);
413 s.restore(
m_d->ui_cuts.spinBox_mdtAllowedADCMax);
414 s.restore(
m_d->ui_cuts.checkBox_mdtAllowedTDCMin);
415 s.restore(
m_d->ui_cuts.spinBox_mdtAllowedTDCMin);
416 s.restore(
m_d->ui_cuts.checkBox_mdtAllowedTDCMax);
417 s.restore(
m_d->ui_cuts.spinBox_mdtAllowedTDCMax);
418 s.restore(
m_d->ui_cuts.checkBox_mmAllowedChargeMin);
419 s.restore(
m_d->ui_cuts.spinBox_mmAllowedChargeMin);
420 s.restore(
m_d->ui_cuts.checkBox_mmAllowedChargeMax);
421 s.restore(
m_d->ui_cuts.spinBox_mmAllowedChargeMax);
422 s.restore(
m_d->ui_cuts.checkBox_mmAllowedTimeMin);
423 s.restore(
m_d->ui_cuts.spinBox_mmAllowedTimeMin);
424 s.restore(
m_d->ui_cuts.checkBox_mmAllowedTimeMax);
425 s.restore(
m_d->ui_cuts.spinBox_mmAllowedTimeMax);
426 s.restore(
m_d->ui_cuts.checkBox_stgcAllowedChargeMin);
427 s.restore(
m_d->ui_cuts.spinBox_stgcAllowedChargeMin);
428 s.restore(
m_d->ui_cuts.checkBox_stgcAllowedChargeMax);
429 s.restore(
m_d->ui_cuts.spinBox_stgcAllowedChargeMax);
430 s.restore(
m_d->ui_cuts.checkBox_stgcAllowedTimeMin);
431 s.restore(
m_d->ui_cuts.spinBox_stgcAllowedTimeMin);
432 s.restore(
m_d->ui_cuts.checkBox_stgcAllowedTimeMax);
433 s.restore(
m_d->ui_cuts.spinBox_stgcAllowedTimeMax);
436 m_d->ui_cuts.checkBox_mdtAllowedADCMin->setChecked(
false);
437 m_d->ui_cuts.checkBox_mdtAllowedADCMax->setChecked(
false);
438 m_d->ui_cuts.checkBox_mdtAllowedTDCMin->setChecked(
false);
439 m_d->ui_cuts.checkBox_mdtAllowedTDCMax->setChecked(
false);
440 m_d->ui_cuts.checkBox_mmAllowedChargeMin->setChecked(
false);
441 m_d->ui_cuts.checkBox_mmAllowedChargeMax->setChecked(
false);
442 m_d->ui_cuts.checkBox_mmAllowedTimeMin->setChecked(
false);
443 m_d->ui_cuts.checkBox_mmAllowedTimeMax->setChecked(
false);
444 m_d->ui_cuts.checkBox_stgcAllowedChargeMin->setChecked(
false);
445 m_d->ui_cuts.checkBox_stgcAllowedChargeMax->setChecked(
false);
446 m_d->ui_cuts.checkBox_stgcAllowedTimeMin->setChecked(
false);
447 m_d->ui_cuts.checkBox_stgcAllowedTimeMax->setChecked(
false);
449 if (s.version() >= 3)
450 s.restore(
m_d->ui_cuts.checkBox_mdtExcludeMasked);
452 m_d->ui_cuts.checkBox_mdtExcludeMasked->setChecked(
false);
454 if (s.version() >= 4) {
455 s.restore(
m_d->ui_cuts.checkBox_stgcShowPads);
456 s.restore(
m_d->ui_cuts.checkBox_stgcShowStrips);
457 s.restore(
m_d->ui_cuts.checkBox_stgcShowWires);
458 s.restore(
m_d->ui_cuts.checkBox_stgcExcludeDead);
459 s.restore(
m_d->ui_cuts.checkBox_stgcExcludePileup);
461 m_d->ui_cuts.checkBox_stgcShowPads->setChecked(
true);
462 m_d->ui_cuts.checkBox_stgcShowStrips->setChecked(
true);
463 m_d->ui_cuts.checkBox_stgcShowWires->setChecked(
true);
464 m_d->ui_cuts.checkBox_stgcExcludeDead->setChecked(
false);
465 m_d->ui_cuts.checkBox_stgcExcludePileup->setChecked(
false);
468 if (s.version() >= 5) {
469 s.restore(
m_d->ui_cuts.checkBox_tgcShowStrips);
470 s.restore(
m_d->ui_cuts.checkBox_tgcShowWires);
471 s.restore(
m_d->ui_cuts.checkBox_tgcShowPrevious);
472 s.restore(
m_d->ui_cuts.checkBox_tgcShowCurrent);
473 s.restore(
m_d->ui_cuts.checkBox_tgcShowNext);
474 s.restore(
m_d->ui_cuts.checkBox_tgcShowNextNext);
475 s.restore(
m_d->ui_cuts.checkBox_tgcShowUndefined);
476 s.restore(
m_d->ui_cuts.checkBox_tgcShowUnknown);
478 m_d->ui_cuts.checkBox_tgcShowStrips->setChecked(
true);
479 m_d->ui_cuts.checkBox_tgcShowWires->setChecked(
true);
480 m_d->ui_cuts.checkBox_tgcShowPrevious->setChecked(
true);
481 m_d->ui_cuts.checkBox_tgcShowCurrent->setChecked(
true);
482 m_d->ui_cuts.checkBox_tgcShowNext->setChecked(
true);
483 m_d->ui_cuts.checkBox_tgcShowNextNext->setChecked(
true);
484 m_d->ui_cuts.checkBox_tgcShowUndefined->setChecked(
true);
485 m_d->ui_cuts.checkBox_tgcShowUnknown->setChecked(
true);
488 if (s.version() >= 6) {
489 s.restore(
m_d->ui_cuts.checkBox_rpcShowEta);
490 s.restore(
m_d->ui_cuts.checkBox_rpcShowPhi);
491 s.restore(
m_d->ui_cuts.checkBox_rpcShowPrimarySide);
492 s.restore(
m_d->ui_cuts.checkBox_rpcShowOppositeSide);
493 s.restore(
m_d->ui_cuts.checkBox_rpcKeepMissingToT);
494 s.restore(
m_d->ui_cuts.checkBox_rpcAllowedTimeMin);
495 s.restore(
m_d->ui_cuts.spinBox_rpcAllowedTimeMin);
496 s.restore(
m_d->ui_cuts.checkBox_rpcAllowedTimeMax);
497 s.restore(
m_d->ui_cuts.spinBox_rpcAllowedTimeMax);
498 s.restore(
m_d->ui_cuts.checkBox_rpcAllowedToTMin);
499 s.restore(
m_d->ui_cuts.spinBox_rpcAllowedToTMin);
500 s.restore(
m_d->ui_cuts.checkBox_rpcAllowedToTMax);
501 s.restore(
m_d->ui_cuts.spinBox_rpcAllowedToTMax);
503 m_d->ui_cuts.checkBox_rpcShowEta->setChecked(
true);
504 m_d->ui_cuts.checkBox_rpcShowPhi->setChecked(
true);
505 m_d->ui_cuts.checkBox_rpcShowPrimarySide->setChecked(
true);
506 m_d->ui_cuts.checkBox_rpcShowOppositeSide->setChecked(
true);
507 m_d->ui_cuts.checkBox_rpcKeepMissingToT->setChecked(
true);
508 m_d->ui_cuts.checkBox_rpcAllowedTimeMin->setChecked(
false);
509 m_d->ui_cuts.checkBox_rpcAllowedTimeMax->setChecked(
false);
510 m_d->ui_cuts.checkBox_rpcAllowedToTMin->setChecked(
false);
511 m_d->ui_cuts.checkBox_rpcAllowedToTMax->setChecked(
false);
515 m_d->ui_cuts.spinBox_rpcAllowedTimeMin->setEnabled(
m_d->ui_cuts.checkBox_rpcAllowedTimeMin->isChecked());
516 m_d->ui_cuts.spinBox_rpcAllowedTimeMax->setEnabled(
m_d->ui_cuts.checkBox_rpcAllowedTimeMax->isChecked());
517 m_d->ui_cuts.spinBox_rpcAllowedToTMin->setEnabled(
m_d->ui_cuts.checkBox_rpcAllowedToTMin->isChecked());
518 m_d->ui_cuts.spinBox_rpcAllowedToTMax->setEnabled(
m_d->ui_cuts.checkBox_rpcAllowedToTMax->isChecked());
519 m_d->ui_cuts.spinBox_mdtAllowedADCMin->setEnabled(
m_d->ui_cuts.checkBox_mdtAllowedADCMin->isChecked());
520 m_d->ui_cuts.spinBox_mdtAllowedADCMax->setEnabled(
m_d->ui_cuts.checkBox_mdtAllowedADCMax->isChecked());
521 m_d->ui_cuts.spinBox_mdtAllowedTDCMin->setEnabled(
m_d->ui_cuts.checkBox_mdtAllowedTDCMin->isChecked());
522 m_d->ui_cuts.spinBox_mdtAllowedTDCMax->setEnabled(
m_d->ui_cuts.checkBox_mdtAllowedTDCMax->isChecked());
523 m_d->ui_cuts.spinBox_mmAllowedChargeMin->setEnabled(
m_d->ui_cuts.checkBox_mmAllowedChargeMin->isChecked());
524 m_d->ui_cuts.spinBox_mmAllowedChargeMax->setEnabled(
m_d->ui_cuts.checkBox_mmAllowedChargeMax->isChecked());
525 m_d->ui_cuts.spinBox_mmAllowedTimeMin->setEnabled(
m_d->ui_cuts.checkBox_mmAllowedTimeMin->isChecked());
526 m_d->ui_cuts.spinBox_mmAllowedTimeMax->setEnabled(
m_d->ui_cuts.checkBox_mmAllowedTimeMax->isChecked());
527 m_d->ui_cuts.spinBox_stgcAllowedChargeMin->setEnabled(
m_d->ui_cuts.checkBox_stgcAllowedChargeMin->isChecked());
528 m_d->ui_cuts.spinBox_stgcAllowedChargeMax->setEnabled(
m_d->ui_cuts.checkBox_stgcAllowedChargeMax->isChecked());
529 m_d->ui_cuts.spinBox_stgcAllowedTimeMin->setEnabled(
m_d->ui_cuts.checkBox_stgcAllowedTimeMin->isChecked());
530 m_d->ui_cuts.spinBox_stgcAllowedTimeMax->setEnabled(
m_d->ui_cuts.checkBox_stgcAllowedTimeMax->isChecked());