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#include <QFlags>
27
28class TrackCollWidget;
29class SoMaterial;
30class SoDrawStyle;
31class SoComplexity;
33class QTreeWidget;
34class QTreeWidgetItem;
37
38namespace Trk {
39 class IExtrapolator;
40 class ITrackFitter;
41 class Track;
42 class Volume;
43}
44
45namespace Muon {
47}
48
50
51 Q_OBJECT
52
53public:
54
56 virtual ~TrackSystemController();
57
58 void initTools();//comboboxes for selecting tools + tool creation is
59 //postponed until this call (so it can wait until
60 //systemcreate())
61
63 int currentSettingsVersion() const;
65
66 /*So we can enable/disable parts based on whether prd's & Tracks are selected:*/
67 void setNumberOfSelectedPRDsAndTracks(unsigned prds, unsigned trks);
68
70
72 // Access Methods for settings //
74 TrackCommonFlags::TrackPartsFlags shownTrackParts() const;
75 int vertexProjectionAngle() const; //Ranges from 0-179 i.e. is in degrees. Might be disabled, in which case will be -ve.
76
77 // double trackTubeRadius() const;//0 => don't show tubes for tracks
79 Q_DECLARE_FLAGS(PropagationOptionFlags, PropagationOptionFlag)
80 Trk::IExtrapolator * propagator() const;//Null for no propagator - i.e. show raw data.
81 PropagationOptionFlags propagationOptions() const;
82 float propMaxRadius() const;
83
85 const Trk::Volume * extrapolateToThisVolume() const ;
87
89
90 QString nameOfNewlyFittedCollections() const;//queried on-demand, no signal.
93 bool fitterRemoveOutliers() const;
96
97 //Associated objects (base):
98 TrackCommonFlags::TSOSPartsFlags shownTSOSParts() const;
99 TrackCommonFlags::TSOSPartsFlags customColouredTSOSParts() const;
100 bool useShortTRTMeasurements() const;
101 bool useShortMDTMeasurements() const;
102 bool drawMeasGlobalPositions() const;
103
104 bool hideCustomSurfaces() const;
105 bool hideTubeSurfaces() const;
106 double measurementsShorttubesScale() const;
107 double nStdDevForParamErrors() const;
108 bool parTubeErrorsDrawCylinders() const;
109 int numberOfPointsOnCircles() const;//will return numbers in {4,8,12,16,...}
110 double materialEffectsOnTrackScale() const;
111
112
113 bool showTruthAscObjs() const;//Fixme: obsolete
114 //General cuts:
117 QList<VP1Interval> cutAllowedPhi() const;//All off: empty list. All on: list with one entry: ]-inf,inf[
118 //Cuts for number of hits per subsystem:
119 QList<unsigned> cutRequiredNHits() const;//Empty list: no requirements. Otherwise a list
120 // with a length of four (pixel,sct,trt,muon)
121 QString cutRequiredDetectorElement() const; //Null string, no requirement. Otherwise the string is converted into an identifier.
122
123 void vertexCutsAllowed(bool); // called if vertex system is available.
124 bool cutOnlyVertexAssocTracks() const;
125 //Truth cuts:
126 bool cutTruthFromIROnly() const;
127 bool cutExcludeBarcodeZero() const;
128 bool cutTruthExcludeNeutrals() const;
129 //Interactions:
131 //No associated signals for the next four (only queried on-click):
133 bool printInfoOnSingleSelection() const;
136
137 //Material pointers returned by the next methods won't change during
138 //the lifetime of the system (but their fields may get updated by
139 //the controller):
140 SoMaterial * getMaterialForPDGCode(const int& pdgcode) const;
141 SoMaterial * getMaterialForCharge(const double& charge) const;
142 SoMaterial * getMaterialForMomentum(const double& absmom) const;
143 SoMaterial * customMatMeasurements() const;
144 SoMaterial * customMatMeasurementsOutliers() const;
145 SoMaterial * customMatParameters() const;
146 SoMaterial * customMatHoleParameters() const;
147 SoMaterial * customMatParameterErrors() const;
148 SoMaterial * customMatMaterialEffects() const;
149 SoMaterial * customMatSurfaces() const;
150
151 //Overall drawstyles, complexities and light models:
152 // SoDrawStyle * trackDrawStyle() const;
153 // SoLightModel * trackLightModel() const;
154 SoDrawStyle * ascObjDrawStyle() const;
155 SoComplexity * ascObjComplexity() const;
156
157 QTreeWidget* trackObjBrowser() const;
158 TrackSysCommonData * common() const;
160
161 // Return special information for VP1_TRKSYS_SHIFTCHAMBERS mode
162 std::vector<double> alignmentShiftValue();
164
165 // Labels
166 bool doTrackLabels();
167 enum TrackLabelMode {NoLabels=0x0000, P=0x0001, Pt=0x0002, Pid=0x0004, Hits=0x0008,
168 FitQuality=0x0010, Direction=0x0020};
169 Q_DECLARE_FLAGS(TrackLabelModes, TrackLabelMode)
170
171 TrackLabelModes trackLabels();
172
173 float trackLabelTrkOffset() ;
174 QList<int> trackLabelPosOffset() ;
175
176 int labelXOffset() ;
177 int labelYOffset() ;
178 int labelZOffset() ;
179
181 // Signals for changes in settings //
183signals:
184 void rerandomise();//This one doesn't have an access method, but is just emitted when needed.
185 void refit();//[TEMPORARY] This one doesn't have an access method, but is just emitted when needed.
186 void shownTrackPartsChanged(TrackCommonFlags::TrackPartsFlags);
188 void trackLabelsChanged(TrackSystemController::TrackLabelModes);
191 // void trackTubeRadiusChanged(const double&);
192 void shownTSOSPartsChanged(TrackCommonFlags::TSOSPartsFlags);
193 void customColouredTSOSPartsChanged(TrackCommonFlags::TSOSPartsFlags);
198 void nStdDevForParamErrorsChanged(const double&);
203 void propagationOptionsChanged(TrackSystemController::PropagationOptionFlags);
206 // void ignoreMeasurementEffectsOnTrackInPropChanged(bool);
213 void cutAllowedPhiChanged(const QList<VP1Interval>&);
214 void cutRequiredNHitsChanged(const QList<unsigned>&);
221
222private:
223
224 class Imp;
226
227 //For verbose output:
228 template <class T> static QString toString( const T& t ) { return VP1Controller::toString(t); }//unhide base methods
229 static QString toString( const TrackCommonFlags::SELECTIONMODE& par ) { return TrackCommonFlags::toString(par); }
230 static QString toString( const TrackCommonFlags::DETAILLEVEL& par ) { return TrackCommonFlags::toString(par); }
231 static QString toString( const QList<unsigned>& par );
232 static QString toString( const QList<int>& par );
233
234private Q_SLOTS:
235 void emitRerandomise();
236 void emitRefit();
237 // void updateTrackDrawStyle();
238 // void updateTrackLightModel();
241 void availableExtrapolatorsChanged(const QStringList&);
242 void availableFittersChanged(const QStringList&);
246 // void possibleChange_trackTubeRadius();
263 // void possibleChange_ignoreMeasurementEffectsOnTrackInProp();
278 void objectBrowserClicked(QTreeWidgetItem * item, int);
280};
281
282Q_DECLARE_OPERATORS_FOR_FLAGS(TrackSystemController::TrackLabelModes)
283Q_DECLARE_OPERATORS_FOR_FLAGS(TrackSystemController::PropagationOptionFlags)
284
285#endif
double charge(const T &p)
Definition AtlasPID.h:997
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.