ATLAS Offline Software
Loading...
Searching...
No Matches
TrackSystemController.h
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// Header file for class TrackSystemController //
9// //
10// Description: Controller widget for the track system //
11// Keeps all nasty gui stuff internally, and //
12// only presents the actual interesting data //
13// with specialised access methods and signals. //
14// //
15// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
16// Initial version: February 2008 //
17// //
19
20#ifndef TRACKSYSTEMCONTROLLER_H
21#define TRACKSYSTEMCONTROLLER_H
22
26
27#include <QFlags>
28
29class TrackCollWidget;
30class SoMaterial;
31class SoDrawStyle;
32class SoComplexity;
34class QTreeWidget;
35class QTreeWidgetItem;
38
39namespace Trk {
40 class IExtrapolator;
41 class ITrackFitter;
42 class Track;
43 class Volume;
44}
45
46namespace Muon {
48}
49
51
52 Q_OBJECT
53
54public:
55
57 virtual ~TrackSystemController();
58
59 void initTools();//comboboxes for selecting tools + tool creation is
60 //postponed until this call (so it can wait until
61 //systemcreate())
62
64 int currentSettingsVersion() const;
66
67 /*So we can enable/disable parts based on whether prd's & Tracks are selected:*/
68 void setNumberOfSelectedPRDsAndTracks(unsigned prds, unsigned trks);
69
71
73 // Access Methods for settings //
75 TrackCommonFlags::TrackPartsFlags shownTrackParts() const;
76 int vertexProjectionAngle() const; //Ranges from 0-179 i.e. is in degrees. Might be disabled, in which case will be -ve.
77
78
79 // double trackTubeRadius() const;//0 => don't show tubes for tracks
81 Q_DECLARE_FLAGS(PropagationOptionFlags, PropagationOptionFlag)
82 Trk::IExtrapolator * propagator() const;//Null for no propagator - i.e. show raw data.
83 PropagationOptionFlags propagationOptions() const;
84 float propMaxRadius() const;
85
87 const Trk::Volume * extrapolateToThisVolume() const ;
89
91
92 QString nameOfNewlyFittedCollections() const;//queried on-demand, no signal.
95 bool fitterRemoveOutliers() const;
98
99 //Associated objects (base):
100 TrackCommonFlags::TSOSPartsFlags shownTSOSParts() const;
101 TrackCommonFlags::TSOSPartsFlags customColouredTSOSParts() const;
102 bool useShortTRTMeasurements() const;
103 bool useShortMDTMeasurements() const;
104 bool drawMeasGlobalPositions() const;
105
106 bool hideCustomSurfaces() const;
107 bool hideTubeSurfaces() const;
108 double measurementsShorttubesScale() const;
109 double nStdDevForParamErrors() const;
110 bool parTubeErrorsDrawCylinders() const;
111 int numberOfPointsOnCircles() const;//will return numbers in {4,8,12,16,...}
112 double materialEffectsOnTrackScale() const;
113
114
115 bool showTruthAscObjs() const;//Fixme: obsolete
116 //General cuts:
119 QList<VP1Interval> cutAllowedPhi() const;//All off: empty list. All on: list with one entry: ]-inf,inf[
120 //Cuts for number of hits per subsystem:
121 QList<unsigned> cutRequiredNHits() const;//Empty list: no requirements. Otherwise a list
122 // with a length of four (pixel,sct,trt,muon)
123 QString cutRequiredDetectorElement() const; //Null string, no requirement. Otherwise the string is converted into an identifier.
124
125 void vertexCutsAllowed(bool); // called if vertex system is available.
126 bool cutOnlyVertexAssocTracks() const;
127 //Truth cuts:
128 bool cutTruthFromIROnly() const;
129 bool cutExcludeBarcodeZero() const;
130 bool cutTruthExcludeNeutrals() const;
131 //Interactions:
133 //No associated signals for the next four (only queried on-click):
135 bool printInfoOnSingleSelection() const;
138
139 //Material pointers returned by the next methods won't change during
140 //the lifetime of the system (but their fields may get updated by
141 //the controller):
142 SoMaterial * getMaterialForPDGCode(const int& pdgcode) const;
143 SoMaterial * getMaterialForCharge(const double& charge) const;
144 SoMaterial * getMaterialForMomentum(const double& absmom) const;
145 SoMaterial * customMatMeasurements() const;
146 SoMaterial * customMatMeasurementsOutliers() const;
147 SoMaterial * customMatParameters() const;
148 SoMaterial * customMatHoleParameters() const;
149 SoMaterial * customMatParameterErrors() const;
150 SoMaterial * customMatMaterialEffects() const;
151 SoMaterial * customMatSurfaces() const;
152
153 //Overall drawstyles, complexities and light models:
154 // SoDrawStyle * trackDrawStyle() const;
155 // SoLightModel * trackLightModel() const;
156 SoDrawStyle * ascObjDrawStyle() const;
157 SoComplexity * ascObjComplexity() const;
158
159 QTreeWidget* trackObjBrowser() const;
160 TrackSysCommonData * common() const;
162
163 // Return special information for VP1_TRKSYS_SHIFTCHAMBERS mode
164 std::vector<double> alignmentShiftValue();
166
167 // Labels
168 bool doTrackLabels();
169 enum TrackLabelMode {NoLabels=0x0000, P=0x0001, Pt=0x0002, Pid=0x0004, Hits=0x0008,
170 FitQuality=0x0010, Direction=0x0020};
171 Q_DECLARE_FLAGS(TrackLabelModes, TrackLabelMode)
172
173 TrackLabelModes trackLabels();
174
175 float trackLabelTrkOffset() ;
176 QList<int> trackLabelPosOffset() ;
177
178 int labelXOffset() ;
179 int labelYOffset() ;
180 int labelZOffset() ;
181
183 // Signals for changes in settings //
185signals:
186 void rerandomise();//This one doesn't have an access method, but is just emitted when needed.
187 void refit();//[TEMPORARY] This one doesn't have an access method, but is just emitted when needed.
188 void shownTrackPartsChanged(TrackCommonFlags::TrackPartsFlags);
190 void trackLabelsChanged(TrackSystemController::TrackLabelModes);
193 // void trackTubeRadiusChanged(const double&);
194 void shownTSOSPartsChanged(TrackCommonFlags::TSOSPartsFlags);
195 void customColouredTSOSPartsChanged(TrackCommonFlags::TSOSPartsFlags);
200 void nStdDevForParamErrorsChanged(const double&);
205 void propagationOptionsChanged(TrackSystemController::PropagationOptionFlags);
208 // void ignoreMeasurementEffectsOnTrackInPropChanged(bool);
215 void cutAllowedPhiChanged(const QList<VP1Interval>&);
216 void cutRequiredNHitsChanged(const QList<unsigned>&);
223
224private:
225
226 class Imp;
228
229 //For verbose output:
230 template <class T> static QString toString( const T& t ) { return VP1Controller::toString(t); }//unhide base methods
231 static QString toString( const TrackCommonFlags::SELECTIONMODE& par ) { return TrackCommonFlags::toString(par); }
232 static QString toString( const TrackCommonFlags::DETAILLEVEL& par ) { return TrackCommonFlags::toString(par); }
233 static QString toString( const QList<unsigned>& par );
234 static QString toString( const QList<int>& par );
235
236private Q_SLOTS:
237 void emitRerandomise();
238 void emitRefit();
239 // void updateTrackDrawStyle();
240 // void updateTrackLightModel();
243 void availableExtrapolatorsChanged(const QStringList&);
244 void availableFittersChanged(const QStringList&);
248 // void possibleChange_trackTubeRadius();
265 // void possibleChange_ignoreMeasurementEffectsOnTrackInProp();
280 void objectBrowserClicked(QTreeWidgetItem * item, int);
282};
283
284Q_DECLARE_OPERATORS_FOR_FLAGS(TrackSystemController::TrackLabelModes)
285Q_DECLARE_OPERATORS_FOR_FLAGS(TrackSystemController::PropagationOptionFlags)
286
287#endif
double charge(const T &p)
Definition AtlasPID.h:1003
Helper tool to print EDM objects to string in a fix format.
static QString toString(const SELECTIONMODE &)
void availableExtrapolatorsChanged(const QStringList &)
void possibleChange_cutRequiredDetectorElement()
TrackCommonFlags::FITTERMODE fitterMode() const
void possibleChange_shownTSOSParts()
SoDrawStyle * ascObjDrawStyle() const
void assocObjDetailLevelChanged(TrackCommonFlags::DETAILLEVEL)
float trackLabelTrkOffset()
Percentage of postion along track.
bool printTotMomentumOnMultiTrackSelection() const
void possibleChange_vertexProjectionAngle()
void cutAllowedEtaChanged(const VP1Interval &)
void propMaxRadiusChanged(float)
void possibleChange_trackLabelPosOffset()
void cutAllowedPtChanged(const VP1Interval &)
VP1Interval cutAllowedEta() const
QList< unsigned > cutRequiredNHits() const
void trackLabelPosOffsetChanged(QList< int >)
void cutOnlyVertexAssocTracksChanged(bool)
void materialEffectsOnTrackScaleChanged(double)
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 shownTSOSPartsChanged(TrackCommonFlags::TSOSPartsFlags)
void trackLabelTrkOffsetChanged(float)
static QString toString(const TrackCommonFlags::DETAILLEVEL &par)
void possibleChange_useShortTRTMeasurements()
bool ignoreMeasurementEffectsOnTrackInProp()
If true (default) don't use TSOS with MEOT to draw track points.
void possibleChange_trackLabels()
void nStdDevForParamErrorsChanged(const double &)
static QString toString(const T &t)
void numberOfPointsOnCirclesChanged(int)
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
void cutAllowedPhiChanged(const QList< VP1Interval > &)
int labelZOffset()
Absolute z offset.
void selectionModeChanged(TrackCommonFlags::SELECTIONMODE)
void cutRequiredNHitsChanged(const QList< unsigned > &)
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 customColouredTSOSPartsChanged(TrackCommonFlags::TSOSPartsFlags)
void propagationOptionsChanged(TrackSystemController::PropagationOptionFlags)
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).
void showTruthAscObjsChanged(bool)
void drawMeasGlobalPositionsChanged(bool)
void shownTrackPartsChanged(TrackCommonFlags::TrackPartsFlags)
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.
void cutTruthFromIROnlyChanged(bool)
void useShortMDTMeasurementsChanged(bool)
SoMaterial * customMatMaterialEffects() const
void possibleChange_cutRequiredNHits()
int labelYOffset()
Absolute y offset.
void possibleChange_parTubeErrorsDrawCylinders()
void cutTruthExcludeNeutralsChanged(bool)
Trk::ITrackFitter * trackFitter() const
void useShortTRTMeasurementsChanged(bool)
void cutExcludeBarcodeZeroChanged(bool)
void possibleChange_drawMeasGlobalPositions()
TrackCommonFlags::TrackPartsFlags shownTrackParts() const
void measurementsShorttubesScaleChanged(double)
SoComplexity * ascObjComplexity() const
static QString toString(const TrackCommonFlags::SELECTIONMODE &par)
void possibleChange_selectionMode()
void trackLabelsChanged(TrackSystemController::TrackLabelModes)
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 trackFitterChanged(Trk::ITrackFitter *)
void possibleChange_useShortMDTMeasurements()
void possibleChange_cutAllowedEta()
int labelXOffset()
Absolute x offset.
SoMaterial * customMatMeasurements() const
void actualSaveSettings(VP1Serialise &) const
void showTotMomentumOnMultiTrackSelectionChanged(bool)
void cutRequiredDetectorElementChanged(const QString &)
void possibleChange_trackLabelTrkOffset()
void vertexProjectionAngleChanged(int)
void parTubeErrorsDrawCylindersChanged(bool)
void possibleChange_assocObjDetailLevel()
void possibleChange_propMaxRadius()
void possibleChange_measurementsShorttubesScale()
void propagatorChanged(Trk::IExtrapolator *)
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
static QString toString(const T &par)
VP1Controller(IVP1System *sys, const QString &classname)
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.