ATLAS Offline Software
Loading...
Searching...
No Matches
TrackSystemController.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5
7// //
8// Implementation of class TrackSystemController //
9// //
10// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11// Initial version: February 2008 //
12// Updates: Riccardo Maria Bianchi (rbianchi@cern.ch) //
13// //
15
16#define VP1IMPVARNAME m_d
17
18// FIXME! Remove!
19#include <Inventor/C/errors/debugerror.h>
20#include <Inventor/nodes/SoSelection.h>
21
24// #include "VP1TrackSystems/TrackObjectBrowserController.h"
32
33#include "ui_vp1trackcontrollerform.h"
34#include "ui_settings_ascobjs_form.h"
35#include "ui_settings_colouring_form.h"
36#include "ui_settings_extrapolation_form.h"
37#include "ui_settings_interactions_form.h"
38#include "ui_settings_projections_form.h"
39#include "ui_settings_cuts_form.h"
40#include "ui_shift_muon_chamber_form.h"
41#include "ui_objectbrowser.h"
42
47#include "VP1Base/VP1QtUtils.h"
48#include "VP1Base/IVP1System.h"
54
58#include "TrkTrack/Track.h"
60
62#include "TrkVolumes/Volume.h"
63
64#include "Inventor/nodes/SoMaterial.h"
65#include "Inventor/nodes/SoDrawStyle.h"
66#include "Inventor/nodes/SoComplexity.h"
67#include "Inventor/nodes/SoLightModel.h"
68#include <Inventor/nodes/SoSeparator.h>
69#include <Inventor/actions/SoSearchAction.h>
70
71#include "CLHEP/Units/SystemOfUnits.h"
72
73#include <QTreeWidget>
74#include <QTreeWidgetItem>
75#include <QtCoreVersion>
76
77
78
79
80//____________________________________________________________________
82public:
84 Ui::VP1TrackControllerForm ui{};
86 void initMaterials();
87 static SoMaterial * createMaterial(const int& r,const int& g,const int& b) ;
88 SoMaterial * getMat(VP1MaterialButton*) const;
89 SoMaterial * materialFallback = nullptr;
90 // SoDrawStyle * trackDrawStyle;
91 SoDrawStyle * ascObjDrawStyle = nullptr;
92 SoComplexity * ascObjComplexity = nullptr;
93 // SoLightModel * trackLightModel;
94
99 static bool updateComboBoxContents(QComboBox*cb,const QStringList& l,QString& restoredSelection);
100 static const QString noneAvailString;
101 unsigned numberOfSelectedPRDs = 0U;
104
109 TrackCommonFlags::TrackPartsFlags last_shownTrackParts;
112 TrackLabelModes last_trackLabels;
116 // bool last_ignoreMeasurementEffectsOnTrackInProp;
117 PropagationOptionFlags last_propagationOptions;
118 float last_propMaxRadius = 0.0F;
124 TrackCommonFlags::TSOSPartsFlags last_shownTSOSParts;
125 TrackCommonFlags::TSOSPartsFlags last_customColouredTSOSParts;
137 QList<VP1Interval> last_cutAllowedPhi;
138 QList<unsigned> last_cutRequiredNHits;
145
146 Ui::TrackSysSettingsColouringForm ui_col{};
147 Ui::TrackSysSettingsExtrapolationsForm ui_extrap{};
148 Ui::TrackSysSettingsInteractionsForm ui_int{};
149 Ui::TrackSysSettingsProjectionsForm ui_proj{};
150 Ui::TrackSysSettingsCutsForm ui_cuts{};
151 Ui::TrackSysSettingsAscObjsForm ui_ascobjs{};
152 Ui::TrackSysShiftMuonChambersForm ui_shiftmuonchambers{};
153 Ui::TrackObjectBrowser ui_objBrowser{};
154
157 static bool fittersCreated;
158 static void ensureFittersCreated(IVP1System *);
159
160 QTreeWidget* objBrowserWidget = nullptr;
162
163 // Added because TrackingVolumeSvc doesn't work any more. Can remove when we move to new extrapolator
167};
168
169const QString TrackSystemController::Imp::noneAvailString = QString("None available");
170
171
172//____________________________________________________________________
173QString TrackSystemController::toString( const QList<unsigned>& l )
174{
175 QString s;
176 for(unsigned i : l) {
177 if (!s.isEmpty()) s+=", ";
178 s+=QString::number(i);
179 }
180 return "["+s+"]";
181}
182
183//____________________________________________________________________
184QString TrackSystemController::toString( const QList<int>& l )
185{
186 QString s;
187 for(int i : l) {
188 if (!s.isEmpty()) s+=", ";
189 s+=QString::number(i);
190 }
191 return "["+s+"]";
192}
193
194//____________________________________________________________________
197 if (extrapolatorsCreated||!sys)
198 return;
200
201 //Get available extrapolators:
202 QString tooltype("Trk::Extrapolator");
203 VP1AvailableToolsHelper * availTools = new VP1AvailableToolsHelper(sys);
204 availTools->addMonitoredType(tooltype);
205 QStringList existingExtrapolators = availTools->availableTools();
206 delete availTools;
207
208 VP1ToolAccessHelper toolaccess(sys);
209#if QTCORE_VERSION >= 0x050E00
210 for (const QString& key : VP1QtUtils::environmentVariableValue("VP1_JOBCFG_EXTRA_VP1_EXTRAPOLATORS").split(';',Qt::SkipEmptyParts))
211#else
212 for (const QString& key : VP1QtUtils::environmentVariableValue("VP1_JOBCFG_EXTRA_VP1_EXTRAPOLATORS").split(';',QString::SkipEmptyParts))
213#endif
214 {
215 if (existingExtrapolators.contains(key))
216 continue;
217 sys->messageDebug("Attempting creation of fitter with tooltype/key "+key);
218 Trk::IExtrapolator * tool = toolaccess.getToolPointer<Trk::IExtrapolator>(key,false/*silent*/,true/*create if not exists*/);
219 if (!tool) {
220 sys->message("WARNING: Could not create tool type/key "+key);
221 }
222
223 }
224}
225
226//____________________________________________________________________
229 if (fittersCreated||!sys)
230 return;
231 fittersCreated = true;
232
233 //Get available extrapolators:
234 QStringList fittertypes;
235 fittertypes << "Trk::KalmanFitter"
236 << "Trk::GlobalChi2Fitter"
237 << "Trk::GaussianSumFilter"
238 << "Trk::DistributedKalmanFilter"
239 << "Trk::DeterministicAnnealingFilter";
240 VP1AvailableToolsHelper * availTools = new VP1AvailableToolsHelper(sys);
241 availTools->addMonitoredTypes(fittertypes);
242 QStringList existingFitters = availTools->availableTools();
243 delete availTools;
244
245 VP1ToolAccessHelper toolaccess(sys);
246#if QTCORE_VERSION >= 0x050E00
247 for (const QString& instance : VP1QtUtils::environmentVariableValue("VP1_JOBCFG_EXTRA_VP1_FITTERS").split(';',Qt::SkipEmptyParts))
248#else
249 for (const QString& instance : VP1QtUtils::environmentVariableValue("VP1_JOBCFG_EXTRA_VP1_FITTERS").split(';',QString::SkipEmptyParts))
250#endif
251 {
252 if (existingFitters.contains(instance))
253 continue;
254 sys->messageDebug("Attempting creation of fitter with tooltype/key "+instance);
255 Trk::ITrackFitter * tool = toolaccess.getToolPointer<Trk::ITrackFitter>(instance,false/*silent*/,true/*create if not exists*/);
256 if (!tool) {
257 sys->message("WARNING: Could not create tool with type/key "+instance);
258 }
259 }
260}
261
262//____________________________________________________________________
264 : VP1Controller(sys,"TrackSystemController"), m_d(new Imp)
265{
266 m_d->theclass = this;
267 m_d->lastUpdatedAvailableExtrapolators = QStringList("<dummy>");//special.
268 m_d->lastUpdatedAvailableFitters = QStringList("<dummy>");//special.
269
270 //Stuff with tools waits until ::initTools() is called:
271 m_d->toolaccesshelper = nullptr;
272 m_d->toolhelper_extrapolators = nullptr;
273 m_d->toolhelper_fitters = nullptr;
274 m_d->matmixer = nullptr;
275
276 m_d->ui.setupUi(this);
277 m_d->trackcollwidget = new TrackCollWidget;
278 setupCollWidgetInScrollArea(m_d->ui.collWidgetScrollArea,m_d->trackcollwidget);
279
280 initDialog(m_d->ui_col, m_d->ui.pushButton_settings_colouring);
281 initDialog(m_d->ui_extrap, m_d->ui.pushButton_settings_extrapolation);
282 initDialog(m_d->ui_int, m_d->ui.pushButton_settings_interactions);
283 initDialog(m_d->ui_proj, m_d->ui.pushButton_settings_projections);
284 initDialog(m_d->ui_cuts, m_d->ui.pushButton_settings_cuts);
285 initDialog(m_d->ui_ascobjs, m_d->ui.pushButton_settings_details);
286 initDialog(m_d->ui_objBrowser, m_d->ui.pushButton_ObjectBrowser);
287
288 //init:
289 m_d->numberOfSelectedPRDs=1;//anything != 0
291
292 m_d->initMaterials();
293
294 m_d->materialFallback = new SoMaterial;
295 m_d->materialFallback->ref();
296
297 m_d->ui_cuts.etaPhiCutWidget->setSystemBasePointer(systemBase());
298
299 //Draw Styles / Complexity:
300 m_d->ascObjDrawStyle = new SoDrawStyle;
301 m_d->ascObjDrawStyle->setName("AscObjDrawStyle");
302 m_d->ascObjDrawStyle->ref();
304 connectToLastUpdateSlot(m_d->ui_ascobjs.horizontalSlider_linewidths);
305 connectToLastUpdateSlot(m_d->ui_ascobjs.horizontalSlider_pointsizes);
306
307 m_d->ascObjComplexity = new SoComplexity;
308 m_d->ascObjComplexity->setName("AscObjComplexity");
309 m_d->ascObjComplexity->ref();
311 connectToLastUpdateSlot(m_d->ui_ascobjs.horizontalSlider_complexity);
312
313 //Refit ui is dependent on env variable:
314 m_d->ui_int.radioButton_selmode_trackfits->setVisible(VP1QtUtils::environmentVariableIsOn("VP1_DEVEL_ENABLEREFIT"));
315 m_d->ui_int.groupBox_refitting->setEnabled(VP1QtUtils::environmentVariableIsOn("VP1_DEVEL_ENABLEREFIT"));
316 connect(m_d->ui_int.comboBox_fitterMode,SIGNAL(currentIndexChanged(int)),this,SLOT(updateFitPRDButtonState()));
317
318
319 //Disable elements based on job configuration:
320
322 m_d->ui_proj.checkBox_projections_muonchambers->setChecked(false);
323 m_d->ui_proj.checkBox_projections_muonchambers->setEnabled(false);
324 }
328 m_d->ui_proj.checkBox_projections_indet->setChecked(false);
329 m_d->ui_proj.checkBox_projections_indet->setEnabled(false);
330 }
331
332 //These we init explicitly since we might otherwise trigger a change
333 //before initlastvars (fixme: is this true and the right fix??)
334 m_d->last_propagator = nullptr;
335 m_d->last_trackFitter = nullptr;
336
338 // Setup connections which monitor changes in the controller so that we may emit signals as appropriate: //
340
341 // -> shownTrackParts
343 // connectToLastUpdateSlot(m_d->ui_col.checkBox_hideactualpaths);
344 connectToLastUpdateSlot(m_d->ui_proj.checkBox_projections_muonchambers);
345 connectToLastUpdateSlot(m_d->ui_proj.checkBox_projections_indet);
346 connectToLastUpdateSlot(m_d->ui_proj.groupBox_projections_vertex);
347
349 connectToLastUpdateSlot(m_d->ui_proj.spinBox_projections_vertex);
350
351
352 // // -> trackTubeRadius
353 // addUpdateSlot(SLOT(possibleChange_trackTubeRadius()));
354 // connectToLastUpdateSlot(m_d->ui_col.checkBox_trackTubes);
355 // connectToLastUpdateSlot(m_d->ui_col.doubleSpinBox_trackTubesRadiusMM);
356
357 // -> track labels
359 connectToLastUpdateSlot(m_d->ui_col.checkBox_trkLabels_Pt);
360 connectToLastUpdateSlot(m_d->ui_col.checkBox_trkLabels_p);
361 connectToLastUpdateSlot(m_d->ui_col.checkBox_trkLabels_direction);
362 connectToLastUpdateSlot(m_d->ui_col.checkBox_trkLabels_hits);
363 connectToLastUpdateSlot(m_d->ui_col.checkBox_trkLabels_pid);
364 connectToLastUpdateSlot(m_d->ui_col.checkBox_trkLabels_fitQuality);
365 connectToLastUpdateSlot(m_d->ui_col.groupBox_labels);
366
368 connectToLastUpdateSlot(m_d->ui_col.horizontalSlider_labels_trkOffset);
369
371 connectToLastUpdateSlot(m_d->ui_col.horizontalSlider_labels_xOffset);
372 connectToLastUpdateSlot(m_d->ui_col.horizontalSlider_labels_yOffset);
373 connectToLastUpdateSlot(m_d->ui_col.horizontalSlider_labels_zOffset);
374
375
376 // -> shownTSOSParts
378 connectToLastUpdateSlot(m_d->ui_ascobjs.groupBox_measurements);
379 connectToLastUpdateSlot(m_d->ui_ascobjs.groupBox_parameters);
380 connectToLastUpdateSlot(m_d->ui_ascobjs.groupBox_errors);
381 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_parametererrors);
382 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_measurementerrors);
383 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_parerror_hideperigeeerrors);
384 connectToLastUpdateSlot(m_d->ui_ascobjs.groupBox_materialeffectsontrack);
385 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_materialeffectsontrack_hideNoDE);
386 connectToLastUpdateSlot(m_d->ui_ascobjs.groupBox_surfaces);
387 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_surfaces_hidecustomsurfaces);
388 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_surfaces_hidetubesurfaces);
389
391 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_measurements_drawGP);
392
393 // -> customColouredTSOSParts
395
396 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_usecolour_measurements);
397 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_usecolour_meas_outliers);
398 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_usecolour_parameters);
399 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_useHoleColour_parameters);
400 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_usecolour_parametererrors);
401 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_usecolour_materialeffectsontrack);
402 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_usecolour_surfaces);
403
404 // -> useShortTRTMeasurements
406 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_measurements_shorttubes_trt);
407
408 // -> useShortMDTMeasurements
410 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_measurements_shorttubes_mdt);
411
412 // -> useShortMDTMeasurements
414 connectToLastUpdateSlot(m_d->ui_ascobjs.doubleSpinBox_measurements_shorttubes_scale);
415
416 // -> nStdDevForParamErrors
418 connectToLastUpdateSlot(m_d->ui_ascobjs.doubleSpinBox_parerror_stddev);
419
420 // -> parTubeErrorsDrawCylinders
422 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_parerror_drawcylinder);
423
424 // -> numberOfPointsOnCircles
426 connectToLastUpdateSlot(m_d->ui_ascobjs.horizontalSlider_complexity);
427
428 // -> materialEffectsOnTrackScale
430 connectToLastUpdateSlot(m_d->ui_ascobjs.horizontalSlider_materialeffectsontrack_scale);
431
432 // -> selectionMode
434 connectToLastUpdateSlot(m_d->ui_int.radioButton_selmode_single);
435 connectToLastUpdateSlot(m_d->ui_int.radioButton_selmode_multitracks);
436 connectToLastUpdateSlot(m_d->ui_int.radioButton_selmode_trackfits);
437
438 // -> showTruthAscObjs
440 connectToLastUpdateSlot(m_d->ui_ascobjs.checkBox_truthtracks_display_points);
441
442 // -> assocObjDetailLevel
444 connectToLastUpdateSlot(m_d->ui_ascobjs.comboBox_assocobj_detaillevel);
445
446 // -> cutAllowedP/Pt
448 connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_minpt);
449 connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_maxpt);
450 connectToLastUpdateSlot(m_d->ui_cuts.doubleSpinBox_cut_minpt_gev);
451 connectToLastUpdateSlot(m_d->ui_cuts.doubleSpinBox_cut_maxpt_gev);
452 connectToLastUpdateSlot(m_d->ui_cuts.comboBox_momtype);
453
454 // -> cutAllowedEta
456 connectToLastUpdateSlot(m_d->ui_cuts.etaPhiCutWidget,SIGNAL(allowedEtaChanged(const VP1Interval&)));
457
458 // -> cutAllowedPhi
460 connectToLastUpdateSlot(m_d->ui_cuts.etaPhiCutWidget,SIGNAL(allowedPhiChanged(const QList<VP1Interval>&)));
461
462 // -> cutRequiredNHits();
464 connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_nhits_pixel);
465 connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_nhits_sct);
466 connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_nhits_trt);
467 connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_nhits_muon);
468 connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_nprecisionhits_muon);
469 connectToLastUpdateSlot(m_d->ui_cuts.spinBox_cut_nhits_pixel);
470 connectToLastUpdateSlot(m_d->ui_cuts.spinBox_cut_nhits_sct);
471 connectToLastUpdateSlot(m_d->ui_cuts.spinBox_cut_nhits_trt);
472 connectToLastUpdateSlot(m_d->ui_cuts.spinBox_cut_nhits_muon);
473 connectToLastUpdateSlot(m_d->ui_cuts.spinBox_cut_nprecisionhits_muon);
474
475// Required detector element
476 connect(m_d->ui_cuts.checkBox_requireDetectorElement,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredDetectorElement()));
477 connect(m_d->ui_cuts.lineEdit_detectorElementId,SIGNAL(textChanged(QString)),this,SLOT(possibleChange_cutRequiredDetectorElement()));
478
479 // -> cutTruthFromIROnly
481 connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_truthtracks_creationvertexinIR);
482
483 // -> cutExcludeBarcodeZero
485 connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_truthtracks_excludebarcode0);
486
487 // -> cutTruthExcludeNeutrals
489 connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_truthtracks_excludeneutrals);
490
491 // -> cutOnlyVertexAssocTracks
493 connectToLastUpdateSlot(m_d->ui_cuts.checkBox_vertexAssociated);
494
495 // -> showTotMomentumOnMultiTrackSelection
497 connectToLastUpdateSlot(m_d->ui_int.checkBox_sel_showtotmom);
498
499 // Special: -> rerandomise
500 connect(m_d->ui_col.pushButton_colourbyrandom_rerandomise,SIGNAL(clicked()),this,SLOT(emitRerandomise()));
501
502 // Special: -> refit
503 connect(m_d->ui_int.pushButton_refit,SIGNAL(clicked()),this,SLOT(emitRefit()));
504
505 // TrackObjBrowser
506 messageVerbose("Enabling object browser");
507 m_d->objBrowserWidget = m_d->ui_objBrowser.treeWidget;
508 m_d->objBrowserWidget->setSortingEnabled(false);
509 QStringList l;
510 l<<"Object"<<"Information";
511 m_d->objBrowserWidget->setHeaderLabels(l);
512 connect(m_d->objBrowserWidget,SIGNAL(itemClicked(QTreeWidgetItem *, int)),this,SLOT(objectBrowserClicked(QTreeWidgetItem *, int)));
513
514 // Special alignment tests
515 if (VP1QtUtils::environmentVariableIsOn("VP1_TRKSYS_SHIFTCHAMBERS")) {
516 messageVerbose("Enabling shifting of Muon Chambers");
517 QWidget *widget = new QWidget;
518 m_d->ui_shiftmuonchambers.setupUi(widget);
519 messageVerbose("Making connection");
520 widget->show();
521 connect(m_d->ui_shiftmuonchambers.pushButton_Update,SIGNAL(clicked()),sys,SLOT(updateAlignment()));
522 }
523
524 // we want "Print information" on single track selection turned ON by default
525 m_d->ui_int.checkBox_selsingle_printinfo->setChecked(true);
526
527 // Since TrkVolumesSvc isn't working anymore, hardcode values. (Remove when we move to new extrapolator)
528 m_d->calorimeterEntryLayer = new Trk::Volume(nullptr, std::make_shared<Trk::CylinderVolumeBounds>(1100.0, 3200.0));
529 m_d->muonSpectrometerEntryLayer = new Trk::Volume(nullptr, std::make_shared<Trk::CylinderVolumeBounds>(4250.0, 6779.0));
530 m_d->muonSpectrometerExitLayer = new Trk::Volume(nullptr, std::make_shared<Trk::CylinderVolumeBounds>(15000.0, 21000.0)); // FIXME! Put in correct values. EJWM
531 initLastVars();
532}
533
534//____________________________________________________________________
536{
537 m_d->toolaccesshelper = new VP1ToolAccessHelper(systemBase());
538
541
542 //Ensure special VP1 extrapolator and fitters are created:
545
546 messageVerbose("Setting up tool helper to monitor extrapolators - start");
547 m_d->toolhelper_extrapolators = new VP1AvailableToolsHelper(systemBase(),this);
548 //Watch for extrapolators (and Fatras extrapolators are no-go!)
549 m_d->toolhelper_extrapolators->addMonitoredType("Trk::Extrapolator",(QStringList() << "*Fatras*"));
550 connect(m_d->toolhelper_extrapolators,SIGNAL(availableToolsChanged(const QStringList&)),
551 this,SLOT(availableExtrapolatorsChanged(const QStringList&)));
552 availableExtrapolatorsChanged(m_d->toolhelper_extrapolators->availableTools());
553 messageVerbose("Setting up tool helper to monitor extrapolators - end");
554
555 messageVerbose("Setting up tool helper to monitor fitters - start");
556 m_d->toolhelper_fitters = new VP1AvailableToolsHelper(systemBase(),this);
557 QStringList fittertypes;
558 fittertypes << "Trk::KalmanFitter"
559 << "Trk::GlobalChi2Fitter"
560 << "Trk::GaussianSumFilter"
561 << "Trk::DistributedKalmanFilter"
562 << "Trk::DeterministicAnnealingFilter";
563 m_d->toolhelper_fitters->addMonitoredTypes(fittertypes);
564 connect(m_d->toolhelper_fitters,SIGNAL(availableToolsChanged(const QStringList&)),
565 this,SLOT(availableFittersChanged(const QStringList&)));
566 availableFittersChanged(m_d->toolhelper_fitters->availableTools());
567 messageVerbose("Setting up tool helper to monitor fitters - end");
568 } else {
569 m_d->toolhelper_extrapolators = nullptr;
570 m_d->toolhelper_fitters = nullptr;
571 m_d->ui_extrap.comboBox_propagator->clear();
572 m_d->ui_extrap.comboBox_propagator->addItem(Imp::noneAvailString);
573 m_d->ui_extrap.comboBox_propagator->setEnabled(false);
574 m_d->ui_extrap.radioButton_athenaExtrapolator->setEnabled(false);
575 m_d->ui_extrap.radioButton_none->setChecked(true);
576 m_d->ui_int.comboBox_fitters->clear();
577 m_d->ui_int.comboBox_fitters->addItem(Imp::noneAvailString);
578 m_d->ui_int.comboBox_fitters->setEnabled(false);
579 //FIXME: Disable radioButton_selmode_trackfits, comboBox_fitters, lineEdit_fittedTrackCollName, pushButton_refit
580 }
581
582 // -> propagator
583 //
585 connectToLastUpdateSlot(m_d->ui_extrap.radioButton_none);
586 connectToLastUpdateSlot(m_d->ui_extrap.radioButton_athenaExtrapolator);
587 connectToLastUpdateSlot(m_d->ui_extrap.comboBox_propagator);
588
590 connectToLastUpdateSlot(m_d->ui_extrap.checkBox_ignoreMEoT);
591 connectToLastUpdateSlot(m_d->ui_extrap.checkBox_extendAllInDetTracks);
592 // connectToLastUpdateSlot(m_d->ui_extrap.comboBox_extendAllInDetTracksToHere);
593 m_d->last_propagationOptions=TrackSystemController::NoPropOptions;
594 if (m_d->ui_extrap.checkBox_ignoreMEoT->isChecked()) m_d->last_propagationOptions |= TrackSystemController::IgnoreMEOT;
595 if (m_d->ui_extrap.checkBox_extendAllInDetTracks->isChecked()) m_d->last_propagationOptions |= TrackSystemController::ExtendTrack;
596
598 connectToLastUpdateSlot(m_d->ui_extrap.checkBox_maxRadius);
599 connectToLastUpdateSlot(m_d->ui_extrap.spinBox_maxRadiusValue);
600
601 connect(m_d->ui_extrap.comboBox_extendAllInDetTracksToHere, SIGNAL(currentIndexChanged(int)),this, SLOT(emitExtrapolateToHereChanged(int)));
602 // -> trackFitter
604 //(Nothing connects directly to this slot)
605
606 //could also use testForChanges() here:
609}
610
611//____________________________________________________________________
612SoMaterial * TrackSystemController::Imp::createMaterial(const int& r,const int& g,const int& b)
613{
614 return VP1MaterialButton::createMaterial(r/255.0,g/255.0,b/255.0,0.2/*brightness*/);
615}
616
617//____________________________________________________________________
618
620{
621 //By PID => Electrons and muons:.
622 ui_col.matButton_electrons->setMaterial(createMaterial(255,0,0)); //red; //(205,103,255));//purple
623 ui_col.matButton_muons->setMaterial(createMaterial(71,255,51));//green
624
625 //By PID => Charged: bluish colours
626 ui_col.matButton_pions->setMaterial(createMaterial(74,146,255));
627 ui_col.matButton_protons->setMaterial(createMaterial(56,49,255));
628 ui_col.matButton_chargedkaons->setMaterial(createMaterial(116,255,228));
629 ui_col.matButton_othercharged->setMaterial(createMaterial(142,163,255));
630
631 //By PID => Neutral yellowish colours.
632 ui_col.matButton_neutrons->setMaterial(createMaterial(245,255,42));
633 ui_col.matButton_photons->setMaterial(createMaterial(255,227,82));
634 ui_col.matButton_neutrinos->setMaterial(createMaterial(255,152,61));
635 ui_col.matButton_otherneutrals->setMaterial(createMaterial(248,255,102));
636
637 //By charge:
638 ui_col.matButton_charge_pos->setMaterial(createMaterial(255,71,10));
639 ui_col.matButton_charge_neg->setMaterial(createMaterial(116,255,10));
640 ui_col.matButton_charge_neutral->setMaterial(createMaterial(255,227,82));
641
642 //By momentum:
643 ui_col.matButton_0GeV->setMaterial(createMaterial(0,50,0));
644 ui_col.matButton_15GeV->setMaterial(createMaterial(0,255,0));
645
646 //Associated objects:
647 ui_ascobjs.matButton_measurements->setMaterial(createMaterial(55,200,55));
648 ui_ascobjs.matButton_meas_outliers->setMaterial(createMaterial(155,155,155));
649 ui_ascobjs.matButton_parameters->setMaterial(createMaterial(100,150,200));
650 ui_ascobjs.matButton_holeParameters->setMaterial(createMaterial(100,100,100));
651 ui_ascobjs.matButton_parerrors->setMaterial(createMaterial(255,100,0));
652 SoMaterial * materialeffectsontrackMat = createMaterial(200,255,75);
653 materialeffectsontrackMat->transparency=0.5;
654 ui_ascobjs.matButton_materialeffectsontrack->setMaterial(materialeffectsontrackMat);
655 ui_ascobjs.matButton_surfaces->setMaterial(createMaterial(228,210,165));
656}
657
658//____________________________________________________________________
660{
661 messageVerbose("~TrackSystemController begin");
662 delete m_d->toolaccesshelper;
663 delete m_d->matmixer;
664 m_d->materialFallback->unref();
665 // m_d->trackDrawStyle->unref();
666 // m_d->trackLightModel->unref();
667 m_d->ascObjDrawStyle->unref();
668 m_d->ascObjComplexity->unref();
669
670 delete m_d->calorimeterEntryLayer ;
671 delete m_d->muonSpectrometerEntryLayer;
672 delete m_d->muonSpectrometerExitLayer ;
673
674 // delete m_d->objBrowserWidget;
675 delete m_d;
676 messageVerbose("~TrackSystemController end");
677}
678
679//____________________________________________________________________
681{
682 return 17;
683}
684
685//____________________________________________________________________
687{
688 messageVerbose("TrackSystemController::actualSaveSettings()");
689
690 /*
691 * NOTE!!! Important, about serialization:
692 *
693 * - order has to be the same between saving-reading
694 *
695 * See: http://www.mimec.org/node/348
696 *
697 */
698
699 messageDebug("Serialize - current version: "+QString::number( s.version() ));
700
701 // saving a string, which will be checked while restoring the values
702 s.save(QString("TrackSystemSettings"));
703
704 //versions <= 3 saved an integer here
705
706 //Display options: linewidth:
707 // s.save(VP1QtInventorUtils::getValueLineWidthSlider(m_d->ui_col.horizontalSlider_trackWidth));//Version 1+ GONE WITH VERSION 17
708 // s.widgetHandled(m_d->ui_col.horizontalSlider_trackWidth);
709
710 //Tracks base light model:
711 // s.save(m_d->ui_col.checkBox_tracksUseBaseLightModel);//version 4+ GONE WITH VERSION 17
712
713 // --- Projections options ---
714 s.save(QString("Projections options"));
715 s.save(m_d->ui_proj.checkBox_projections_indet);
716 s.save(m_d->ui_proj.checkBox_projections_muonchambers);
717 s.save(m_d->ui_proj.groupBox_projections_vertex); //v15
718 s.save(m_d->ui_proj.spinBox_projections_vertex);//v15
719 s.save(m_d->ui_proj.horizontalSlider_projections_vertex);//v15
720 // s.save(m_d->ui_col.checkBox_hideactualpaths); GONE WITH VERSION 17
721 // ---------------------------
722
723
724 //Display options - track tubes
725 // s.save(m_d->ui_col.checkBox_trackTubes);//version 8+ GONE WITH VERSION 17
726 // s.save(m_d->ui_col.doubleSpinBox_trackTubesRadiusMM);//version 8+ GONE WITH VERSION 17
727
728 //Version <= 3 had bool here
729
730
731 // ----- Propagation options -----
732 s.save(QString("Propagation options"));
733 s.save(m_d->ui_extrap.radioButton_none,
734 m_d->ui_extrap.radioButton_helical,
735 m_d->ui_extrap.radioButton_athenaExtrapolator);//version 4+
736 s.save(m_d->ui_extrap.comboBox_propagator);//NB: We restore this in a slightly special way
737 // -----------------------------------
738
739
740
741
742 // ----- Interactions options -----
743 s.save(QString("Interactions options"));
744 s.save(m_d->ui_int.lineEdit_fittedTrackCollName);//version 6+
745 s.save(m_d->ui_int.comboBox_fitters);//version 6+
746 // -----------------------------------
747
748
749
750 //Version <=2 had bool here
751
752 //version 0 output an integer followed by two bools here
753
754 //Display options - Trk::Tracks
755 //Version <=2 had bool here
756 s.save(m_d->ui_ascobjs.comboBox_assocobj_detaillevel);
757 //Version <=2 had two bool here
758
759 //Display options - Truth tracks:
760 s.save(m_d->ui_ascobjs.checkBox_truthtracks_display_points);
761
762 // --- Display options - Colours ---
763 s.save(QString("Colour options"));
764 //Display options - Colour by pdg:
765 s.save(m_d->ui_col.matButton_electrons);
766 s.save(m_d->ui_col.matButton_muons);
767 s.save(m_d->ui_col.matButton_pions);
768 s.save(m_d->ui_col.matButton_protons);
769 s.save(m_d->ui_col.matButton_chargedkaons);
770 s.save(m_d->ui_col.matButton_othercharged);
771 s.save(m_d->ui_col.matButton_neutrons);
772 s.save(m_d->ui_col.matButton_photons);
773 s.save(m_d->ui_col.matButton_neutrinos);
774 s.save(m_d->ui_col.matButton_otherneutrals);
775
776 //Display options - Colour by charge:
777 s.save(m_d->ui_col.matButton_charge_neg);//version 2+
778 s.save(m_d->ui_col.matButton_charge_pos);//version 2+
779 s.save(m_d->ui_col.matButton_charge_neutral);//version 2+
780
781 //Display options - Colour by momentum:
782 s.save(m_d->ui_col.matButton_0GeV);//version 2+
783 s.save(m_d->ui_col.matButton_15GeV);//version 2+
784 // -----------------------------------
785
786
787
788
789
790
791
792
793 // --- Cuts options ---
794 s.save(QString("Cuts options"));
795 //Cuts - general:
796 s.save(m_d->ui_cuts.checkBox_cut_minpt);
797 s.save(m_d->ui_cuts.doubleSpinBox_cut_minpt_gev);
798 s.save(m_d->ui_cuts.checkBox_cut_maxpt);
799 s.save(m_d->ui_cuts.doubleSpinBox_cut_maxpt_gev);
800 s.save(m_d->ui_cuts.comboBox_momtype);// version 10+
801
802 s.save(m_d->ui_cuts.etaPhiCutWidget);//Version 7+
803 //Versions <=6 had 2*bool, 2*double, 1*bool, 1*obsoletephisectionstate here.
804
805 //Cuts - number of hits:
806 s.save(m_d->ui_cuts.checkBox_cut_nhits_pixel);//Version 9+
807 s.save(m_d->ui_cuts.checkBox_cut_nhits_sct);//Version 9+
808 s.save(m_d->ui_cuts.checkBox_cut_nhits_trt);//Version 9+
809 s.save(m_d->ui_cuts.checkBox_cut_nhits_muon);//Version 9+
810 s.save(m_d->ui_cuts.spinBox_cut_nhits_pixel);//Version 9+
811 s.save(m_d->ui_cuts.spinBox_cut_nhits_sct);//Version 9+
812 s.save(m_d->ui_cuts.spinBox_cut_nhits_trt);//Version 9+
813 s.save(m_d->ui_cuts.spinBox_cut_nhits_muon);//Version 9+
814
815 //Cuts - truth:
816 s.save(m_d->ui_cuts.checkBox_cut_truthtracks_creationvertexinIR);
817 s.save(m_d->ui_cuts.checkBox_cut_truthtracks_excludeneutrals);
818 s.save(m_d->ui_cuts.checkBox_cut_truthtracks_excludebarcode0);
819
820 s.save(m_d->ui_cuts.checkBox_vertexAssociated);//Version 14+
821 // -----------------------------------
822
823
824
825
826
827
828 // --- Interactions options ---
829 s.save(QString("Interactions options"));
830 //Interactions - selection mode:
831 s.save(m_d->ui_int.radioButton_selmode_single,
832 m_d->ui_int.radioButton_selmode_multitracks,
833 m_d->ui_int.radioButton_selmode_trackfits);
834
835 s.save(m_d->ui_int.checkBox_selsingle_printinfo);
836 s.save(m_d->ui_int.checkBox_selsingle_printinfo_verbose);
837 s.save(m_d->ui_int.checkBox_selsingle_orientzoom);
838 s.save(m_d->ui_int.checkBox_sel_printtotmom);
839 s.save(m_d->ui_int.checkBox_sel_showtotmom);
840 s.save(m_d->ui_int.comboBox_fitterMode); // Version 12+
841 s.save(m_d->ui_int.checkBox_removeOutliers);// Version 12+
842 s.save(m_d->ui_int.comboBox_particleHypo);// Version 12+
843 // -----------------------------------
844
845
846
847
848 // --- AscObjs options ---
849 s.save(QString("AscObjs options"));
850 //AscObjs - TSOS:
851 s.save(m_d->ui_ascobjs.checkBox_materialeffectsontrack_forceposontrack);
852 s.save(m_d->ui_ascobjs.checkBox_materialeffectsontrack_hideNoDE);
853 s.save(m_d->ui_ascobjs.checkBox_measurements_shorttubes_mdt);
854 s.save(m_d->ui_ascobjs.checkBox_measurements_shorttubes_trt);
855 s.save(m_d->ui_ascobjs.checkBox_measurements_drawGP); // Version 11
856 s.save(m_d->ui_ascobjs.checkBox_parerror_drawcylinder);
857 s.save(m_d->ui_ascobjs.checkBox_parerror_hideperigeeerrors);
858 s.save(m_d->ui_ascobjs.checkBox_surfaces_hidecustomsurfaces);
859 s.save(m_d->ui_ascobjs.checkBox_surfaces_hidetubesurfaces); // Version 11
860 s.save(m_d->ui_ascobjs.checkBox_usecolour_materialeffectsontrack);
861 s.save(m_d->ui_ascobjs.checkBox_usecolour_meas_outliers);
862 s.save(m_d->ui_ascobjs.checkBox_usecolour_measurements);
863 s.save(m_d->ui_ascobjs.checkBox_usecolour_parametererrors);
864 s.save(m_d->ui_ascobjs.checkBox_usecolour_parameters);
865 s.save(m_d->ui_ascobjs.checkBox_useHoleColour_parameters);// Version 14
866 s.save(m_d->ui_ascobjs.checkBox_usecolour_surfaces);
867
868 s.save(m_d->ui_ascobjs.doubleSpinBox_parerror_stddev);
869 s.save(m_d->ui_ascobjs.groupBox_materialeffectsontrack);
870 s.save(m_d->ui_ascobjs.groupBox_measurements);
871 s.save(m_d->ui_ascobjs.groupBox_errors);// Version 13
872 s.save(m_d->ui_ascobjs.checkBox_parametererrors);// Version 13
873 s.save(m_d->ui_ascobjs.checkBox_measurementerrors);// Version 13
874 s.save(m_d->ui_ascobjs.groupBox_parameters);
875 s.save(m_d->ui_ascobjs.groupBox_surfaces);
876 s.save(m_d->ui_ascobjs.horizontalSlider_complexity);
877 s.save(m_d->ui_ascobjs.horizontalSlider_linewidths);//FIXME!!! SAVE AS ABOVE INSTEAD!!
878 s.save(m_d->ui_ascobjs.horizontalSlider_materialeffectsontrack_scale);
879 s.save(m_d->ui_ascobjs.horizontalSlider_pointsizes);//FIXME!!! SAVE AS ABOVE INSTEAD!!
880 s.save(m_d->ui_ascobjs.matButton_materialeffectsontrack);
881 s.save(m_d->ui_ascobjs.matButton_meas_outliers);
882 s.save(m_d->ui_ascobjs.matButton_measurements);
883 s.save(m_d->ui_ascobjs.matButton_parameters);
884 s.save(m_d->ui_ascobjs.matButton_holeParameters);// Version 14
885 s.save(m_d->ui_ascobjs.matButton_parerrors);
886 s.save(m_d->ui_ascobjs.matButton_surfaces);
887 s.save(m_d->ui_ascobjs.doubleSpinBox_measurements_shorttubes_scale);//Version 5+
888 // -----------------------------------
889
890
891
892
893 // ----- Colouring options -----
894 s.save(QString("Colouring options"));
895 // Version 12
896 s.save(m_d->ui_col.groupBox_labels);
897 s.save(m_d->ui_col.horizontalSlider_labels_trkOffset);
898 s.save(m_d->ui_col.horizontalSlider_labels_xOffset);
899 s.save(m_d->ui_col.horizontalSlider_labels_yOffset);
900 s.save(m_d->ui_col.horizontalSlider_labels_zOffset);
901 s.save(m_d->ui_col.checkBox_trkLabels_p);
902 s.save(m_d->ui_col.checkBox_trkLabels_Pt);
903 s.save(m_d->ui_col.checkBox_trkLabels_pid);
904 s.save(m_d->ui_col.checkBox_trkLabels_hits);
905 s.save(m_d->ui_col.checkBox_trkLabels_fitQuality);
906 s.save(m_d->ui_col.checkBox_trkLabels_direction);
907 // --------------------------
908
909
910
911
912
913
914 // ----- Extrap options -----
915 s.save(QString("Extrapolator options"));
916 s.save(m_d->ui_extrap.checkBox_ignoreMEoT); // Version 14
917 s.save(m_d->ui_extrap.checkBox_extendAllInDetTracks);
918 s.save(m_d->ui_extrap.comboBox_extendAllInDetTracksToHere);
919 s.save(m_d->ui_extrap.horizontalSlider_granularity);
920 s.save(m_d->ui_extrap.checkBox_maxRadius); // Version 15
921 s.save(m_d->ui_extrap.spinBox_maxRadiusValue);
922 // --------------------------
923
924
925 messageVerbose("TrackSystemController::actualSaveSettings() - DONE.");
926
927}
928
929//____________________________________________________________________
931{
932 messageDebug("TrackSystemController::actualRestoreSettings()");
933
934 /*
935 * NOTE!!! Important, about serialization:
936 *
937 * - order has to be the same between saving-reading
938 *
939 * See: http://www.mimec.org/node/348
940 *
941 */
942
943 messageDebug("Deserialize - current version: "+QString::number( s.version() ));
944
945 if (s.version()<0||s.version()>currentSettingsVersion()) {
946 message("Warning: State data in .vp1 file has unsupported version ("+str(s.version())+")");
947 return;
948 }
949
950 if (s.version()<17) {
951 message("Warning: the VP1 GUI has changed since .vp1 file format version ("+str(s.version())+"), which means you will have lost the line thickness etc. settings formally found in the Colouring pop-up dialogue.");
952 }
953
954 if (s.version()<17) {
955 s.ignoreString();
956 } else {
957 QString tt = s.restoreString();
958 messageDebug("Check string: " + tt);
959 if (tt != "TrackSystemSettings") {
960 messageDebug("\n\nERROR!! Settings order does not match!!");
961 return;
962 }
963 }
964
965 if (s.version()<=3)
966 s.ignoreInt();
967
968 // //Display options: linewidth:
969 // if (s.version()>=1) {
970 // VP1QtInventorUtils::setValueLineWidthSlider(m_d->ui_col.horizontalSlider_trackWidth,s.restoreDouble());
971 // s.widgetHandled(m_d->ui_col.horizontalSlider_trackWidth);
972 // }
973 if (s.version()<17)
974 s.ignoreInt(); //m_d->ui_col.horizontalSlider_trackWidth
975
976 //Tracks base light model:
977 // if (s.version()>=4)
978 // s.restore(m_d->ui_col.checkBox_tracksUseBaseLightModel);
979 if (s.version()<17)
980 s.ignoreBool(); //m_d->ui_col.checkBox_tracksUseBaseLightModel
981
982
983
984
985
986 // --- Projections options ---
987 if (s.version()>=17 && s.restoreString() != "Projections options") messageDebug("\n\nERROR! --> 'Projections options'");
988 s.restore(m_d->ui_proj.checkBox_projections_indet);
989 s.restore(m_d->ui_proj.checkBox_projections_muonchambers);
990 if (s.version()>=15){
991 s.restore(m_d->ui_proj.groupBox_projections_vertex);
992 s.restore(m_d->ui_proj.spinBox_projections_vertex);
993 s.restore(m_d->ui_proj.horizontalSlider_projections_vertex);
994 }
995 // s.restore(m_d->ui_col.checkBox_hideactualpaths);
996 if (s.version()<17)
997 s.ignoreBool(); //m_d->ui_col.checkBox_hideactualpaths
998 // --------------------------------------
999
1000
1001
1002
1003 //Display options - track tubes
1004 // if (s.version()>=8) {
1005 // s.restore(m_d->ui_col.checkBox_trackTubes);
1006 // s.restore(m_d->ui_col.doubleSpinBox_trackTubesRadiusMM);
1007 // }
1008 if (s.version()<17){
1009 s.ignoreBool(); //m_d->ui_col.checkBox_trackTubes
1010 s.ignoreDouble(); //m_d->ui_col.doubleSpinBox_trackTubesRadiusMM
1011 }
1012
1013 if (s.version()<=3)
1014 s.ignoreBool();
1015
1016
1017
1018
1019 // ----- Propagation options -----
1020 if (s.version()>=17 && s.restoreString() != "Propagation options") messageDebug("\n\nERROR! --> 'Propagation options'");
1021 if (s.version()>=4)
1022 s.restore(m_d->ui_extrap.radioButton_none,
1023 m_d->ui_extrap.radioButton_helical,
1024 m_d->ui_extrap.radioButton_athenaExtrapolator);
1025 m_d->restoredLastPropagator = s.restoreString();
1026 s.widgetHandled(m_d->ui_extrap.comboBox_propagator);
1027 // -----------------------------------
1028
1029
1030
1031
1032 // ----- Interactions options -----
1033 if (s.version()>=17 && s.restoreString() != "Interactions options") messageDebug("\n\nERROR! --> 'Interactions options'");
1034 if (s.version()>=6) {
1035 s.restore(m_d->ui_int.lineEdit_fittedTrackCollName);
1036 m_d->restoredLastFitter = s.restoreString();
1037 s.widgetHandled(m_d->ui_int.comboBox_fitters);
1038 }
1039 // -----------------------------------
1040
1041
1042
1043
1044 if (s.version()<=2)
1045 s.ignoreBool();
1046
1047 if (s.version()==0) {
1048 s.ignoreInt();
1049 s.ignoreBool();
1050 s.ignoreBool();
1051 }
1052
1053 //Display options - Trk::Tracks
1054 if (s.version()<=2)
1055 s.ignoreBool();
1056 s.restore(m_d->ui_ascobjs.comboBox_assocobj_detaillevel);
1057 if (s.version()<=2) {
1058 s.ignoreBool();
1059 s.ignoreBool();
1060 }
1061
1062 //Display options - Truth tracks:
1063 s.restore(m_d->ui_ascobjs.checkBox_truthtracks_display_points);
1064
1065
1066 // --- Display options - Colours ---
1067 if (s.version()>=17 && s.restoreString() != "Colour options") messageDebug("\n\nERROR! --> 'Colour options'");
1068 //Display options - Colour by pdg:
1069 s.restore(m_d->ui_col.matButton_electrons);
1070 s.restore(m_d->ui_col.matButton_muons);
1071 s.restore(m_d->ui_col.matButton_pions);
1072 s.restore(m_d->ui_col.matButton_protons);
1073 s.restore(m_d->ui_col.matButton_chargedkaons);
1074 s.restore(m_d->ui_col.matButton_othercharged);
1075 s.restore(m_d->ui_col.matButton_neutrons);
1076 s.restore(m_d->ui_col.matButton_photons);
1077 s.restore(m_d->ui_col.matButton_neutrinos);
1078 s.restore(m_d->ui_col.matButton_otherneutrals);
1079 if (s.version()>=2) {
1080 //Display options - Colour by charge:
1081 s.restore(m_d->ui_col.matButton_charge_neg);
1082 s.restore(m_d->ui_col.matButton_charge_pos);
1083 s.restore(m_d->ui_col.matButton_charge_neutral);
1084
1085 //Display options - Colour by momentum:
1086 s.restore(m_d->ui_col.matButton_0GeV);
1087 s.restore(m_d->ui_col.matButton_15GeV);
1088 }
1089 // -----------------------------------
1090
1091
1092
1093
1094
1095 // --- Cuts options ---
1096 if (s.version()>=17 && s.restoreString() != "Cuts options") messageDebug("\n\nERROR! --> 'Cuts options'");
1097 //Cuts - general:
1098 s.restore(m_d->ui_cuts.checkBox_cut_minpt);
1099 s.restore(m_d->ui_cuts.doubleSpinBox_cut_minpt_gev);
1100 s.restore(m_d->ui_cuts.checkBox_cut_maxpt);
1101 s.restore(m_d->ui_cuts.doubleSpinBox_cut_maxpt_gev);
1102
1103 if (s.version()>=10) {
1104 s.restore(m_d->ui_cuts.comboBox_momtype);
1105 }
1106
1107 if (s.version()>=7) {
1108 s.restore(m_d->ui_cuts.etaPhiCutWidget);
1109 } else {
1110 s.ignoreBool();
1111 s.ignoreBool();
1112 s.ignoreDouble();
1113 s.ignoreDouble();
1114 s.ignoreBool();
1115 s.ignoreObsoletePhiSectionWidgetState();
1116 }
1117
1118 if (s.version()>=9) {
1119 s.restore(m_d->ui_cuts.checkBox_cut_nhits_pixel);
1120 s.restore(m_d->ui_cuts.checkBox_cut_nhits_sct);
1121 s.restore(m_d->ui_cuts.checkBox_cut_nhits_trt);
1122 s.restore(m_d->ui_cuts.checkBox_cut_nhits_muon);
1123 s.restore(m_d->ui_cuts.spinBox_cut_nhits_pixel);
1124 s.restore(m_d->ui_cuts.spinBox_cut_nhits_sct);
1125 s.restore(m_d->ui_cuts.spinBox_cut_nhits_trt);
1126 s.restore(m_d->ui_cuts.spinBox_cut_nhits_muon);
1127 }
1128
1129 //Cuts - truth:
1130 s.restore(m_d->ui_cuts.checkBox_cut_truthtracks_creationvertexinIR);
1131 s.restore(m_d->ui_cuts.checkBox_cut_truthtracks_excludeneutrals);
1132 s.restore(m_d->ui_cuts.checkBox_cut_truthtracks_excludebarcode0);
1133
1134 if (s.version()>=14) s.restore(m_d->ui_cuts.checkBox_vertexAssociated);
1135 // -----------------------------------
1136
1137
1138
1139
1140
1141 // --- Interactions options ---
1142 if (s.version()>=17 && s.restoreString() != "Interactions options") messageDebug("\n\nERROR! --> 'Interactions options'");
1143 //Interactions - selection mode:
1144 s.restore(m_d->ui_int.radioButton_selmode_single,
1145 m_d->ui_int.radioButton_selmode_multitracks,
1146 m_d->ui_int.radioButton_selmode_trackfits);
1147
1148 s.restore(m_d->ui_int.checkBox_selsingle_printinfo);
1149 s.restore(m_d->ui_int.checkBox_selsingle_printinfo_verbose);
1150 s.restore(m_d->ui_int.checkBox_selsingle_orientzoom);
1151 s.restore(m_d->ui_int.checkBox_sel_printtotmom);
1152 s.restore(m_d->ui_int.checkBox_sel_showtotmom);
1153 if (s.version()>=12){
1154 s.restore(m_d->ui_int.comboBox_fitterMode);
1155 s.restore(m_d->ui_int.checkBox_removeOutliers);
1156 s.restore(m_d->ui_int.comboBox_particleHypo);
1157 }
1158 // -----------------------------------
1159
1160
1161
1162
1163
1164
1165
1166 // --- AscObjs options ---
1167 if (s.version()>=17 && s.restoreString() != "AscObjs options") messageDebug("\n\nERROR! --> 'AscObjs options'");
1168 //AscObjs - TSOS:
1169 s.restore(m_d->ui_ascobjs.checkBox_materialeffectsontrack_forceposontrack);
1170 s.restore(m_d->ui_ascobjs.checkBox_materialeffectsontrack_hideNoDE);
1171 s.restore(m_d->ui_ascobjs.checkBox_measurements_shorttubes_mdt);
1172 s.restore(m_d->ui_ascobjs.checkBox_measurements_shorttubes_trt);
1173 if (s.version()>=11) s.restore(m_d->ui_ascobjs.checkBox_measurements_drawGP);
1174 s.restore(m_d->ui_ascobjs.checkBox_parerror_drawcylinder);
1175 s.restore(m_d->ui_ascobjs.checkBox_parerror_hideperigeeerrors);
1176 s.restore(m_d->ui_ascobjs.checkBox_surfaces_hidecustomsurfaces);
1177 if (s.version()>=11) s.restore(m_d->ui_ascobjs.checkBox_surfaces_hidetubesurfaces);
1178 s.restore(m_d->ui_ascobjs.checkBox_usecolour_materialeffectsontrack);
1179 s.restore(m_d->ui_ascobjs.checkBox_usecolour_meas_outliers);
1180 s.restore(m_d->ui_ascobjs.checkBox_usecolour_measurements);
1181 if (s.version()<12) s.restore(m_d->ui_ascobjs.checkBox_parametererrors); // was groupBox_parametererrors before...
1182 s.restore(m_d->ui_ascobjs.checkBox_usecolour_parametererrors);
1183 s.restore(m_d->ui_ascobjs.checkBox_usecolour_parameters);
1184 if (s.version()>=14)
1185 s.restore(m_d->ui_ascobjs.checkBox_useHoleColour_parameters);
1186 s.restore(m_d->ui_ascobjs.checkBox_usecolour_surfaces);
1187 s.restore(m_d->ui_ascobjs.doubleSpinBox_parerror_stddev);
1188 s.restore(m_d->ui_ascobjs.groupBox_materialeffectsontrack);
1189 s.restore(m_d->ui_ascobjs.groupBox_measurements);
1190 if (s.version()>=12) {
1191 s.restore(m_d->ui_ascobjs.groupBox_errors);
1192 s.restore(m_d->ui_ascobjs.checkBox_parametererrors);
1193 s.restore(m_d->ui_ascobjs.checkBox_measurementerrors);
1194 }
1195 s.restore(m_d->ui_ascobjs.groupBox_parameters);
1196 s.restore(m_d->ui_ascobjs.groupBox_surfaces);
1197 s.restore(m_d->ui_ascobjs.horizontalSlider_complexity);
1198 s.restore(m_d->ui_ascobjs.horizontalSlider_linewidths);//FIXME!!! SAVE AS ABOVE INSTEAD!!
1199 s.restore(m_d->ui_ascobjs.horizontalSlider_materialeffectsontrack_scale);
1200 s.restore(m_d->ui_ascobjs.horizontalSlider_pointsizes);//FIXME!!! SAVE AS ABOVE INSTEAD!!
1201 s.restore(m_d->ui_ascobjs.matButton_materialeffectsontrack);
1202 s.restore(m_d->ui_ascobjs.matButton_meas_outliers);
1203 s.restore(m_d->ui_ascobjs.matButton_measurements);
1204 s.restore(m_d->ui_ascobjs.matButton_parameters);
1205 if (s.version()>=14)
1206 s.restore(m_d->ui_ascobjs.matButton_holeParameters);
1207 s.restore(m_d->ui_ascobjs.matButton_parerrors);
1208 s.restore(m_d->ui_ascobjs.matButton_surfaces);
1209 if (s.version()>=5)
1210 s.restore(m_d->ui_ascobjs.doubleSpinBox_measurements_shorttubes_scale);
1211 // -----------------------------------
1212
1213
1214
1215
1216
1217
1218 //Interactions - track fits:
1219
1220
1221
1222 // ----- Colouring options -----
1223 if (s.version()>=17 && s.restoreString() != "Colouring options") messageDebug("\n\nERROR! --> 'Colouring options'");
1224 if (s.version()>=12){
1225 s.restore(m_d->ui_col.groupBox_labels);
1226 s.restore(m_d->ui_col.horizontalSlider_labels_trkOffset);
1227 s.restore(m_d->ui_col.horizontalSlider_labels_xOffset);
1228 s.restore(m_d->ui_col.horizontalSlider_labels_yOffset);
1229 s.restore(m_d->ui_col.horizontalSlider_labels_zOffset);
1230 s.restore(m_d->ui_col.checkBox_trkLabels_p);
1231 s.restore(m_d->ui_col.checkBox_trkLabels_Pt);
1232 s.restore(m_d->ui_col.checkBox_trkLabels_pid);
1233 s.restore(m_d->ui_col.checkBox_trkLabels_hits);
1234 s.restore(m_d->ui_col.checkBox_trkLabels_fitQuality);
1235 }
1236 if (s.version()>=16)
1237 s.restore(m_d->ui_col.checkBox_trkLabels_direction);
1238
1239
1240
1241
1242
1243 // ----- Extrap options -----
1244 // Version 14
1245 if (s.version()>=17 && s.restoreString() != "Extrapolator options") messageDebug("\n\nERROR! --> 'Extrapolator options'");
1246 if (s.version()>=14){
1247 s.restore(m_d->ui_extrap.checkBox_ignoreMEoT);
1248 s.restore(m_d->ui_extrap.checkBox_extendAllInDetTracks);
1249 s.restore(m_d->ui_extrap.comboBox_extendAllInDetTracksToHere);
1250 s.restore(m_d->ui_extrap.horizontalSlider_granularity);
1251 }
1252 // version 15
1253 if (s.version()>=15){
1254 s.restore(m_d->ui_extrap.checkBox_maxRadius);
1255 s.restore(m_d->ui_extrap.spinBox_maxRadiusValue);
1256 }
1257 // ------------------------------
1258
1259
1260
1261 messageDebug("TrackSystemController::actualRestoreSettings() - DONE.");
1262
1263}
1264
1265//____________________________________________________________________
1267{
1268 return m_d->trackcollwidget;
1269}
1270
1271//Access methods:
1272
1273//____________________________________________________________________
1275{
1276 if (!mb) {
1277 theclass->message("ERROR: Null material button pointer");
1278 return materialFallback;
1279 }
1280 QList<SoMaterial*> mats = mb->handledMaterials();
1281 if (mats.count()!=1) {
1282 theclass->message("ERROR: No material in button");
1283 return materialFallback;
1284 }
1285 return mats.at(0);
1286}
1287
1288//____________________________________________________________________
1289SoMaterial * TrackSystemController::getMaterialForPDGCode(const int& pdgCode) const
1290{
1291 VP1MaterialButton * matbutton(nullptr);
1292 int abspdg = abs(pdgCode);
1293 switch (abspdg) {
1294 case 211: matbutton = m_d->ui_col.matButton_pions; break;
1295 case 11: matbutton = m_d->ui_col.matButton_electrons; break;
1296 case 22: matbutton = m_d->ui_col.matButton_photons; break;
1297 case 13: matbutton = m_d->ui_col.matButton_muons; break;
1298 case 2212: matbutton = m_d->ui_col.matButton_protons; break;
1299 case 2112: matbutton = m_d->ui_col.matButton_neutrons; break;
1300 case 2: return m_d->materialFallback;
1301 //Only use CHARGED kaons here!!
1302 // case 130://k-long
1303 // case 310://k-short
1304 // case 311://k0
1305 case 321://k+
1306 // case 313://k*0
1307 case 323://k*+
1308 //Fixme: More (charged) kaon states???
1309 matbutton = m_d->ui_col.matButton_chargedkaons; break;
1310 case 12://nu_e
1311 case 14://nu_mu
1312 case 16://nu_tau
1313 case 18://fourth gen. neutrino:
1314 matbutton = m_d->ui_col.matButton_neutrinos; break;
1315 default:
1316 bool ok;
1317 double charge;
1319 if (!ok) {
1320 message("WARNING: Could not look up charge of pdg code "+str(abspdg)+". Assuming charged.");
1321 charge = 1.0;
1322 }
1323 if (charge==0.0)
1324 matbutton = m_d->ui_col.matButton_otherneutrals;
1325 else
1326 matbutton = m_d->ui_col.matButton_othercharged;
1327 break;
1328 }
1329 return m_d->getMat(matbutton);
1330}
1331
1332//____________________________________________________________________
1334{
1335 if (charge>0)
1336 return m_d->getMat(m_d->ui_col.matButton_charge_pos);
1337 else if (charge<0)
1338 return m_d->getMat(m_d->ui_col.matButton_charge_neg);
1339 return m_d->getMat(m_d->ui_col.matButton_charge_neutral);
1340}
1341
1342//____________________________________________________________________
1343SoMaterial * TrackSystemController::getMaterialForMomentum(const double& absmom) const
1344{
1345 static const double low=0*CLHEP::GeV;
1346 static const double high=15*CLHEP::GeV;
1347 if (absmom<=low)
1348 return m_d->getMat(m_d->ui_col.matButton_0GeV);
1349 else if (absmom>=high)
1350 return m_d->getMat(m_d->ui_col.matButton_15GeV);
1351
1352 if (!m_d->matmixer)
1353 m_d->matmixer = new VP1SoMaterialMixer(systemBase());
1354
1355 const double x = (absmom-low)/(high-low);
1356 return m_d->matmixer->getMixedMaterial( m_d->getMat(m_d->ui_col.matButton_0GeV), 1-x,
1357 m_d->getMat(m_d->ui_col.matButton_15GeV), x );
1358}
1359
1360//____________________________________________________________________
1362{
1363 return m_d->getMat(m_d->ui_ascobjs.matButton_measurements);
1364}
1365
1366//____________________________________________________________________
1368{
1369 return m_d->getMat(m_d->ui_ascobjs.matButton_meas_outliers);
1370}
1371
1372//____________________________________________________________________
1374{
1375 return m_d->getMat(m_d->ui_ascobjs.matButton_parameters);
1376}
1377
1378//____________________________________________________________________
1380{
1381 return m_d->getMat(m_d->ui_ascobjs.matButton_holeParameters);
1382}
1383
1384//____________________________________________________________________
1386{
1387 return m_d->getMat(m_d->ui_ascobjs.matButton_parerrors);
1388}
1389
1390//____________________________________________________________________
1392{
1393 return m_d->getMat(m_d->ui_ascobjs.matButton_materialeffectsontrack);
1394}
1395
1396//____________________________________________________________________
1398{
1399 return m_d->getMat(m_d->ui_ascobjs.matButton_surfaces);
1400}
1401
1402// //____________________________________________________________________
1403// void TrackSystemController::updateTrackDrawStyle()
1404// {
1405// double val = VP1QtInventorUtils::getValueLineWidthSlider(m_d->ui_col.horizontalSlider_trackWidth);
1406// if (m_d->trackDrawStyle->lineWidth.getValue()!=val)
1407// m_d->trackDrawStyle->lineWidth = val;
1408// }
1409
1410// //____________________________________________________________________
1411// void TrackSystemController::updateTrackLightModel()
1412// {
1413// bool base = m_d->ui_col.checkBox_tracksUseBaseLightModel->isChecked();
1414// if (m_d->trackLightModel->model.getValue()!=(base?SoLightModel::BASE_COLOR:SoLightModel::PHONG)) {
1415// messageVerbose("TrackLightModel changed (base = "+str(base));
1416// if (base)
1417// m_d->trackLightModel->model.setValue(SoLightModel::BASE_COLOR);
1418// else
1419// m_d->trackLightModel->model.setValue(SoLightModel::PHONG);
1420// }
1421// }
1422
1423//____________________________________________________________________
1425{
1426 double val_lw = VP1QtInventorUtils::getValueLineWidthSlider(m_d->ui_ascobjs.horizontalSlider_linewidths);
1427 double val_ps = VP1QtInventorUtils::getValuePointSizeSlider(m_d->ui_ascobjs.horizontalSlider_pointsizes);
1428 if (m_d->ascObjDrawStyle->lineWidth.getValue()!=val_lw)
1429 m_d->ascObjDrawStyle->lineWidth = val_lw;
1430 if (m_d->ascObjDrawStyle->pointSize.getValue()!=val_ps)
1431 m_d->ascObjDrawStyle->pointSize = val_ps;
1432}
1433
1434
1435//____________________________________________________________________
1437{
1438 //choose complexity in interval [0.01,1.0]
1439 const double val = std::min<double>(1.0,std::max<double>(0.0,0.01+0.991*
1440 (m_d->ui_ascobjs.horizontalSlider_complexity->value()
1441 -m_d->ui_ascobjs.horizontalSlider_complexity->minimum())/
1442 (m_d->ui_ascobjs.horizontalSlider_complexity->maximum()*1.0)));
1443 if (m_d->ascObjComplexity->value.getValue()!=val)
1444 m_d->ascObjComplexity->value.setValue(val);
1445}
1446
1447// //____________________________________________________________________
1448// SoDrawStyle * TrackSystemController::trackDrawStyle() const
1449// {
1450// return m_d->trackDrawStyle;
1451// }
1452
1453// //____________________________________________________________________
1454// SoLightModel * TrackSystemController::trackLightModel() const
1455// {
1456// return m_d->trackLightModel;
1457// }
1458
1459//____________________________________________________________________
1461{
1462 return m_d->ascObjDrawStyle;
1463}
1464
1465//____________________________________________________________________
1467{
1468 return m_d->ascObjComplexity;
1469}
1470
1471//____________________________________________________________________
1473{
1474 QString name = m_d->ui_int.lineEdit_fittedTrackCollName->text().simplified();
1475 return name.isEmpty() ? "<noname>" : name;
1476}
1477
1478//____________________________________________________________________
1479TrackCommonFlags::TrackPartsFlags TrackSystemController::shownTrackParts() const
1480{
1481 TrackCommonFlags::TrackPartsFlags parts = TrackCommonFlags::NoParts;
1482 // if (!m_d->ui_col.checkBox_hideactualpaths->isChecked()) parts |= TrackCommonFlags::ActualPath;
1483 parts |= TrackCommonFlags::ActualPath; // sensible default.
1484 if (m_d->ui_proj.checkBox_projections_indet->isChecked()) parts |= TrackCommonFlags::InDetProjections;
1485 if (m_d->ui_proj.groupBox_projections_vertex->isChecked()) parts |= TrackCommonFlags::VertexProjections;
1486 if (VP1JobConfigInfo::hasMuonGeometry()&&m_d->ui_proj.checkBox_projections_muonchambers->isChecked()) parts |= TrackCommonFlags::MuonProjections;
1487 return parts;
1488}
1489
1491 messageVerbose("angleForVertexPlane"+str(m_d->ui_proj.spinBox_projections_vertex->value()));
1492
1493 if (!m_d->ui_proj.groupBox_projections_vertex->isChecked()) return -1;
1494 return m_d->ui_proj.spinBox_projections_vertex->value();
1495}
1496
1497// //____________________________________________________________________
1498// double TrackSystemController::trackTubeRadius() const
1499// {
1500// return m_d->ui_col.checkBox_trackTubes->isChecked() ?
1501// m_d->ui_col.doubleSpinBox_trackTubesRadiusMM->value()*CLHEP::mm : 0.0;
1502// }
1503
1504//____________________________________________________________________
1505TrackCommonFlags::TSOSPartsFlags TrackSystemController::shownTSOSParts() const
1506{
1507 TrackCommonFlags::TSOSPartsFlags f(TrackCommonFlags::TSOS_NoObjects);
1508 if (m_d->ui_ascobjs.groupBox_parameters->isChecked())
1510 if (m_d->ui_ascobjs.groupBox_errors->isChecked()&&m_d->ui_ascobjs.checkBox_parametererrors->isChecked()) {
1512 if (!m_d->ui_ascobjs.checkBox_parerror_hideperigeeerrors->isChecked())
1514 }
1515 if (m_d->ui_ascobjs.groupBox_errors->isChecked()&&m_d->ui_ascobjs.checkBox_measurementerrors->isChecked()) {
1517 }
1518 if (m_d->ui_ascobjs.groupBox_measurements->isChecked()) {
1521 }
1522 if (m_d->ui_ascobjs.groupBox_surfaces->isChecked()) {
1524 if (!m_d->ui_ascobjs.checkBox_surfaces_hidecustomsurfaces->isChecked())
1526 if (!m_d->ui_ascobjs.checkBox_surfaces_hidetubesurfaces->isChecked())
1528 }
1529 if (m_d->ui_ascobjs.groupBox_materialeffectsontrack->isChecked()) {
1531 if (!m_d->ui_ascobjs.checkBox_materialeffectsontrack_hideNoDE->isChecked())
1533 }
1534
1535 return f;
1536}
1537
1538//____________________________________________________________________
1539TrackCommonFlags::TSOSPartsFlags TrackSystemController::customColouredTSOSParts() const
1540{
1541 TrackCommonFlags::TSOSPartsFlags f(TrackCommonFlags::TSOS_NoObjects);
1542 if (m_d->ui_ascobjs.checkBox_usecolour_measurements->isChecked())
1544 if (m_d->ui_ascobjs.checkBox_usecolour_meas_outliers->isChecked())
1546 if (m_d->ui_ascobjs.checkBox_usecolour_parameters->isChecked())
1548 if (m_d->ui_ascobjs.checkBox_useHoleColour_parameters->isChecked())
1550 if (m_d->ui_ascobjs.checkBox_usecolour_parametererrors->isChecked())
1552 if (m_d->ui_ascobjs.checkBox_usecolour_materialeffectsontrack->isChecked())
1554 if (m_d->ui_ascobjs.checkBox_usecolour_surfaces->isChecked())
1556
1557 return f;
1558}
1559
1560//____________________________________________________________________
1562{
1563 return m_d->ui_ascobjs.checkBox_measurements_shorttubes_trt->isChecked();
1564}
1565
1566//____________________________________________________________________
1568{
1569 return m_d->ui_ascobjs.checkBox_measurements_shorttubes_mdt->isChecked();
1570}
1571
1572//____________________________________________________________________
1574{
1575 return m_d->ui_ascobjs.checkBox_surfaces_hidetubesurfaces->isChecked();
1576}
1577
1578//____________________________________________________________________
1580{
1581 return m_d->ui_ascobjs.checkBox_surfaces_hidecustomsurfaces->isChecked();
1582}
1583
1584//____________________________________________________________________
1586{
1587 return m_d->ui_ascobjs.checkBox_measurements_drawGP->isChecked();
1588}
1589
1590
1591//____________________________________________________________________
1593{
1594 return std::max(0.1*CLHEP::mm,m_d->ui_ascobjs.doubleSpinBox_measurements_shorttubes_scale->value()*CLHEP::cm);
1595}
1596
1597//____________________________________________________________________
1599{
1600 return std::min<double>(1.0e3,std::max<double>(1.0e-3,m_d->ui_ascobjs.doubleSpinBox_parerror_stddev->value()));
1601}
1602
1603//____________________________________________________________________
1605{
1606 return m_d->ui_ascobjs.checkBox_parerror_drawcylinder->isChecked();
1607}
1608
1609//____________________________________________________________________
1611{
1612 const int val(m_d->ui_ascobjs.horizontalSlider_complexity->value());
1613 const int max(m_d->ui_ascobjs.horizontalSlider_complexity->maximum());
1614 const int min(m_d->ui_ascobjs.horizontalSlider_complexity->minimum());
1615 //special cases:
1616 if (val==max)
1617 return 80;
1618 else if (val==min)
1619 return 4;
1620
1621 //roughly 4..32:
1622 const int n(1+static_cast<int>(0.5+7.0*(val-min)/(1.0*max)));//number between 1 and 8
1623 return std::min<int>(32,std::max<int>(4,4*n));
1624}
1625
1626//____________________________________________________________________
1628{
1629 return m_d->ui_ascobjs.horizontalSlider_materialeffectsontrack_scale->value()/5.0;
1630}
1631
1632//____________________________________________________________________
1634{
1635 if (!m_d->toolaccesshelper
1636 ||!m_d->ui_extrap.radioButton_athenaExtrapolator->isChecked()
1637 ||m_d->ui_extrap.comboBox_propagator->count()==0)
1638 return nullptr;
1639
1640 QString key = m_d->ui_extrap.comboBox_propagator->currentText();
1641 if (key==Imp::noneAvailString)
1642 return nullptr;
1643 return key.isEmpty() ? nullptr : m_d->toolaccesshelper->getToolPointer<Trk::IExtrapolator>(key);
1644}
1645
1646TrackSystemController::PropagationOptionFlags TrackSystemController::propagationOptions() const{
1647 PropagationOptionFlags options=TrackSystemController::NoPropOptions;
1648 if (m_d->ui_extrap.checkBox_ignoreMEoT->isChecked()) options |= TrackSystemController::IgnoreMEOT;
1649 if (m_d->ui_extrap.checkBox_extendAllInDetTracks->isChecked()) options |= TrackSystemController::ExtendTrack;
1650 return options;
1651}
1652
1654 if (!m_d->ui_extrap.checkBox_maxRadius->isChecked()) return -1.0;
1655 return m_d->ui_extrap.spinBox_maxRadiusValue->value();
1656}
1657
1661
1663{
1664 return m_d->ui_extrap.checkBox_ignoreMEoT->isChecked();
1665}
1666
1667//____________________________________________________________________
1669{
1670 if (!m_d->toolaccesshelper
1671 ||m_d->ui_int.comboBox_fitters->count()==0)
1672 return nullptr;
1673
1674 QString key = m_d->ui_int.comboBox_fitters->currentText();
1675 if (key==Imp::noneAvailString)
1676 return nullptr;
1677 return key.isEmpty() ? nullptr : m_d->toolaccesshelper->getToolPointer<Trk::ITrackFitter>(key);
1678}
1679
1681{
1682 QString key = "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool";
1683 return m_d->toolaccesshelper->getToolPointer<Muon::MuonEDMPrinterTool>(key);
1684}
1685
1686// ITrackingVolumesSvc * TrackSystemController::trackingVolumeSvc() const
1687// {
1688// return m_trackingVolumesSvc.operator->();
1689// }
1690
1692{
1693 if (m_d->ui_extrap.comboBox_extendAllInDetTracksToHere->currentText()=="Calorimeter")
1694 return m_d->calorimeterEntryLayer;
1695 if (m_d->ui_extrap.comboBox_extendAllInDetTracksToHere->currentText()=="Muon Entrance")
1696 return m_d->muonSpectrometerEntryLayer;
1697 if (m_d->ui_extrap.comboBox_extendAllInDetTracksToHere->currentText()=="Muon Exit")
1698 return m_d->muonSpectrometerExitLayer;
1699 return nullptr;
1700}
1701
1702//____________________________________________________________________
1704{
1705 if (m_d->ui_int.radioButton_selmode_single->isChecked())
1707 else if (m_d->ui_int.radioButton_selmode_multitracks->isChecked())
1709 else if (m_d->ui_int.radioButton_selmode_trackfits->isChecked())
1711 message("selectionMode ERROR: Inconsistency detected.");
1713}
1714
1716{
1717 if (m_d->ui_int.comboBox_fitterMode->currentText()=="Fit PRDs")
1719 else if (m_d->ui_int.comboBox_fitterMode->currentText()=="Refit Track")
1721 else if (m_d->ui_int.comboBox_fitterMode->currentText()=="Extend Track with PRDs")
1723 else if (m_d->ui_int.comboBox_fitterMode->currentText()=="Combine Two Tracks")
1725
1726 message("fitterMode ERROR: Inconsistency detected. Mode not known.");
1727
1728 return TrackCommonFlags::FROMPRDS; // FIXME!
1729}
1730
1732{
1733 return m_d->ui_int.checkBox_removeOutliers->isChecked();
1734}
1735
1737{
1738 if (m_d->ui_int.comboBox_particleHypo->currentText()=="Pion")
1739 return Trk::pion;
1740 else if (m_d->ui_int.comboBox_particleHypo->currentText()=="Non Interacting")
1741 return Trk::nonInteracting;
1742 else if (m_d->ui_int.comboBox_particleHypo->currentText()=="Electron")
1743 return Trk::electron;
1744 else if (m_d->ui_int.comboBox_particleHypo->currentText()=="Muon")
1745 return Trk::muon;
1746 else if (m_d->ui_int.comboBox_particleHypo->currentText()=="Kaon")
1747 return Trk::kaon;
1748 else if (m_d->ui_int.comboBox_particleHypo->currentText()=="Proton")
1749 return Trk::proton;
1750 else if (m_d->ui_int.comboBox_particleHypo->currentText()=="Photon")
1751 return Trk::photon;
1752
1753 message("fitterMode ERROR: Inconsistency detected. Mode not known.");
1754 return Trk::undefined; // FIXME!
1755}
1756
1757//____________________________________________________________________
1759{
1760 return m_d->ui_ascobjs.checkBox_truthtracks_display_points->isChecked();
1761}
1762
1763//____________________________________________________________________
1765{
1766 if (m_d->ui_ascobjs.comboBox_assocobj_detaillevel->currentText()=="Auto")
1768 else if (m_d->ui_ascobjs.comboBox_assocobj_detaillevel->currentText()=="Simple")
1770 else
1772}
1773
1775 if (m_d->ui_cuts.checkBox_vertexAssociated->isEnabled()!=b) {
1776 m_d->ui_cuts.checkBox_vertexAssociated->setEnabled(b);
1777 emit cutOnlyVertexAssocTracksChanged(m_d->ui_cuts.checkBox_vertexAssociated->isChecked());
1778 }
1779}
1780
1782 if (!m_d->ui_cuts.checkBox_vertexAssociated->isEnabled()) return false;
1783 return m_d->ui_cuts.checkBox_vertexAssociated->isChecked();
1784}
1785
1786
1787//____________________________________________________________________
1789{
1790 if (!m_d->ui_cuts.checkBox_cut_minpt)
1791 return {};
1792
1793 // will set range to negative if we have momcut=P
1794 // if minCut unset then min=-inf
1795 // if minCut set, and Pt selected, then min=-minCut
1796 // if minCut set, and P selected, then min=-maxCut
1797 // etc
1798 bool isPCut = m_d->ui_cuts.comboBox_momtype->currentText()=="P";
1799
1800 const double minFromInterface=m_d->ui_cuts.doubleSpinBox_cut_minpt_gev->value()*CLHEP::GeV;
1801 const double maxFromInterface=m_d->ui_cuts.doubleSpinBox_cut_maxpt_gev->value()*CLHEP::GeV;
1802
1803 double min=0.0,max=0.0;
1804 if (!isPCut) {
1805 //Pt cut
1806 min = (m_d->ui_cuts.checkBox_cut_minpt->isChecked() ? minFromInterface : -std::numeric_limits<double>::infinity());
1807 max = (m_d->ui_cuts.checkBox_cut_maxpt->isChecked() ? maxFromInterface : std::numeric_limits<double>::infinity());
1808 } else {
1809 min = (m_d->ui_cuts.checkBox_cut_maxpt->isChecked() ? -maxFromInterface : -std::numeric_limits<double>::infinity());
1810 max = (m_d->ui_cuts.checkBox_cut_minpt->isChecked() ? -minFromInterface : std::numeric_limits<double>::infinity());
1811 }
1812
1813 //message("cutAllowedPt: min,max="+QString::number(min)+","+QString::number(max));
1814
1815 if (max<min)
1816 return {};
1817
1818 return VP1Interval( min, max );//fixme: closed interval??
1819}
1820
1821//____________________________________________________________________
1823{
1824 return m_d->ui_cuts.etaPhiCutWidget->allowedEta();
1825}
1826
1827//____________________________________________________________________
1829{
1830 return m_d->ui_cuts.etaPhiCutWidget->allowedPhi();
1831}
1832
1833//____________________________________________________________________
1835{
1836 unsigned npixel = m_d->ui_cuts.checkBox_cut_nhits_pixel->isChecked() ? m_d->ui_cuts.spinBox_cut_nhits_pixel->value() : 0;
1837 unsigned nsct = m_d->ui_cuts.checkBox_cut_nhits_sct->isChecked() ? m_d->ui_cuts.spinBox_cut_nhits_sct->value() : 0;
1838 unsigned ntrt = m_d->ui_cuts.checkBox_cut_nhits_trt->isChecked() ? m_d->ui_cuts.spinBox_cut_nhits_trt->value() : 0;
1839 unsigned nmuon = m_d->ui_cuts.checkBox_cut_nhits_muon->isChecked() ? m_d->ui_cuts.spinBox_cut_nhits_muon->value() : 0;
1840 unsigned nprecmuon = m_d->ui_cuts.checkBox_cut_nprecisionhits_muon->isChecked() ? m_d->ui_cuts.spinBox_cut_nprecisionhits_muon->value() : 0;
1841
1842 QList<unsigned> l;
1843 if (!npixel&&!nsct&&!ntrt&&!nmuon&&!nprecmuon)
1844 return l;
1845 l << npixel << nsct << ntrt << nmuon << nprecmuon;
1846 return l;
1847}
1848
1850 QString tmp = m_d->ui_cuts.checkBox_requireDetectorElement->isChecked() ? m_d->ui_cuts.lineEdit_detectorElementId->text(): QString();
1851 return tmp;
1852}
1853
1854
1855//____________________________________________________________________
1857{
1858 return m_d->ui_cuts.checkBox_cut_truthtracks_creationvertexinIR->isChecked();
1859}
1860
1861//____________________________________________________________________
1863{
1864 return m_d->ui_cuts.checkBox_cut_truthtracks_excludebarcode0->isChecked();
1865}
1866
1867//____________________________________________________________________
1869{
1870 return m_d->ui_cuts.checkBox_cut_truthtracks_excludeneutrals->isChecked();
1871}
1872
1873//____________________________________________________________________
1874//Returns false if "none available"
1875bool TrackSystemController::Imp::updateComboBoxContents(QComboBox*cb,const QStringList& l,QString& restoredSelection)
1876{
1877 //current selection:
1878 QString ct = cb->currentText();
1879 if (ct==Imp::noneAvailString)
1880 ct = "";
1881
1882 bool save = cb->blockSignals(true);
1883
1884 cb->clear();
1885
1886 bool enabled = false;
1887 if (l.isEmpty()) {
1888 cb->addItem(Imp::noneAvailString);
1889 cb->setEnabled(false);
1890 } else {
1891 cb->addItems(l);
1892
1893 int i = restoredSelection.isEmpty() ? -1 : cb->findText(restoredSelection);
1894 if (i<0)
1895 i = ct.isEmpty() ? -1 : cb->findText(ct);
1896 restoredSelection = "";
1897
1898 if (i>=0) {
1899 cb->setCurrentIndex(i);
1900 } else {
1901 //Let's try to pick the default to be VP1Extrapolater over
1902 //AtlasExtrapolater over... whatever (same for fitters):
1903 int i_vp1(-1), i_atlas(-1);
1904 for (int j = 0; j <cb->count();++j) {
1905 if (i_vp1==-1&&cb->itemText(j).contains("vp1",Qt::CaseInsensitive))
1906 i_vp1 = j;
1907 if (i_atlas==-1&&cb->itemText(j).contains("atlas",Qt::CaseInsensitive))
1908 i_atlas = j;
1909 }
1910 if (i_vp1>=0)
1911 cb->setCurrentIndex(i_vp1);
1912 else if (i_atlas>=0)
1913 cb->setCurrentIndex(i_atlas);
1914 }
1915 //m_d->ui_extrap.radioButton_athenaExtrapolator->setEnabled(true);
1916 enabled = true;
1917 cb->setEnabled(true);
1918 }
1919
1920 if (!save)
1921 cb->blockSignals(false);
1922 return enabled;
1923}
1924
1925//____________________________________________________________________
1927{
1928 if (m_d->lastUpdatedAvailableFitters==af)
1929 return;
1930 m_d->lastUpdatedAvailableFitters=af;
1931 m_d->updateComboBoxContents(m_d->ui_int.comboBox_fitters,af,m_d->restoredLastFitter);//remember return val.
1932 m_d->updateFitPRDButtonState();
1933
1935}
1936
1937//____________________________________________________________________
1939{
1940 if (m_d->lastUpdatedAvailableExtrapolators==ae)
1941 return;
1942 m_d->lastUpdatedAvailableExtrapolators=ae;
1943
1944 if (!m_d->updateComboBoxContents(m_d->ui_extrap.comboBox_propagator,ae,m_d->restoredLastPropagator)) {
1945 m_d->ui_extrap.radioButton_athenaExtrapolator->setEnabled(false);
1946 bool save1 = m_d->ui_extrap.radioButton_none->blockSignals(true);
1947 bool save2 = m_d->ui_extrap.radioButton_helical->blockSignals(true);
1948 bool save3 = m_d->ui_extrap.radioButton_athenaExtrapolator->blockSignals(true);
1949 m_d->ui_extrap.radioButton_none->setChecked(true);//Fixme: fall back to the helical instead!
1950 m_d->ui_extrap.radioButton_helical->setChecked(false);
1951 m_d->ui_extrap.radioButton_athenaExtrapolator->setChecked(false);
1952 if (!save1) m_d->ui_extrap.radioButton_none->blockSignals(false);
1953 if (!save2) m_d->ui_extrap.radioButton_helical->blockSignals(false);
1954 if (!save3) m_d->ui_extrap.radioButton_athenaExtrapolator->blockSignals(false);
1955 } else {
1956 m_d->ui_extrap.radioButton_athenaExtrapolator->setEnabled(true);
1957 }
1958
1960}
1961
1962//____________________________________________________________________
1964{
1965 return m_d->ui_int.checkBox_selsingle_orientzoom->isChecked();
1966}
1967
1968//____________________________________________________________________
1970{
1971 return m_d->ui_int.checkBox_selsingle_printinfo->isChecked();
1972}
1973
1974//____________________________________________________________________
1976{
1977 return printInfoOnSingleSelection() && m_d->ui_int.checkBox_selsingle_printinfo_verbose->isChecked();
1978}
1979
1980//____________________________________________________________________
1982{
1983 return m_d->ui_int.checkBox_sel_printtotmom->isChecked();
1984}
1985
1986//____________________________________________________________________
1988{
1989 return m_d->ui_int.checkBox_sel_showtotmom->isChecked();
1990}
1991
1992//____________________________________________________________________
1994{
1995 messageVerbose("Emitting rerandomise");
1996 emit rerandomise();
1997}
1998
1999//____________________________________________________________________
2001{
2002 messageVerbose("Emitting refit");
2003 emit refit();
2004}
2005
2006//____________________________________________________________________
2008{
2009 switch (theclass->fitterMode()) {
2010 case TrackCommonFlags::FROMPRDS: ui_int.pushButton_refit->setEnabled( numberOfSelectedPRDs>=3 && theclass->trackFitter() );break;
2011 case TrackCommonFlags::REFITSINGLETRACK: ui_int.pushButton_refit->setEnabled( numberOfSelectedTracks>=1 && theclass->trackFitter() );break;
2012 case TrackCommonFlags::EXTENDTRACKWITHPRDS: ui_int.pushButton_refit->setEnabled( numberOfSelectedTracks>=1 && numberOfSelectedPRDs>=1 && theclass->trackFitter() );break;
2013 case TrackCommonFlags::COMBINETWOTRACKS: ui_int.pushButton_refit->setEnabled( numberOfSelectedTracks==2 && theclass->trackFitter() );break;
2014 }
2015}
2016
2017//____________________________________________________________________
2019{
2020 if (m_d->numberOfSelectedPRDs==prds && m_d->numberOfSelectedTracks==trks)
2021 return;
2022 m_d->numberOfSelectedPRDs=prds;
2023 m_d->numberOfSelectedTracks=trks;
2024
2025 switch (fitterMode()) {
2026 case TrackCommonFlags::FROMPRDS: m_d->ui_int.pushButton_refit->setText("Fit track from "+str(prds)+" PRDs");break;
2027 case TrackCommonFlags::REFITSINGLETRACK: m_d->ui_int.pushButton_refit->setText("Fit track");break;
2028 case TrackCommonFlags::EXTENDTRACKWITHPRDS: m_d->ui_int.pushButton_refit->setText("Extend track with "+str(prds)+" PRDs");break;
2029 case TrackCommonFlags::COMBINETWOTRACKS: m_d->ui_int.pushButton_refit->setText("Combine");break;
2030 }
2031
2032
2033 // FIXME Need to redo this method so that it can handle all fitter modes
2034
2035 m_d->updateFitPRDButtonState();
2036}
2037
2039 messageVerbose("updateFitPRDButtonState");
2040
2041 switch (fitterMode()) {
2042 case TrackCommonFlags::FROMPRDS: m_d->ui_int.pushButton_refit->setText("Fit track from "+str(m_d->numberOfSelectedPRDs)+" PRDs");break;
2043 case TrackCommonFlags::REFITSINGLETRACK: m_d->ui_int.pushButton_refit->setText("Fit track");break;
2044 case TrackCommonFlags::EXTENDTRACKWITHPRDS: m_d->ui_int.pushButton_refit->setText("Extend track with "+str(m_d->numberOfSelectedPRDs)+" PRDs");break;
2045 case TrackCommonFlags::COMBINETWOTRACKS: m_d->ui_int.pushButton_refit->setText("Combine");break;
2046 }
2047
2048 m_d->updateFitPRDButtonState();
2049}
2050
2052{
2053 return m_d->objBrowserWidget;
2054}
2055
2057 return m_d->common;
2058}
2062
2063void TrackSystemController::objectBrowserClicked(QTreeWidgetItem * item, int){
2064 messageVerbose("objectBrowserClicked for "+item->text(0));
2065
2066 VP1TrackSystem* sys = dynamic_cast<VP1TrackSystem*>(systemBase());
2067 if (!sys){
2068 messageVerbose("TrackSystemController::objectBrowserClicked: Couldn't get VP1TrackSystem pointer");
2069 return;
2070 }
2071
2072 //sys->deselectAll(); // FIXME. necessary?
2073
2074 SoNode* node = common()->node(item);
2075 if (node) {
2076 // okay, have track
2077
2078 SoCooperativeSelection * sel = sys->selTracks();
2079 sel->select(node);
2080 messageVerbose("Got track node. numselected="+QString::number(sel->getNumSelected()));
2081
2082 } else {
2083 messageVerbose("Checking to see if it is a TSOS/TrackState.");
2084
2085 // maybe it's a TSOS? Check first that it has a parent
2086 if (item->parent()) node = common()->node(item->parent());
2087
2088 if ( !node && item->parent() && item->parent()->parent() ) node = common()->node(item->parent()->parent()); // Try one more up (ugly, but shouldn't ever be deeper than this)
2089
2090 if (node) {
2091 // yes, so now get index within track, as we can hopefully use this to find the AscObj_TSOS
2092 unsigned int index = item->parent()->indexOfChild(item);// should correspond to the TSOS number
2093 messageVerbose("TrackSystemController::objectBrowserClicked: item has index of "+QString::number(index));
2094
2095 TrackHandle_TrkTrack* trkHandle = dynamic_cast<TrackHandle_TrkTrack*>(common()->trackHandle(node));
2096 if (trkHandle){
2097 trkHandle->zoomToTSOS(index);
2098 } else {
2099 TrackHandle_TrackContainer* trkProxyHandle = dynamic_cast<TrackHandle_TrackContainer*>(common()->trackHandle(node));
2100 if (trkProxyHandle){
2101 trkProxyHandle->zoomToTSOS(index);
2102 // FIXME There is a bug here currently - if the user clicks on an open TrackState e.g parameters.
2103 // This might have an index of 0, whereas the actual Trackstate is at index 23.
2104 }
2105 }
2106 } else {
2107 messageVerbose("TrackSystemController::objectBrowserClicked: Couldn't get node pointer. Maybe object not visible?");
2108 }
2109 }
2110
2111
2112 // if (selTrack){
2113 // SoCooperativeSelection * sel = sys->selTracks();
2114 // sel->select(node);
2115 // } else {
2116 // common()->ascObjSelectionManager()->pretendUserClicked();
2117 // }
2118 //
2119 // SoCooperativeSelection * sel = sys->selTracks();
2120 // SoCooperativeSelection * selAsc = dynamic_cast<SoCooperativeSelection*>(common()->ascObjSelectionManager()->getAscObjAttachSep());
2121 // SoSeparator* eventRoot = common()->ascObjSelectionManager()->eventRoot();
2122 //
2123 // SoSearchAction mySearchAction;
2124 // mySearchAction.setNode(node);
2125 // // SoSeparator* eventRoot = common()->ascObjSelectionManager()->eventRoot();
2126 // mySearchAction.apply(eventRoot);
2127 // SoPath* path=mySearchAction.getPath();
2128 // if ( !path ) {
2129 // messageVerbose("TrackSystemController::objectBrowserClicked: Couldn't get SoPath");
2130 // return;
2131 // } else {
2132 // messageVerbose("TrackSystemController::objectBrowserClicked: got SoPath. Will now try to select.");
2133 // messageVerbose("pathlength="+QString::number(path->getLength()));
2134 // }
2135 //
2136 // //sel->select(path); //Doesn't work.
2137 // // messageVerbose("findpath="+QString::number(sel->findPath(path)));
2138 // sel->select(node); // Doesn't work.
2139 // if (sel->getNumSelected()==0){
2140 // messageVerbose("TrackSystemController::objectBrowserClicked: Couldn't select. Trying with ASC sel node.");
2141 //
2142 // selAsc->select(node);
2143 // if (selAsc->getNumSelected()==0){
2144 // messageVerbose("TrackSystemController::objectBrowserClicked: Couldn't select. Trying with ASC sel using path.");
2145 //
2146 // selAsc->select(path);
2147 // }
2148 // }
2149 // // messageVerbose("findpath="+QString::number(sel->findPath(path)));
2150 //
2151 // // sel->touch();
2152 // messageVerbose("numselected="+QString::number(sel->getNumSelected()));
2153
2154 // path->unref();
2155}
2156
2158{
2159 std::vector<double> values(6,0.0);
2160 values[0]=m_d->ui_shiftmuonchambers.doubleSpinBox_tra_s->value();
2161 values[1]=m_d->ui_shiftmuonchambers.doubleSpinBox_tra_z->value();
2162 values[2]=m_d->ui_shiftmuonchambers.doubleSpinBox_tra_t->value();
2163 values[3]=m_d->ui_shiftmuonchambers.doubleSpinBox_rot_s->value();
2164 values[4]=m_d->ui_shiftmuonchambers.doubleSpinBox_rot_z->value();
2165 values[5]=m_d->ui_shiftmuonchambers.doubleSpinBox_rot_t->value();
2166 return values;
2167}
2169{
2170 if (m_d->ui_shiftmuonchambers.comboBox_level->currentText()=="Level 0")
2171 return 0;
2172 else if (m_d->ui_shiftmuonchambers.comboBox_level->currentText()=="Level 1")
2173 return 1;
2174 else if (m_d->ui_shiftmuonchambers.comboBox_level->currentText()=="Level 2")
2175 return 2;
2176 else if (m_d->ui_shiftmuonchambers.comboBox_level->currentText()=="Level 3")
2177 return 3;
2178 return 0;
2179}
2180
2182{
2183 return m_d->ui_col.groupBox_labels->isChecked();
2184}
2185
2187{
2188 return static_cast<float>(m_d->ui_col.horizontalSlider_labels_trkOffset->value())/static_cast<float>(m_d->ui_col.horizontalSlider_labels_trkOffset->maximum());
2189}
2190
2192{
2193 QList<int> values;
2194 values << m_d->ui_col.horizontalSlider_labels_xOffset->value();
2195 values << m_d->ui_col.horizontalSlider_labels_yOffset->value();
2196 values << m_d->ui_col.horizontalSlider_labels_zOffset->value();
2197 return values;
2198}
2199
2201{
2202 return m_d->ui_col.horizontalSlider_labels_xOffset->value();
2203}
2204
2206{
2207 return m_d->ui_col.horizontalSlider_labels_yOffset->value();
2208}
2209
2211{
2212 return m_d->ui_col.horizontalSlider_labels_zOffset->value();
2213}
2214
2215TrackSystemController::TrackLabelModes TrackSystemController::trackLabels(){
2216 if (!m_d->ui_col.groupBox_labels->isChecked())
2218
2219 TrackLabelModes labels=TrackSystemController::NoLabels;
2220 if (m_d->ui_col.checkBox_trkLabels_p->isChecked()) labels |= TrackSystemController::P;
2221 if (m_d->ui_col.checkBox_trkLabels_Pt->isChecked()) labels |= TrackSystemController::Pt;
2222 if (m_d->ui_col.checkBox_trkLabels_direction->isChecked()) labels |= TrackSystemController::Direction;
2223 if (m_d->ui_col.checkBox_trkLabels_pid->isChecked()) labels |= TrackSystemController::Pid;
2224 if (m_d->ui_col.checkBox_trkLabels_hits->isChecked()) labels |= TrackSystemController::Hits;
2225 if (m_d->ui_col.checkBox_trkLabels_fitQuality->isChecked()) labels |= TrackSystemController::FitQuality;
2226 return labels;
2227}
2228
2230// Test for possible changes in values and emit signals as appropriate:
2231// (possibleChange_XXX() slots code provided by macros)
2232#define VP1CONTROLLERCLASSNAME TrackSystemController
2236// POSSIBLECHANGE_IMP(trackTubeRadius)
double charge(const T &p)
Definition AtlasPID.h:997
std::map< std::string, double > instance
#define x
#define POSSIBLECHANGE_IMP(x)
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
Helper tool to print EDM objects to string in a fix format.
@ TSOS_TrackParsErrorsNotPerigee
bit 1
@ TSOS_TrackParsErrorsPerigee
bit 2
@ TSOS_MaterialEffectsWithNoDeltaE
bit 12
SoNode * zoomToTSOS(unsigned int index)
Depending on controller configuration attempt to zoom to the corresponding TSOS & returned detailed n...
SoNode * zoomToTSOS(unsigned int index)
Depending on controller configuration attempt to zoom to the corresponding TSOS & returned detailed n...
TrackHandleBase * trackHandle(SoNode *n)
SoNode * node(TrackHandleBase *h)
Returns the node associated with this handle.
QList< VP1Interval > last_cutAllowedPhi
Ui::TrackSysShiftMuonChambersForm ui_shiftmuonchambers
TrackCommonFlags::TrackPartsFlags last_shownTrackParts
TrackCommonFlags::TSOSPartsFlags last_customColouredTSOSParts
TrackCommonFlags::SELECTIONMODE last_selectionMode
PropagationOptionFlags last_propagationOptions
Ui::TrackSysSettingsAscObjsForm ui_ascobjs
Ui::VP1TrackControllerForm ui
Ui::TrackSysSettingsInteractionsForm ui_int
static void ensureFittersCreated(IVP1System *)
TrackCommonFlags::DETAILLEVEL last_assocObjDetailLevel
static bool updateComboBoxContents(QComboBox *cb, const QStringList &l, QString &restoredSelection)
Ui::TrackSysSettingsProjectionsForm ui_proj
VP1AvailableToolsHelper * toolhelper_extrapolators
TrackSystemController * theclass
static SoMaterial * createMaterial(const int &r, const int &g, const int &b)
TrackCommonFlags::TSOSPartsFlags last_shownTSOSParts
Ui::TrackSysSettingsColouringForm ui_col
VP1ToolAccessHelper * toolaccesshelper
VP1AvailableToolsHelper * toolhelper_fitters
SoMaterial * getMat(VP1MaterialButton *) const
static void ensureExtrapolatorsCreated(IVP1System *)
Ui::TrackSysSettingsExtrapolationsForm ui_extrap
Muon::MuonEDMPrinterTool * muonedmprintertool
Ui::TrackSysSettingsCutsForm ui_cuts
Ui::TrackObjectBrowser ui_objBrowser
void availableExtrapolatorsChanged(const QStringList &)
void possibleChange_cutRequiredDetectorElement()
TrackCommonFlags::FITTERMODE fitterMode() const
void possibleChange_shownTSOSParts()
SoDrawStyle * ascObjDrawStyle() const
float trackLabelTrkOffset()
Percentage of postion along track.
bool printTotMomentumOnMultiTrackSelection() const
void possibleChange_vertexProjectionAngle()
void possibleChange_trackLabelPosOffset()
VP1Interval cutAllowedEta() const
QList< unsigned > cutRequiredNHits() const
void cutOnlyVertexAssocTracksChanged(bool)
Trk::ParticleHypothesis fitterParticleHypthesis() const
void possibleChange_trackFitter()
Trk::IExtrapolator * propagator() const
SoMaterial * getMaterialForPDGCode(const int &pdgcode) const
void possibleChange_numberOfPointsOnCircles()
void possibleChange_cutAllowedPt()
void setNumberOfSelectedPRDsAndTracks(unsigned prds, unsigned trks)
void possibleChange_useShortTRTMeasurements()
bool ignoreMeasurementEffectsOnTrackInProp()
If true (default) don't use TSOS with MEOT to draw track points.
void possibleChange_trackLabels()
static QString toString(const T &t)
void possibleChange_cutTruthExcludeNeutrals()
QString nameOfNewlyFittedCollections() const
void possibleChange_materialEffectsOnTrackScale()
SoMaterial * customMatParameters() const
void availableFittersChanged(const QStringList &)
void possibleChange_showTruthAscObjs()
SoMaterial * customMatHoleParameters() const
bool showTotMomentumOnMultiTrackSelection() const
int labelZOffset()
Absolute z offset.
void possibleChange_cutExcludeBarcodeZero()
Muon::MuonEDMPrinterTool * muonEDMPrinterTool() const
TrackCommonFlags::SELECTIONMODE selectionMode() const
void possibleChange_customColouredTSOSParts()
void possibleChange_propagationOptions()
void setCommonData(TrackSysCommonData *)
set pointer to the common data
SoMaterial * getMaterialForCharge(const double &charge) const
void possibleChange_cutTruthFromIROnly()
const Trk::Volume * extrapolateToThisVolume() const
Returns the volume to which we extrapolate ID tracks, or zero if no VolumesSvc found.
std::vector< double > alignmentShiftValue()
void possibleChange_propagator()
TrackCommonFlags::DETAILLEVEL assocObjDetailLevel() const
QTreeWidget * trackObjBrowser() const
Returns a pointer to the Track Object Browser (if it exists)
void actualRestoreSettings(VP1Deserialise &)
TrackCommonFlags::TSOSPartsFlags customColouredTSOSParts() const
TrackCollWidget * collWidget() const
TrackSysCommonData * common() const
Returns a pointer to the common data (if it exists)
SoMaterial * customMatMeasurementsOutliers() const
PropagationOptionFlags propagationOptions() const
void objectBrowserClicked(QTreeWidgetItem *item, int)
SoMaterial * customMatParameterErrors() const
SoMaterial * customMatSurfaces() const
void possibleChange_cutAllowedPhi()
QList< int > trackLabelPosOffset()
Offset in x,y,z.
SoMaterial * customMatMaterialEffects() const
void possibleChange_cutRequiredNHits()
int labelYOffset()
Absolute y offset.
void possibleChange_parTubeErrorsDrawCylinders()
Trk::ITrackFitter * trackFitter() const
void possibleChange_drawMeasGlobalPositions()
TrackCommonFlags::TrackPartsFlags shownTrackParts() const
SoComplexity * ascObjComplexity() const
void possibleChange_selectionMode()
void possibleChange_cutOnlyVertexAssocTracks()
QList< VP1Interval > cutAllowedPhi() const
QString cutRequiredDetectorElement() const
void possibleChange_showTotMomentumOnMultiTrackSelection()
TrackCommonFlags::TSOSPartsFlags shownTSOSParts() const
SoMaterial * getMaterialForMomentum(const double &absmom) const
TrackSystemController(IVP1System *sys)
void possibleChange_nStdDevForParamErrors()
void possibleChange_useShortMDTMeasurements()
void possibleChange_cutAllowedEta()
int labelXOffset()
Absolute x offset.
SoMaterial * customMatMeasurements() const
void actualSaveSettings(VP1Serialise &) const
void possibleChange_trackLabelTrkOffset()
void possibleChange_assocObjDetailLevel()
void possibleChange_propMaxRadius()
void possibleChange_measurementsShorttubesScale()
void possibleChange_shownTrackParts()
void extrapolateToThisVolumeChanged(void)
Interface class for the extrapolation AlgTool, it inherits from IAlgTool Detailed information about p...
Provides the abstract interface for track fitting in the common ATLAS Tracking EDM.
Base class for all volumes inside the tracking realm, it defines the interface for inherited Volume c...
Definition Volume.h:36
void addMonitoredTypes(const QStringList &, const QStringList &ignoreList=QStringList())
void addMonitoredType(const QString &, const QStringList &ignoreList=QStringList())
void initDialog(T &theUI, QPushButton *launchbutton, QAbstractButton *enabledButton=0)
void connectToLastUpdateSlot(QObject *sender, const char *signal)
void setupCollWidgetInScrollArea(QScrollArea *scrollarea, VP1CollectionWidget *collWidget)
const char * addUpdateSlot(const char *slot)
VP1Controller(IVP1System *sys, const QString &classname)
void messageVerbose(const QString &) const
void message(const QString &) const
IVP1System * systemBase() const
void messageDebug(const QString &) const
static bool hasTRTGeometry()
static bool hasPixelGeometry()
static bool hasSCTGeometry()
static bool hasMuonGeometry()
static SoMaterial * createMaterial(const QColor &, const double &brightness=0.0, const double &transp=0.0)
static double particleCharge(const int &pdgcode, bool &ok)
static double getValueLineWidthSlider(const QSlider *)
static double getValuePointSizeSlider(const QSlider *)
static bool environmentVariableIsOn(const QString &name)
static QString environmentVariableValue(const QString &name)
toolT * getToolPointer(const QString &toolname, bool silent=false, bool createIfNotExists=false)
Definition node.h:24
int r
Definition globals.cxx:22
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
Definition index.py:1