ATLAS Offline Software
Loading...
Searching...
No Matches
Tracking/TrkEvent/TrkTrack/TrkTrack/Track.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#ifndef TRKTRACK_H
6#define TRKTRACK_H
7
8#include <atomic>
9#include <iostream>
10#include <memory>
11#include <vector>
12
19#include "TrkTrack/TrackInfo.h"
22class MsgStream;
23class TrackCnv_p1;
24class TrackCnv_p2;
25class TrackCnv_p3;
26class TrackCnv_p4;
27class TrackCnv_p12;
28
29namespace Trk {
72
73class Track : public Trk::ObjectCounter<Trk::Track> {
74 public:
75 friend class TrackSlimmingTool;
76
84 Track() = default;
85
89 Track(const TrackInfo& info,
90 std::unique_ptr<TrackStates> trackStateOnSurfaces,
91 std::unique_ptr<FitQuality> fitQuality);
92
93 Track(const Track& rhs);
94
95 Track& operator=(const Track& rhs);
96
97 Track(Track&& rhs) = default;
98
99 Track& operator=(Track&& rhs) = default;
100
101 virtual ~Track() = default;
102
108 bool isValid() const;
109
113 const FitQuality* fitQuality() const;
121 void setFitQuality(std::unique_ptr<FitQuality> quality);
122
133
138 std::unique_ptr<Trk::TrackStates> input);
139
143 const TrackInfo& info() const;
144
149
153 void setInfo(const TrackInfo& input);
154
160
166
170 void setTrackSummary(std::unique_ptr<Trk::TrackSummary> input);
171
185 const Perigee* perigeeParameters() const;
186
195
205
215
220
221 protected:
222 friend class ::TrackCnv_p1;
223 friend class ::TrackCnv_p2;
224 friend class ::TrackCnv_p3;
225 friend class ::TrackCnv_p4;
226 friend class ::TrackCnv_p12;
227
229
234 void findPerigee() const;
235
240 void copyHelper(const Track& rhs);
241
248 std::unique_ptr<TrackStates> m_trackStateVector = nullptr;
249
261
272
281
289
293 std::unique_ptr<FitQuality> m_fitQuality{nullptr};
294
298 std::unique_ptr<Trk::TrackSummary> m_trackSummary{nullptr};
299
305
306 private:
311 void findPerigeeImpl() const;
312
313}; // end of class definitions
314
318MsgStream& operator<<(MsgStream& sl, const Track& track);
319
323std::ostream& operator<<(std::ostream& sl, const Track& track);
324
325} // namespace Trk
326
327#include "Track.icc"
328#endif
329
Cached value with atomic update.
macros to associate a CLID to a type
An STL vector of pointers that by default owns its pointed-to elements.
Cached value with atomic update.
Definition CachedValue.h:55
Derived DataVector<T>.
Definition DataVector.h:795
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition FitQuality.h:97
Helper to enable counting number of instantiations in debug builds.
Contains information about the 'fitter' of this track.
A summary of the information contained by a track.
CxxUtils::CachedValue< DataVector< const TrackParameters > > m_cachedParameterVector
A vector of TrackParameters: these can be any of the classes that derive from Trk::TrackParameters,...
Track()=default
Default constructor Here for POOL and simple tests.
CxxUtils::CachedValue< DataVector< const MeasurementBase > > m_cachedMeasurementVector
A vector of MeasurementBase: these objects represent the "hits" on the track (but not outliers - see ...
std::unique_ptr< Trk::TrackSummary > m_trackSummary
Datamember to cache the TrackSummary.
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
const DataVector< const TrackParameters > * trackParameters() const
Return a pointer to a vector of TrackParameters.
Trk::TrackInfo m_trackInfo
This is a class which stores the identity of where the track was created, fitted, which properties th...
TrackInfo & info()
returns a ref to the info.
Trk::TrackSummary * trackSummary()
Returns a pointer to the Trk::TrackSummary owned by this track (could be nullptr)
void setFitQuality(std::unique_ptr< FitQuality > quality)
set FitQuality.
void resetCaches()
reset all caches
void findPerigeeImpl() const
find PerigeeImpl.
void setTrackSummary(std::unique_ptr< Trk::TrackSummary > input)
Set the track summary.
Track & operator=(Track &&rhs)=default
move assignment operator
Trk::TrackStates::const_iterator TSoS_iterator
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
void setTrackStateOnSurfaces(std::unique_ptr< Trk::TrackStates > input)
Set the TrackStateOnSurfaces.
const Perigee * perigeeParameters() const
return Perigee.
Track & operator=(const Track &rhs)
assignment operator
std::unique_ptr< TrackStates > m_trackStateVector
TrackStateOnSurface.
FitQuality * fitQuality()
return a pointer to the fit quality non-const overload
CxxUtils::CachedValue< DataVector< const MeasurementBase > > m_cachedOutlierVector
These objects represent the "outliers" on the track.
const DataVector< const MeasurementBase > * outliersOnTrack() const
return a pointer to a vector of MeasurementBase, which represent outliers (i.e.
virtual ~Track()=default
destructor
bool isValid() const
returns true if the track has non-nullptr fitQuality and non-empty Trk::TrackStates
CxxUtils::CachedValue< const Perigee * > m_perigeeParameters
A pointer to the Track's Perigee parameters.
Trk::TrackStates * trackStateOnSurfaces()
return a pointer to a DataVector of const TrackStateOnSurfaces.
std::unique_ptr< FitQuality > m_fitQuality
A pointer to the Track's FitQuality.
void setInfo(const TrackInfo &input)
set the info.
void copyHelper(const Track &rhs)
Helper method to factor common part of copy ctor and copy assignment.
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr)
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
void findPerigee() const
Find perigee in the vector of track parameters.
Track(Track &&rhs)=default
move constructor
Ensure that the ATLAS eigen extensions are properly loaded.
DataVector< const Trk::TrackStateOnSurface > TrackStates
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output