ATLAS Offline Software
Loading...
Searching...
No Matches
PseudoMeasurementOnTrack.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6// PseudoMeasurementOnTrack.cxx, (c) ATLAS Detector software
8
10//#include "TrkEventPrimitives/LocalParameters.h"
11//#include "TrkEventPrimitives/ErrorMatrix.h"
12#include "GaudiKernel/MsgStream.h"
13#include "TrkSurfaces/Surface.h"
14#include <string>
15#include <typeinfo>
16
17namespace {
18// helper to move pointer and set source to nullptr
19template<class T>
20T
21move_ptr(T& src)
22{
23 T tmp = src;
24 src = nullptr;
25 return tmp;
26}
27
28const double NaN(std::numeric_limits<double>::quiet_NaN());
29const Amg::Vector3D INVALID_VECTOR3D(NaN, NaN, NaN);
30}
31
33 LocalParameters&& locpars,
34 Amg::MatrixX&& locerr,
35 const Surface& assocSurf)
36 : Trk::MeasurementBase(std::move(locpars), std::move(locerr))
37 , SurfacePtrHolder(assocSurf)
39{
40}
41
43 LocalParameters&& locpars,
44 Amg::MatrixX&& locerr,
46 : Trk::MeasurementBase(std::move(locpars), std::move(locerr))
47 , SurfacePtrHolder(assocSurf.release())
49{
50}
51
52// default constructor:
58
59MsgStream&
61{
62 std::string name(typeid(*this).name());
63 sl << "Concrete dump method not implemented - using base class" << std::endl;
64 sl << name << "\t local position = " << this->localParameters() << std::endl;
65 sl << name << "\t global position ( " << this->globalPosition().x() << " , "
66 << this->globalPosition().y() << " , " << this->globalPosition().z()
67 << " ) " << std::endl;
68 sl << name << "\t has error matrix: " << std::endl;
69 sl << this->localCovariance() << std::endl;
70 sl << name << "\t has associated surface:" << std::endl;
71 sl << this->associatedSurface() << std::endl;
72 return sl;
73}
74
75std::ostream&
77{
78 std::string name(typeid(*this).name());
79 sl << "Concrete dump method not implemented - using base class" << std::endl;
80 sl << name << "\t local position = " << this->localParameters() << std::endl;
81 sl << name << "\t global position ( " << this->globalPosition().x() << " , "
82 << this->globalPosition().y() << " , " << this->globalPosition().z()
83 << " ) " << std::endl;
84 sl << name << "\t has error matrix: " << std::endl;
85 sl << this->localCovariance() << std::endl;
86 sl << name << "\t has associated surface:" << std::endl;
87 sl << this->associatedSurface() << std::endl;
88 return sl;
89}
90
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
MeasurementBase()=default
Default constructor - needed for POOL/SEAL.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
virtual MsgStream & dump(MsgStream &out) const override final
produces logfile output about its content in MsgStream form.
virtual const Amg::Vector3D & globalPosition() const override final
returns the global Position (interface from MeasurementBase)
Amg::Vector3D m_globalPosition
Global position of the PMoT.
PseudoMeasurementOnTrack()
Default Constructor for POOL.
virtual const Surface & associatedSurface() const override final
returns the surface for the local to global transformation (interface from MeasurementBase)
Abstract Base Class for tracking surfaces.
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.
SurfaceUniquePtrT< const Trk::Surface > ConstSurfaceUniquePtr
SurfacePtrHolderImpl< Surface > SurfacePtrHolder
STL namespace.