ATLAS Offline Software
Loading...
Searching...
No Matches
MeasurementBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6// MeasurementBase.h, (c) ATLAS Detector software
8
9#ifndef TRKMEASUREMENTBASE_MEASUREMENTBASE_H
10#define TRKMEASUREMENTBASE_MEASUREMENTBASE_H
11
12// Amg
15// Trk
17
18// I/O
19#include <iosfwd>
20#include <memory>
21class MsgStream;
22
23namespace Trk {
24
25class LocalParameters;
26class ErrorMatrix;
27class Surface;
28
40
42/* The various kind of MeasurementBase
43 * to avoid dynamic_cast via using the type method
44 */
55}
56
58{
59
60public:
62 MeasurementBase() = default;
63
66 : m_localParams(std::move(pars))
67 , m_localCovariance(std::move(cov))
68 {}
69
71 virtual ~MeasurementBase() = default;
72
74 virtual MeasurementBase* clone() const = 0;
75
77 std::unique_ptr<MeasurementBase> uniqueClone() const
78 {
79 return std::unique_ptr<MeasurementBase>(clone());
80 }
81
83 const LocalParameters& localParameters() const;
84
86 const Amg::MatrixX& localCovariance() const;
87
89 virtual const Surface& associatedSurface() const = 0;
90
92 virtual const Amg::Vector3D& globalPosition() const = 0;
93
95 virtual bool type(MeasurementBaseType::Type type) const = 0;
96
98 virtual MsgStream& dump(MsgStream& out) const = 0;
99
101 virtual std::ostream& dump(std::ostream& out) const = 0;
102
103protected:
104 // Here to help implement the relevant semantics for
105 // the derived classes
107 MeasurementBase(MeasurementBase&&) noexcept = default;
108 MeasurementBase& operator=(const MeasurementBase&) = default;
109 MeasurementBase& operator=(MeasurementBase&&) noexcept = default;
110
113};
114
116inline MsgStream&
117operator<<(MsgStream& sl, const Trk::MeasurementBase& mbase)
118{
119 return mbase.dump(sl);
120}
121
123inline std::ostream&
124operator<<(std::ostream& sl, const Trk::MeasurementBase& mbase)
125{
126 return mbase.dump(sl);
127}
128
129}
130
131inline const Trk::LocalParameters&
136
137inline const Amg::MatrixX&
142
143#endif
144
This class is the pure abstract base class for all fittable tracking measurements.
virtual MsgStream & dump(MsgStream &out) const =0
Interface method for output, to be overloaded by child classes*.
virtual MeasurementBase * clone() const =0
Pseudo-Constructor.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
MeasurementBase(LocalParameters &&pars, Amg::MatrixX &&cov)
constructor
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
virtual bool type(MeasurementBaseType::Type type) const =0
Interface method checking the type.
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
virtual std::ostream & dump(std::ostream &out) const =0
Interface method for output, to be overloaded by child classes*.
MeasurementBase()=default
Default constructor - needed for POOL/SEAL.
virtual ~MeasurementBase()=default
Virtual destructor.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
LocalParameters m_localParams
MeasurementBase(MeasurementBase &&) noexcept=default
Amg::MatrixX m_localCovariance
MeasurementBase(const MeasurementBase &)=default
std::unique_ptr< MeasurementBase > uniqueClone() const
NVI Clone giving up unique pointer.
Abstract Base Class for tracking surfaces.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
STL namespace.