ATLAS Offline Software
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>
21 class MsgStream;
22 
23 namespace Trk {
24 
25 class LocalParameters;
26 class ErrorMatrix;
27 class Surface;
28 
41 namespace MeasurementBaseType {
42 /* The various kind of MeasurementBase
43  * to avoid dynamic_cast via using the type method
44  */
45 enum Type
46 {
47  Segment = 0,
54 };
55 }
56 
58 {
59 
60 public:
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 
103 protected:
104  // Here to help implement the relevant semantics for
105  // the derived classes
106  MeasurementBase(const MeasurementBase&) = default;
109  MeasurementBase& operator=(MeasurementBase&&) noexcept = default;
110 
113 };
114 
116 inline MsgStream&
117 operator<<(MsgStream& sl, const Trk::MeasurementBase& mbase)
118 {
119  return mbase.dump(sl);
120 }
121 
123 inline std::ostream&
124 operator<<(std::ostream& sl, const Trk::MeasurementBase& mbase)
125 {
126  return mbase.dump(sl);
127 }
128 
129 }
130 
131 inline const Trk::LocalParameters&
133 {
134  return m_localParams;
135 }
136 
137 inline const Amg::MatrixX&
139 {
140  return m_localCovariance;
141 }
142 
143 #endif
144 
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Trk::SpacePoint
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:35
Trk::LocalParameters
Definition: LocalParameters.h:98
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Trk::MeasurementBase::clone
virtual MeasurementBase * clone() const =0
Pseudo-Constructor.
Trk::MeasurementBase::~MeasurementBase
virtual ~MeasurementBase()=default
Virtual destructor.
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Trk::MeasurementBase::MeasurementBase
MeasurementBase()=default
Default constructor - needed for POOL/SEAL.
Trk::PseudoMeasurementOnTrack
Class to handle pseudo-measurements in fitters and on track objects.
Definition: PseudoMeasurementOnTrack.h:44
GeoPrimitives.h
Trk::MeasurementBase::dump
virtual std::ostream & dump(std::ostream &out) const =0
Interface method for output, to be overloaded by child classes*.
Trk::MeasurementBase::uniqueClone
std::unique_ptr< MeasurementBase > uniqueClone() const
NVI Clone giving up unique pointer.
Definition: MeasurementBase.h:77
Trk::MeasurementBase::MeasurementBase
MeasurementBase(MeasurementBase &&) noexcept=default
Trk::Segment
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:56
Trk::CompetingRIOsOnTrack
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
Definition: CompetingRIOsOnTrack.h:64
Trk::MeasurementBase::type
virtual bool type(MeasurementBaseType::Type type) const =0
Interface method checking the type.
xAODType
Definition: ObjectType.h:13
Trk::MeasurementBase::m_localParams
LocalParameters m_localParams
Definition: MeasurementBase.h:111
Trk::VertexOnTrack
Definition: VertexOnTrack.h:45
Trk::MeasurementBase::dump
virtual MsgStream & dump(MsgStream &out) const =0
Interface method for output, to be overloaded by child classes*.
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
Trk::MeasurementBase
Definition: MeasurementBase.h:58
EventPrimitives.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
Trk::CaloCluster_OnTrack
Definition: CaloCluster_OnTrack.h:32
Trk::MeasurementBase::associatedSurface
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
Trk::MeasurementBase::MeasurementBase
MeasurementBase(LocalParameters &&pars, Amg::MatrixX &&cov)
constructor
Definition: MeasurementBase.h:65
Trk::MeasurementBase::globalPosition
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
LocalParameters.h
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
Trk::MeasurementBase::m_localCovariance
Amg::MatrixX m_localCovariance
Definition: MeasurementBase.h:112
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition: AlignModule.cxx:204
Trk::MeasurementBase::MeasurementBase
MeasurementBase(const MeasurementBase &)=default
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
Trk::MeasurementBaseType::Type
Type
Definition: MeasurementBase.h:46
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75