ATLAS Offline Software
Loading...
Searching...
No Matches
Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6// Segment.h, (c) ATLAS Detector software
8
9#ifndef TRKSEGMENT_SEGMENT_H
10#define TRKSEGMENT_SEGMENT_H
11
12// Trk
16#include <atomic>
17#include <memory>
18#include <string>
19#include <utility>
20#include <vector>
21class SegmentCnv_p1;
22
23namespace Trk {
24
25class PrepRawData;
26class RIO_OnTrack;
28class FitQuality;
29
52
54 : public MeasurementBase
55 , public Trk::ObjectCounter<Trk::Segment>
56{
57
58public:
82
84 Segment();
86 Segment(const Segment& seg);
88 Segment(Segment&&) noexcept;
90 Segment& operator=(const Segment& seg);
92 Segment& operator=(Segment&&) noexcept;
93
95 Segment(LocalParameters&& locpars,
96 Amg::MatrixX&& locerr,
97 DataVector<const MeasurementBase>&& measurements,
98 FitQuality* fitq = nullptr,
100
102 virtual ~Segment();
103
105 virtual Segment* clone() const override = 0;
106
109 {
110 return std::unique_ptr<Segment>(clone());
111 }
112
114 virtual bool type(MeasurementBaseType::Type type) const override final
115 {
117 }
118
122 const std::vector<const Trk::MeasurementBase*>& containedMeasurements() const;
123
126
127 bool hasContainedMeasurements() const;
129 unsigned int numberOfMeasurementBases() const;
130
132 const MeasurementBase* measurement(unsigned int) const;
133
136 const FitQuality* fitQuality() const;
137
139 void setAuthor(Author a);
141 Author author() const;
142
144 std::string dumpAuthor() const;
145
146protected:
147 friend class ::SegmentCnv_p1;
148
150 std::unique_ptr<FitQuality> m_fitQuality;
151
154
157};
158
159inline const FitQuality*
161{
162 return m_fitQuality.get();
163}
164
165inline const std::vector<const MeasurementBase*>&
167{
168 return m_containedMeasBases.stdcont();
169}
170
176
177inline bool
179{
180 return !m_containedMeasBases.empty();
181}
182
183inline const MeasurementBase*
184Segment::measurement(unsigned int indx) const
185{
186 if (!m_containedMeasBases.empty() && indx < m_containedMeasBases.size()) {
187 return std::as_const(m_containedMeasBases)[indx];
188 }
189 return nullptr;
190}
191
192inline unsigned int
194{
195 return m_containedMeasBases.size();
196}
197
198inline Segment::Author
200{
201 return m_author;
202}
203}
204
205#endif // TRKSEGMENT_SEGMENT_H
206
An STL vector of pointers that by default owns its pointed-to elements.
static Double_t a
Derived DataVector<T>.
Definition DataVector.h:795
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition FitQuality.h:97
This class is the pure abstract base class for all fittable tracking measurements.
MeasurementBase()=default
Default constructor - needed for POOL/SEAL.
Helper to enable counting number of instantiations in debug builds.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
Base class for all TrackSegment implementations, extends the common MeasurementBase.
Author author() const
return segment author
Author
enum to identify who created the segment.
const MeasurementBase * measurement(unsigned int) const
returns the Trk::MeasurementBase objects depending on the integer
Segment()
Default Constructor for POOL.
void setAuthor(Author a)
sets the segment author
std::unique_ptr< FitQuality > m_fitQuality
The fit quality of the Segment.
std::string dumpAuthor() const
returns human readble string version of author
const FitQuality * fitQuality() const
return the FitQuality object, returns NULL if no FitQuality is defined
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects
std::unique_ptr< Segment > uniqueClone() const
NVI uniqueClone method.
virtual Segment * clone() const override=0
Pseudo-constructor: needed to avoid excessive RTTI.
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.
DataVector< const MeasurementBase > m_containedMeasBases
The vector of contained (generic) Trk::MeasurementBase objects.
const DataVector< const Trk::MeasurementBase > & containedMeasurementsDataVector() const
unsigned int numberOfMeasurementBases() const
Return the number of contained Trk::MeasurementBase (s)
This is the base class for all tracking detector elements with read-out relevant information.
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
Ensure that the ATLAS eigen extensions are properly loaded.
STL namespace.