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