ATLAS Offline Software
ElectronCollectionSettingsButton.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Local
8 #include "ui_perelectroncollectionsettings_form.h"
9 #include "ui_settings_cuts_form.h"
10 
11 //VP1
13 #include "VP1Base/VP1Serialise.h"
14 #include "VP1Base/VP1Deserialise.h"
15 
16 //SoCoin
17 
18 #include "Inventor/nodes/SoDrawStyle.h"
19 #include "Inventor/nodes/SoLightModel.h"
20 #include "Inventor/nodes/SoMaterial.h"
21 
22 // Qt
23 #include <QTimer>
24 #include <QByteArray>
25 #include <QBuffer>
26 #include <QDataStream>
27 #include <QMouseEvent>
28 #include <QDragEnterEvent>
29 #include <QDropEvent>
30 #include <QShortcut>
31 #include <QMimeData>
32 #include <QDrag>
33 
34 // Misc
35 #include <iostream>
36 
37 //____________________________________________________________________
39 public:
43  //nop
44  }
46  QWidget * editwindow;
47  Ui::ElectronCollectionSettingsForm editwindow_ui{};
48 
49  VP1MaterialButton* matButton;// main collection colour
51 
52  QList<VP1MaterialButton*> parameterTypeMatButtons;// enum used to access the specific button
53 
54  SoDrawStyle * trackDrawStyle;
55  SoLightModel * trackLightModel;
56 
57  //GUI - last values
62  QList<VP1Interval> last_cutAllowedPhi;
63  QList<unsigned> last_cutRequiredNHits;
66 
67  int dim;
69 
70  void initEditWindow();
71 };
72 
73 //____________________________________________________________________
75 {
76  if (editwindow)
77  return;
78  theclass->messageVerbose("Initialising material editor dialog");
79  editwindow = new QWidget(0,Qt::WindowStaysOnTopHint);
80  editwindow_ui.setupUi(editwindow);
81  matButton = editwindow_ui.pushButton_matButton;
82 
83  defaultParametersMatButton = editwindow_ui.matButton_parametersDefaultColour;
84  SoMaterial* defParamMat = new SoMaterial; // Default (for the moment)
86  editwindow_ui.frame_parameterTypeColours->hide();
87 
88  // Set the default colours for the "colour by parameter type" section
89  parameterTypeMatButtons.append(editwindow_ui.pushButton_matButton_parameters_default_colour_2);
90  parameterTypeMatButtons.append(editwindow_ui.pushButton_matButton_parameters_default_colour_3);
91  parameterTypeMatButtons.append(editwindow_ui.pushButton_matButton_parameters_default_colour_4);
92  parameterTypeMatButtons.append(editwindow_ui.pushButton_matButton_parameters_default_colour_5);
93  parameterTypeMatButtons.append(editwindow_ui.pushButton_matButton_parameters_default_colour_6);
94  parameterTypeMatButtons.append(editwindow_ui.pushButton_matButton_parameters_default_colour_7);
95  QList<QColor> colours;
96  colours.append(QColor(0.0, 170.0, 255.0));
97  colours.append(QColor(170, 85, 255));
98  colours.append(QColor(255, 85, 0));
99  colours.append(QColor(170, 0, 127));
100  colours.append(QColor(170, 255, 0));
101  colours.append(QColor(85, 0, 255));
102 
103  for (unsigned int i=0; i<6;++i){
104  SoMaterial * mat = VP1MaterialButton::createMaterial(colours.at(i));
106  }
107 }
108 
109 //____________________________________________________________________
111 {
112  if (m_d->editwindow)
113  m_d->editwindow->setWindowTitle(t);
114  setToolTip(t);
115 }
116 
117 //____________________________________________________________________
119  : VP1MaterialButtonBase(parent,0,"VP1MaterialButton"), m_d(new Imp)
120 {
121  m_d->dim = _dim;
122 
123  m_d->theclass = this;
124  m_d->initEditWindow();
125 
126  //Draw Styles / Complexity:
127  VP1QtInventorUtils::setLimitsLineWidthSlider(m_d->editwindow_ui.horizontalSlider_trackWidth);
128  VP1QtInventorUtils::setValueLineWidthSlider(m_d->editwindow_ui.horizontalSlider_trackWidth,1.0);
129 
130  m_d->trackDrawStyle = new SoDrawStyle;
131  m_d->trackDrawStyle->setName("ElectronDrawStyle");
132  m_d->trackDrawStyle->pointSize=5.0;
133  m_d->trackDrawStyle->ref();
135  connect(m_d->editwindow_ui.horizontalSlider_trackWidth,SIGNAL(valueChanged(int)),this,SLOT(updateTrackDrawStyle()));
137  connect(m_d->editwindow_ui.checkBox_trackTubes,SIGNAL(toggled(bool)),this,SLOT(updateTrackTubeRadius()));
138  connect(m_d->editwindow_ui.doubleSpinBox_trackTubesRadiusMM,SIGNAL(valueChanged(double)),this,SLOT(updateTrackTubeRadius()));
139 
140 
141  m_d->trackLightModel = new SoLightModel;
142  m_d->trackLightModel->setName("ElectronLightModel");
143  m_d->trackLightModel->ref();
144  updateTrackLightModel(false);
145  connect(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel,SIGNAL(toggled(bool)),this,SLOT(updateTrackLightModel(bool)));
146  connect(m_d->editwindow_ui.checkBox_hideactualpaths,SIGNAL(toggled(bool)),this,SLOT(updateHideActualTrackPath(bool)));
147 
148  #if defined BUILDVP1LIGHT
149  m_d->editwindow_ui.radioButton_existingParameters->setChecked(true);
150  m_d->editwindow_ui.radioButton_existingParameters->setEnabled(true);
151  m_d->editwindow_ui.radioButton_extrapolate->setChecked(false);
152  m_d->editwindow_ui.radioButton_extrapolate->setEnabled(false);
153  m_d->editwindow_ui.radioButton_extrapolate->setToolTip("Not available in VP1 Light");
154  m_d->editwindow_ui.horizontalSlider_numBezierSteps->setValue(10);
155  m_d->editwindow_ui.horizontalSlider_numBezierSteps->setSliderPosition(10);
156  #endif //BUILDVP1LIGHT
157 
158 
159  // Propagation - for all of these, just emit the propagationOptionsChanged() signal and rely on clients checking to see what has changed.
160  connect(m_d->editwindow_ui.radioButton_existingParameters, SIGNAL(toggled(bool)), this, SIGNAL(propagationOptionsChanged()));
161  connect(m_d->editwindow_ui.radioButton_extrapolate, SIGNAL(toggled(bool)), this, SIGNAL(propagationOptionsChanged()));
162  connect(m_d->editwindow_ui.horizontalSlider_numBezierSteps,SIGNAL(valueChanged(int)),this, SIGNAL(propagationOptionsChanged()));
163 
164  // -> parameters
165  connect(m_d->editwindow_ui.checkBox_showparameters,SIGNAL(toggled(bool)),this,SLOT(possibleChange_showParameters()));
166  connect(m_d->editwindow_ui.checkBox_parameters_colourByType,SIGNAL(toggled(bool)),this,SLOT(possibleChange_parameterColours()));
167 
168  // -> cutAllowedP/Pt
169  connect(m_d->editwindow_ui.checkBox_cut_minpt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedPt()));
170  connect(m_d->editwindow_ui.checkBox_cut_maxpt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedPt()));
171  connect(m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev,SIGNAL(valueChanged(double)),this,SLOT(possibleChange_cutAllowedPt()));
172  connect(m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev,SIGNAL(valueChanged(double)),this,SLOT(possibleChange_cutAllowedPt()));
173  connect(m_d->editwindow_ui.checkBox_cut_minpt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedPt()));
174  connect(m_d->editwindow_ui.comboBox_momtype,SIGNAL(currentIndexChanged(int)),this,SLOT(possibleChange_cutAllowedPt()));
175 
176  // -> cutAllowedEta
177  connect(m_d->editwindow_ui.etaPhiCutWidget,SIGNAL(allowedEtaChanged(const VP1Interval&)),this,SLOT(possibleChange_cutAllowedEta()));
178 
179  // -> cutAllowedPhi
180  connect(m_d->editwindow_ui.etaPhiCutWidget,SIGNAL(allowedPhiChanged(const QList<VP1Interval>&)),this,SLOT(possibleChange_cutAllowedPhi()));
181 
182  // -> cutRequiredNHits();
183  connect(m_d->editwindow_ui.checkBox_cut_nhits_pixel,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits()));
184  connect(m_d->editwindow_ui.checkBox_cut_nhits_sct,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits()));
185  connect(m_d->editwindow_ui.checkBox_cut_nhits_trt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits()));
186  connect(m_d->editwindow_ui.checkBox_cut_nhits_muon,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits()));
187  connect(m_d->editwindow_ui.spinBox_cut_nhits_pixel,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits()));
188  connect(m_d->editwindow_ui.spinBox_cut_nhits_sct,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits()));
189  connect(m_d->editwindow_ui.spinBox_cut_nhits_trt,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits()));
190  connect(m_d->editwindow_ui.spinBox_cut_nhits_muon,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits()));
191 
192  // -> cutOnlyVertexAssocTracks
193  connect(m_d->editwindow_ui.checkBox_vertexAssociated,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutOnlyVertexAssocTracks()));
194 
195  connect(this,SIGNAL(clicked()),this,SLOT(showEditMaterialDialog()));
196  connect(m_d->editwindow_ui.pushButton_close,SIGNAL(clicked()),this,SLOT(showEditMaterialDialog()));
197  connect(m_d->matButton,SIGNAL(lastAppliedChanged()),this,SLOT(updateButton()));
198  connect(m_d->matButton,SIGNAL(lastAppliedChanged()),this,SIGNAL(lastAppliedChanged()));
199  setAcceptDrops(true);
200 
201  QTimer::singleShot(0, this, SLOT(updateButton()));
202 
203 }
204 
205 // QWidget& ElectronCollectionSettingsButton::editWindow() {
206 // if (!m_d->editwindow)
207 // initEditWindow();
208 // return *(m_d->editwindow);color
209 // }
211 {
212  delete m_d->editwindow;
213  m_d->trackDrawStyle->unref();
214  m_d->trackLightModel->unref();
215  delete m_d;
216 }
217 
219 {
220  if (objectName().isEmpty())
221  setObjectName("ElectronCollectionSettingsButton");
222  messageVerbose("setColButtonProperties: color=" + str(m_d->matButton->lastAppliedDiffuseColour()));
224 }
225 
227 {
228  if (m_d->dim == dim)
229  return;
230  m_d->dim = dim;
231  updateButton();
232 }
233 
235 {
236  if (!m_d->editwindow)
237  m_d->initEditWindow();
238 
239  if (m_d->editwindow->isHidden())
240  m_d->editwindow->show();
241  else
242  m_d->editwindow->hide();
243 }
244 
246 {
247  // std::cout<<"ElectronCollectionSettingsButton::setMaterial with mat="<<mat<<std::endl;
248  if (!m_d->matButton) m_d->initEditWindow();
250  return true;
251 }
252 
254 {
255  if (!m_d->matButton) m_d->initEditWindow();
257 }
259 {
260  if (!m_d->matButton) m_d->initEditWindow();
262 }
264 {
265  if (!m_d->matButton) m_d->initEditWindow();
267 }
269 {
270  if (!m_d->matButton) m_d->initEditWindow();
272 }
273 
275 {
276  return m_d->editwindow_ui.checkBox_trackTubes->isChecked() ?
277  m_d->editwindow_ui.doubleSpinBox_trackTubesRadiusMM->value() : 0.0;
278 }
279 
281 {
282  if (m_d->last_trackTubeRadius==trackTubeRadius()) return;
284  messageVerbose("TrackTubeRadius changed to "+str(m_d->last_trackTubeRadius));
286  return;
287 }
288 
290 {
291  double val = VP1QtInventorUtils::getValueLineWidthSlider(m_d->editwindow_ui.horizontalSlider_trackWidth);
292  if (m_d->trackDrawStyle->lineWidth.getValue()!=val)
293  m_d->trackDrawStyle->lineWidth = val;
294 }
295 
297 {
298  if (m_d->trackLightModel->model.getValue()!=(base?SoLightModel::BASE_COLOR:SoLightModel::PHONG)) {
299  messageVerbose("TrackLightModel changed (base = "+str(base));
300  if (base)
301  m_d->trackLightModel->model.setValue(SoLightModel::BASE_COLOR);
302  else
303  m_d->trackLightModel->model.setValue(SoLightModel::PHONG);
304  }
305 }
306 
308 {
309  emit hideActualTrackPathChanged(hide);
310 }
311 
312 
314 {
315  return m_d->trackDrawStyle;
316 }
317 
319 {
320  return m_d->trackLightModel;
321 }
322 
324  return m_d->editwindow_ui.radioButton_existingParameters->isChecked();
325 }
326 
328  return m_d->editwindow_ui.horizontalSlider_numBezierSteps->value();
329 }
330 
332  return m_d->defaultParametersMatButton->handledMaterials().at(0);// Only have one material per button.
333 }
335  return (m_d->parameterTypeMatButtons.at(static_cast<unsigned int>(position)))->handledMaterials().at(0);// Only have one material per button.
336 }
337 
338 // void setDefaultParameterMaterial(SoMaterial* mat) {
339 // // m_d->defaultParametersMatButton->setObjectName("matButton_default");
340 // // m_d->defaultParametersMatButton->setToolTip(matButtonToolTip());
341 // m_d->defaultParametersMatButton->setMaterial(mat);
342 // // connect(m_d->matButton,SIGNAL(lastAppliedChanged()),this,SLOT(possibleChangeMatTranspOrBrightness()));
343 // }
344 //
345 // void ElectronCollectionSettingsButton::setParameterMaterial(SoMaterial*, xAOD::ParameterPosition){
346 // // FIXME!
347 // }
348 
350 {
351  if (!m_d->editwindow)
352  m_d->initEditWindow();
353  return m_d->editwindow_ui.checkBox_hideactualpaths->isChecked();
354 }
355 
357 {
358  if (!m_d->editwindow)
359  m_d->initEditWindow();
360  messageVerbose("ElectronCollectionSettingsButton::showParameters returning "+str(m_d->editwindow_ui.checkBox_showparameters->isChecked()));
361  return m_d->editwindow_ui.checkBox_showparameters->isChecked();
362 }
363 
365 {
366  if (!m_d->editwindow)
367  m_d->initEditWindow();
368  messageVerbose("ElectronCollectionSettingsButton::colourParametersByType returning "+str(m_d->editwindow_ui.checkBox_parameters_colourByType->isChecked()));
369  return m_d->editwindow_ui.checkBox_parameters_colourByType->isChecked();
370 }
371 
372 
374 {
375  if (!m_d->editwindow)
376  m_d->initEditWindow();
377  return m_d->editwindow_ui.checkBox_vertexAssociated->isChecked();
378 }
379 
380 //____________________________________________________________________
382 {
383  if (event->button() == Qt::LeftButton)
384  m_d->dragStartPosition = event->pos();
385  QPushButton::mousePressEvent(event);
386 }
387 
388 //____________________________________________________________________
390 {
391  if (event->source()!=this && event->mimeData()->hasFormat("vp1/material"))
392  event->acceptProposedAction();
393 }
394 
395 //____________________________________________________________________
397 {
398  if (!(event->buttons() & Qt::LeftButton))
399  return;
400  if ((event->pos() - m_d->dragStartPosition).manhattanLength()
401  < QApplication::startDragDistance())
402  return;
403 
404  QDrag *drag = new QDrag(this);
405  QMimeData *mimeData = new QMimeData;
406 
408  // For dragging state onto other material buttons: //
410 
411  QByteArray byteArray = saveState();
412 
413  // buffer.close();
414  mimeData->setData("vp1/material", byteArray);
415 
416  // ////////////////////////////////////////////////////////
417  // // For dragging c++ code for defining this material //
418  // // into e.g. an editor: //
419  // ////////////////////////////////////////////////////////
420  //
421  // QString s = "SoMaterial * mat = new SoMaterial;\n";
422  // QString str_ambient = m_d->toSbColTxt(m_d->lastapplied_ambient);
423  // if (str_ambient!="SbColor(0.2,0.2,0.2)")
424  // s += "mat->ambientColor.setValue("+str_ambient+");\n";
425  // QString str_diffuse = m_d->toSbColTxt(m_d->lastapplied_diffuse);
426  // if (str_diffuse!="SbColor(0.8,0.8,0.8)")
427  // s += "mat->diffuseColor.setValue("+str_diffuse+");\n";
428  // QString str_specular = m_d->toSbColTxt(m_d->lastapplied_specular);
429  // if (str_specular!="SbColor(0,0,0)")
430  // s += "mat->specularColor.setValue("+str_specular+");\n";
431  // QString str_emissive = m_d->toSbColTxt(m_d->lastapplied_emissive);
432  // if (str_emissive!="SbColor(0,0,0)")
433  // s += "mat->emissiveColor.setValue("+str_emissive+");\n";
434  // QString str_shininess = m_d->printFloat(m_d->lastapplied_shininess/100.0);
435  // if (str_shininess!="0.2")
436  // s += "mat->shininess.setValue("+str_shininess+");\n";
437  // QString str_transparency = m_d->printFloat(m_d->lastapplied_transparency/100.0);
438  // if (str_transparency!="0")
439  // s += "mat->transparency.setValue("+str_transparency+");\n";
440  // mimeData->setText(s);
441 
442  //Execute drag:
443  drag->setMimeData(mimeData);//drag assumes ownership of mimeData
444  drag->exec(Qt::CopyAction | Qt::MoveAction);
445 }
446 
447 //____________________________________________________________________
449 {
450  QByteArray data = event->mimeData()->data("vp1/material");
451  event->acceptProposedAction();
453 }
454 
455 
457  // messageVerbose("getState");
458  // if (m_d->editwindow_ui.checkBox_tracksUseBaseLightModel->isChecked()) messageVerbose("checked!");
459  VP1Serialise serialise(1/*version*/);
460 
461  serialise.save(m_d->matButton);
462  // serialise.disableUnsavedChecks();
463  serialise.save(m_d->editwindow_ui.horizontalSlider_trackWidth);
464  serialise.save(m_d->editwindow_ui.checkBox_trackTubes);
465  serialise.save(m_d->editwindow_ui.doubleSpinBox_trackTubesRadiusMM);
466  serialise.save(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel);
467  serialise.save(m_d->editwindow_ui.checkBox_hideactualpaths);
468 
469  // Parameters
470  serialise.save(m_d->editwindow_ui.checkBox_showparameters);
471  serialise.save(m_d->editwindow_ui.checkBox_parameters_colourByType);
472 
473  serialise.widgetHandled(this);
474  serialise.warnUnsaved(this);
475  return serialise.result();
476 }
477 
479 
480  VP1Deserialise state(ba,systemBase());
481  if (state.version()<0||state.version()>1)
482  return;//Ignore silently
483  state.restore(m_d->matButton);
484  state.restore(m_d->editwindow_ui.horizontalSlider_trackWidth);
485  state.restore(m_d->editwindow_ui.checkBox_trackTubes);
486  state.restore(m_d->editwindow_ui.doubleSpinBox_trackTubesRadiusMM);
487  state.restore(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel);
488  state.restore(m_d->editwindow_ui.checkBox_hideactualpaths);
489 
490  // Parameters
491  state.restore(m_d->editwindow_ui.checkBox_showparameters);
492  state.restore(m_d->editwindow_ui.checkBox_parameters_colourByType);
493 
494  state.widgetHandled(this);
495  state.warnUnrestored(this);
496 
498  updateTrackLightModel(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel);
499  updateButton();
500  //FIXME - anything else need updating?
501 }
502 
503 //____________________________________________________________________
505 {
506  if (!m_d->editwindow)
507  m_d->initEditWindow();
508  if (!m_d->editwindow_ui.checkBox_cut_minpt)
509  return VP1Interval();
510 
511  // will set range to negative if we have momcut=P
512  // if minCut unset then min=-inf
513  // if minCut set, and Pt selected, then min=-minCut
514  // if minCut set, and P selected, then min=-maxCut
515  // etc
516  bool isPCut = m_d->editwindow_ui.comboBox_momtype->currentText()=="P";
517 
518  const double minFromInterface=m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev->value()*1000;
519  const double maxFromInterface=m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev->value()*1000;
520 
521  double min=0.0,max=0.0;
522  if (!isPCut) {
523  //Pt cut
524  min = (m_d->editwindow_ui.checkBox_cut_minpt->isChecked() ? minFromInterface : -std::numeric_limits<double>::infinity());
525  max = (m_d->editwindow_ui.checkBox_cut_maxpt->isChecked() ? maxFromInterface : std::numeric_limits<double>::infinity());
526  } else {
527  min = (m_d->editwindow_ui.checkBox_cut_maxpt->isChecked() ? -maxFromInterface : -std::numeric_limits<double>::infinity());
528  max = (m_d->editwindow_ui.checkBox_cut_minpt->isChecked() ? -minFromInterface : std::numeric_limits<double>::infinity());
529  }
530 
531  //message("cutAllowedPt: min,max="+QString::number(min)+","+QString::number(max));
532 
533  if (max<min)
534  return VP1Interval();
535 
536  return VP1Interval( min, max );//fixme: closed interval??
537 }
538 
539 //____________________________________________________________________
541 {
542  if (!m_d->editwindow)
543  m_d->initEditWindow();
544  return m_d->editwindow_ui.etaPhiCutWidget->allowedEta();
545 }
546 
547 //____________________________________________________________________
549 {
550  if (!m_d->editwindow)
551  m_d->initEditWindow();
552  return m_d->editwindow_ui.etaPhiCutWidget->allowedPhi();
553 }
554 
555 //____________________________________________________________________
557 {
558  if (!m_d->editwindow)
559  m_d->initEditWindow();
560  unsigned npixel = m_d->editwindow_ui.checkBox_cut_nhits_pixel->isChecked() ? m_d->editwindow_ui.spinBox_cut_nhits_pixel->value() : 0;
561  unsigned nsct = m_d->editwindow_ui.checkBox_cut_nhits_sct->isChecked() ? m_d->editwindow_ui.spinBox_cut_nhits_sct->value() : 0;
562  unsigned ntrt = m_d->editwindow_ui.checkBox_cut_nhits_trt->isChecked() ? m_d->editwindow_ui.spinBox_cut_nhits_trt->value() : 0;
563  unsigned nmuon = m_d->editwindow_ui.checkBox_cut_nhits_muon->isChecked() ? m_d->editwindow_ui.spinBox_cut_nhits_muon->value() : 0;
564  QList<unsigned> l;
565  if (!npixel&&!nsct&&!ntrt&&!nmuon)
566  return l;
567  l << npixel << nsct << ntrt << nmuon;
568  return l;
569 }
570 
571 
573 {
574  messageVerbose("possibleChange_cutAllowedPt() ");
575 
576  if (m_d->last_cutAllowedPt==cutAllowedPt()) return;
577  messageVerbose("cutAllowedPt() changed");
580 }
581 
583 {
584  if (m_d->last_cutAllowedEta==cutAllowedEta()) return;
585  messageVerbose("cutAllowedEta() changed");
588 }
589 
591 {
592  if (m_d->last_cutAllowedPhi==cutAllowedPhi()) return;
593  messageVerbose("cutAllowedPhi() changed");
596 }
597 
599 {
601  messageVerbose("cutRequiredNHits() changed");
604 }
605 
607 {
609  messageVerbose("cutOnlyVertexAssocTracks() changed");
612 }
613 
615 {
616  messageVerbose("ElectronCollectionSettingsButton::possibleChange_showParameters emitting showParametersChanged ");
617  emit showParametersChanged(m_d->editwindow_ui.checkBox_showparameters->isChecked());
618 }
619 
621 {
622  messageVerbose("ElectronCollectionSettingsButton::possibleChange_parameterColours emitting colourParametersByTypeChanged ");
623  emit colourParametersByTypeChanged(m_d->editwindow_ui.checkBox_parameters_colourByType->isChecked());
624 }
625 
VP1Serialise.h
ElectronCollectionSettingsButton::Imp::dragStartPosition
QPoint dragStartPosition
Definition: ElectronCollectionSettingsButton.cxx:68
base
std::string base
Definition: hcg.cxx:78
ElectronCollectionSettingsButton
Definition: ElectronCollectionSettingsButton.h:14
ElectronCollectionSettingsButton::Imp::trackDrawStyle
SoDrawStyle * trackDrawStyle
Definition: ElectronCollectionSettingsButton.cxx:54
ElectronCollectionSettingsButton::Imp
Definition: ElectronCollectionSettingsButton.cxx:38
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
ElectronCollectionSettingsButton::updateHideActualTrackPath
void updateHideActualTrackPath(bool)
Definition: ElectronCollectionSettingsButton.cxx:307
VP1QtInventorUtils::getValueLineWidthSlider
static double getValueLineWidthSlider(const QSlider *)
Definition: VP1QtInventorUtils.cxx:1619
VP1Deserialise.h
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
VP1Serialise
Definition: VP1Serialise.h:45
ElectronCollectionSettingsButton::cutAllowedPhiChanged
void cutAllowedPhiChanged(const QList< VP1Interval > &)
ElectronCollectionSettingsButton::saveState
QByteArray saveState() const
fill out with the state of the object (used for drag and drop etc)
Definition: ElectronCollectionSettingsButton.cxx:456
ElectronCollectionSettingsButton::lastAppliedTransparency
virtual double lastAppliedTransparency() const
Definition: ElectronCollectionSettingsButton.cxx:258
ElectronCollectionSettingsButton::Imp::last_trackTubeRadius
double last_trackTubeRadius
Definition: ElectronCollectionSettingsButton.cxx:58
RoiUtil::serialise
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors
Definition: RoiSerialise.cxx:45
ElectronCollectionSettingsButton::updateTrackTubeRadius
void updateTrackTubeRadius()
Definition: ElectronCollectionSettingsButton.cxx:280
ElectronCollectionSettingsButton::hideActualTrackPathChanged
void hideActualTrackPathChanged(bool)
ElectronCollectionSettingsButton::dropEvent
void dropEvent(QDropEvent *event)
Definition: ElectronCollectionSettingsButton.cxx:448
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
ElectronCollectionSettingsButton::cutRequiredNHits
QList< unsigned > cutRequiredNHits() const
Definition: ElectronCollectionSettingsButton.cxx:556
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
VP1MaterialButton
Definition: VP1MaterialButton.h:46
VP1HelperClassBase::messageVerbose
void messageVerbose(const QString &) const
Definition: VP1HelperClassBase.cxx:78
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
VP1MaterialButton::handledMaterials
const QList< SoMaterial * > & handledMaterials() const
Definition: VP1MaterialButton.cxx:647
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
ElectronCollectionSettingsButton::Imp::last_cutOnlyVertexAssocTracks
bool last_cutOnlyVertexAssocTracks
Definition: ElectronCollectionSettingsButton.cxx:64
ElectronCollectionSettingsButton::updateTrackDrawStyle
void updateTrackDrawStyle()
Definition: ElectronCollectionSettingsButton.cxx:289
ElectronCollectionSettingsButton::cutOnlyVertexAssocTracksChanged
void cutOnlyVertexAssocTracksChanged(bool)
ElectronCollectionSettingsButton::possibleChange_cutAllowedPt
void possibleChange_cutAllowedPt()
Definition: ElectronCollectionSettingsButton.cxx:572
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
ElectronCollectionSettingsButton::possibleChange_parameterColours
void possibleChange_parameterColours()
Definition: ElectronCollectionSettingsButton.cxx:620
ElectronCollectionSettingsButton::copyValuesFromMaterial
virtual void copyValuesFromMaterial(SoMaterial *)
Definition: ElectronCollectionSettingsButton.cxx:253
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ElectronCollectionSettingsButton::Imp::last_cutAllowedEta
VP1Interval last_cutAllowedEta
Definition: ElectronCollectionSettingsButton.cxx:61
ElectronCollectionSettingsButton::parameterMaterial
SoMaterial * parameterMaterial(xAOD::ParameterPosition) const
Definition: ElectronCollectionSettingsButton.cxx:334
xAOD::ParameterPosition
ParameterPosition
Enum allowing us to know where in ATLAS the parameters are defined.
Definition: TrackingPrimitives.h:209
ElectronCollectionSettingsButton::lastAppliedChanged
void lastAppliedChanged()
VP1MaterialButton::lastAppliedDiffuseColour
QColor lastAppliedDiffuseColour() const
Definition: VP1MaterialButton.cxx:167
ElectronCollectionSettingsButton::Imp::initEditWindow
void initEditWindow()
Definition: ElectronCollectionSettingsButton.cxx:74
ElectronCollectionSettingsButton::setDimension
void setDimension(int dim)
Definition: ElectronCollectionSettingsButton.cxx:226
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
ElectronCollectionSettingsButton::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *event)
Definition: ElectronCollectionSettingsButton.cxx:396
VP1ColorSelectButton::setColButtonProperties
static void setColButtonProperties(QPushButton *, const QColor &col, int dim)
Definition: VP1ColorSelectButton.cxx:49
ElectronCollectionSettingsButton::Imp::editwindow
QWidget * editwindow
Definition: ElectronCollectionSettingsButton.cxx:46
ElectronCollectionSettingsButton::trackLightModel
SoLightModel * trackLightModel() const
Definition: ElectronCollectionSettingsButton.cxx:318
VP1QtInventorUtils.h
VP1Deserialise::version
qint32 version() const
Definition: VP1Deserialise.cxx:143
ElectronCollectionSettingsButton::cutAllowedPhi
QList< VP1Interval > cutAllowedPhi() const
Definition: ElectronCollectionSettingsButton.cxx:548
ElectronCollectionSettingsButton::Imp::last_cutAllowedPt
VP1Interval last_cutAllowedPt
Definition: ElectronCollectionSettingsButton.cxx:59
ElectronCollectionSettingsButton::cutOnlyVertexAssocTracks
bool cutOnlyVertexAssocTracks() const
Return true if this collection should only should tracks associated to a vertex.
Definition: ElectronCollectionSettingsButton.cxx:373
ElectronCollectionSettingsButton::cutAllowedEtaChanged
void cutAllowedEtaChanged(const VP1Interval &)
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
lumiFormat.i
int i
Definition: lumiFormat.py:85
ElectronCollectionSettingsButton::colourParametersByType
bool colourParametersByType() const
Definition: ElectronCollectionSettingsButton.cxx:364
ElectronCollectionSettingsButton::trackDrawStyle
SoDrawStyle * trackDrawStyle() const
Definition: ElectronCollectionSettingsButton.cxx:313
ElectronCollectionSettingsButton::lastAppliedBrightness
virtual double lastAppliedBrightness() const
Definition: ElectronCollectionSettingsButton.cxx:268
ElectronCollectionSettingsButton::Imp::Imp
Imp()
Definition: ElectronCollectionSettingsButton.cxx:40
ElectronCollectionSettingsButton::Imp::editwindow_ui
Ui::ElectronCollectionSettingsForm editwindow_ui
Definition: ElectronCollectionSettingsButton.cxx:47
ElectronCollectionSettingsButton::defaultParameterMaterial
SoMaterial * defaultParameterMaterial() const
Definition: ElectronCollectionSettingsButton.cxx:331
VP1MaterialButton::lastAppliedBrightness
double lastAppliedBrightness() const
Definition: VP1MaterialButton.cxx:173
ElectronCollectionSettingsButton::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event)
Definition: ElectronCollectionSettingsButton.cxx:389
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ElectronCollectionSettingsButton::Imp::trackLightModel
SoLightModel * trackLightModel
Definition: ElectronCollectionSettingsButton.cxx:55
ElectronCollectionSettingsButton::Imp::matButton
VP1MaterialButton * matButton
Definition: ElectronCollectionSettingsButton.cxx:49
ElectronCollectionSettingsButton::trackTubeRadiusChanged
void trackTubeRadiusChanged(const double &)
ElectronCollectionSettingsButton::cutRequiredNHitsChanged
void cutRequiredNHitsChanged(const QList< unsigned > &)
VP1Deserialise::restore
void restore(QCheckBox *sb)
Definition: VP1Deserialise.cxx:245
ElectronCollectionSettingsButton::Imp::dim
int dim
Definition: ElectronCollectionSettingsButton.cxx:67
VP1ColorSelectButton.h
ElectronCollectionSettingsButton::possibleChange_cutRequiredNHits
void possibleChange_cutRequiredNHits()
Definition: ElectronCollectionSettingsButton.cxx:598
VP1Deserialise
Definition: VP1Deserialise.h:44
ElectronCollectionSettingsButton::possibleChange_cutOnlyVertexAssocTracks
void possibleChange_cutOnlyVertexAssocTracks()
Definition: ElectronCollectionSettingsButton.cxx:606
ElectronCollectionSettingsButton::Imp::last_useDefaultCuts
bool last_useDefaultCuts
Definition: ElectronCollectionSettingsButton.cxx:65
VP1QtInventorUtils::setValueLineWidthSlider
static void setValueLineWidthSlider(QSlider *, const double &value)
Definition: VP1QtInventorUtils.cxx:1593
ElectronCollectionSettingsButton::showParameters
bool showParameters() const
Returns the number of steps to use when interpolating between paramters (0 is no interpolation....
Definition: ElectronCollectionSettingsButton.cxx:356
ElectronCollectionSettingsButton::~ElectronCollectionSettingsButton
virtual ~ElectronCollectionSettingsButton()
Definition: ElectronCollectionSettingsButton.cxx:210
ElectronCollectionSettingsButton::Imp::last_cutAllowedPhi
QList< VP1Interval > last_cutAllowedPhi
Definition: ElectronCollectionSettingsButton.cxx:62
VP1MaterialButton::setMaterial
bool setMaterial(SoMaterial *)
Definition: VP1MaterialButton.cxx:447
ElectronCollectionSettingsButton::colourParametersByTypeChanged
void colourParametersByTypeChanged(bool)
VP1HelperClassBase::systemBase
IVP1System * systemBase() const
Definition: VP1HelperClassBase.h:50
ElectronCollectionSettingsButton.h
ElectronCollectionSettingsButton::Imp::theclass
ElectronCollectionSettingsButton * theclass
Definition: ElectronCollectionSettingsButton.cxx:45
ElectronCollectionSettingsButton::updateTrackLightModel
void updateTrackLightModel(bool)
Definition: ElectronCollectionSettingsButton.cxx:296
ElectronCollectionSettingsButton::showParametersChanged
void showParametersChanged(bool)
ElectronCollectionSettingsButton::Imp::last_cutAllowedP
VP1Interval last_cutAllowedP
Definition: ElectronCollectionSettingsButton.cxx:60
VP1MaterialButton::createMaterial
static SoMaterial * createMaterial(const QColor &, const double &brightness=0.0, const double &transp=0.0)
Definition: VP1MaterialButton.cxx:786
ElectronCollectionSettingsButton::cutAllowedEta
VP1Interval cutAllowedEta() const
Definition: ElectronCollectionSettingsButton.cxx:540
VP1Deserialise::widgetHandled
void widgetHandled(QWidget *)
Definition: VP1Deserialise.cxx:658
ElectronCollectionSettingsButton::possibleChange_cutAllowedEta
void possibleChange_cutAllowedEta()
Definition: ElectronCollectionSettingsButton.cxx:582
VP1MaterialButtonBase
Definition: VP1MaterialButton.h:25
VP1MaterialButton::lastAppliedShininess
double lastAppliedShininess() const
Definition: VP1MaterialButton.cxx:172
VP1Deserialise::warnUnrestored
void warnUnrestored(QObject *)
Definition: VP1Deserialise.cxx:696
ElectronCollectionSettingsButton::updateButton
void updateButton()
Definition: ElectronCollectionSettingsButton.cxx:218
ElectronCollectionSettingsButton::m_d
Imp * m_d
Definition: ElectronCollectionSettingsButton.h:96
VP1Interval
Definition: VP1Interval.h:23
ElectronCollectionSettingsButton::Imp::defaultParametersMatButton
VP1MaterialButton * defaultParametersMatButton
Definition: ElectronCollectionSettingsButton.cxx:50
ElectronCollectionSettingsButton::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition: ElectronCollectionSettingsButton.cxx:381
ElectronCollectionSettingsButton::cutAllowedPtChanged
void cutAllowedPtChanged(const VP1Interval &)
ElectronCollectionSettingsButton::possibleChange_showParameters
void possibleChange_showParameters()
Definition: ElectronCollectionSettingsButton.cxx:614
VP1QtInventorUtils::setLimitsLineWidthSlider
static void setLimitsLineWidthSlider(QSlider *)
Definition: VP1QtInventorUtils.cxx:1563
ElectronCollectionSettingsButton::Imp::parameterTypeMatButtons
QList< VP1MaterialButton * > parameterTypeMatButtons
Definition: ElectronCollectionSettingsButton.cxx:52
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
ElectronCollectionSettingsButton::ElectronCollectionSettingsButton
ElectronCollectionSettingsButton(QWidget *parent=0, int dim=25)
Definition: ElectronCollectionSettingsButton.cxx:118
ElectronCollectionSettingsButton::cutAllowedPt
VP1Interval cutAllowedPt() const
Definition: ElectronCollectionSettingsButton.cxx:504
ElectronCollectionSettingsButton::setMaterial
virtual bool setMaterial(SoMaterial *)
Definition: ElectronCollectionSettingsButton.cxx:245
ElectronCollectionSettingsButton::numOfStepsForInterpolation
int numOfStepsForInterpolation() const
Returns true if the propagation should use the parameters already on the particle,...
Definition: ElectronCollectionSettingsButton.cxx:327
ElectronCollectionSettingsButton::setMaterialText
void setMaterialText(const QString &)
Definition: ElectronCollectionSettingsButton.cxx:110
ElectronCollectionSettingsButton::showEditMaterialDialog
void showEditMaterialDialog()
Definition: ElectronCollectionSettingsButton.cxx:234
ElectronCollectionSettingsButton::lastAppliedShininess
virtual double lastAppliedShininess() const
Definition: ElectronCollectionSettingsButton.cxx:263
ElectronCollectionSettingsButton::possibleChange_cutAllowedPhi
void possibleChange_cutAllowedPhi()
Definition: ElectronCollectionSettingsButton.cxx:590
ElectronCollectionSettingsButton::Imp::last_cutRequiredNHits
QList< unsigned > last_cutRequiredNHits
Definition: ElectronCollectionSettingsButton.cxx:63
ElectronCollectionSettingsButton::useExistingParameters
bool useExistingParameters() const
Definition: ElectronCollectionSettingsButton.cxx:323
ElectronCollectionSettingsButton::restoreFromState
void restoreFromState(const QByteArray &)
Definition: ElectronCollectionSettingsButton.cxx:478
colours
int colours[6]
Definition: computils.cxx:45
VP1MaterialButton::lastAppliedTransparency
double lastAppliedTransparency() const
Definition: VP1MaterialButton.cxx:171
ElectronCollectionSettingsButton::hideActualTrackPath
bool hideActualTrackPath() const
Definition: ElectronCollectionSettingsButton.cxx:349
ElectronCollectionSettingsButton::propagationOptionsChanged
void propagationOptionsChanged()
ElectronCollectionSettingsButton::trackTubeRadius
double trackTubeRadius() const
Definition: ElectronCollectionSettingsButton.cxx:274