ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::SpacePoint Class Referenceabstract

#include <SpacePoint.h>

Inheritance diagram for Trk::SpacePoint:
Collaboration diagram for Trk::SpacePoint:

Public Member Functions

 SpacePoint ()
virtual ~SpacePoint ()=default
const std::pair< IdentifierHash, IdentifierHash > & elementIdList () const
 return the pair of Ids of the element by reference
const std::pair< const PrepRawData *, const PrepRawData * > & clusterList () const
 return the pair of cluster pointers by reference
const AmgSymMatrix (3) &globCovariance() const
 return the error matrix by reference The Matrix is calculated from the local Covariance Matrix when demanded and the cached
double eta (double z0=0) const
 calculate eta (not cached), needs z0 info
double r () const
 returns the r value of the SpacePoint's position (in cylindrical coordinates).
double phi () const
 returns the phi value of the SpacePoint's position (in cylindrical coordinates).
virtual const Surface & associatedSurface () const override final
 Interface method to get the associated Surface.
virtual const Amg::Vector3D & globalPosition () const override final
 Interface method to get the global Position.
virtual SpacePoint * clone () const override=0
 Clone.
std::unique_ptr< SpacePoint > uniqueClone () const
 Clone.
virtual bool type (MeasurementBaseType::Type type) const override final
 Extended method checking the type.
virtual MsgStream & dump (MsgStream &out) const override=0
 Interface method for output, to be overloaded by child classes*.
virtual std::ostream & dump (std::ostream &out) const override=0
 Interface method for output, to be overloaded by child classes*.
const LocalParameters & localParameters () const
 Interface method to get the LocalParameters.
const Amg::MatrixX & localCovariance () const
 Interface method to get the localError.

Protected Member Functions

 AmgSymMatrix (3) m_globalCovariance
 SpacePoint (const SpacePoint &)=default
 SpacePoint (SpacePoint &&) noexcept=default
SpacePoint & operator= (const SpacePoint &)=default
SpacePoint & operator= (SpacePoint &&) noexcept=default
void setupGlobalFromLocalCovariance ()
 set up the global covariance matrix by rotating the local one

Protected Attributes

std::pair< const PrepRawData *, const PrepRawData * > m_clusList
std::pair< IdentifierHash, IdentifierHash > m_elemIdList
Amg::Vector3D m_position
LocalParameters m_localParams
Amg::MatrixX m_localCovariance

Detailed Description

Constructor & Destructor Documentation

◆ SpacePoint() [1/3]

Trk::SpacePoint::SpacePoint ( )

Definition at line 30 of file Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx.

31 :
32 m_clusList(nullptr, nullptr),
33 m_elemIdList(0,0),
34 m_position(),
35 m_globalCovariance()
36 {
37 }
std::pair< IdentifierHash, IdentifierHash > m_elemIdList
std::pair< const PrepRawData *, const PrepRawData * > m_clusList

◆ ~SpacePoint()

virtual Trk::SpacePoint::~SpacePoint ( )
virtualdefault

◆ SpacePoint() [2/3]

Trk::SpacePoint::SpacePoint ( const SpacePoint & )
protecteddefault

◆ SpacePoint() [3/3]

Trk::SpacePoint::SpacePoint ( SpacePoint && )
protecteddefaultnoexcept

Member Function Documentation

◆ AmgSymMatrix() [1/2]

const Trk::SpacePoint::AmgSymMatrix ( 3 ) const &

return the error matrix by reference The Matrix is calculated from the local Covariance Matrix when demanded and the cached

◆ AmgSymMatrix() [2/2]

Trk::SpacePoint::AmgSymMatrix ( 3 )
protected

◆ associatedSurface()

const Surface & Trk::SpacePoint::associatedSurface ( ) const
finaloverridevirtual

Interface method to get the associated Surface.

Implements Trk::MeasurementBase.

Definition at line 85 of file Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx.

85 {
86 assert(m_clusList.first->detectorElement());
87 return m_clusList.first->detectorElement()->surface();
88 }

◆ clone()

virtual SpacePoint * Trk::SpacePoint::clone ( ) const
overridepure virtual

Clone.

Implements Trk::MeasurementBase.

Implemented in InDet::PixelSpacePoint, and InDet::SCT_SpacePoint.

◆ clusterList()

const std::pair< const PrepRawData *, const PrepRawData * > & Trk::SpacePoint::clusterList ( ) const
inline

return the pair of cluster pointers by reference

Definition at line 127 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

127 {
128 return m_clusList;
129}

◆ dump() [1/2]

virtual MsgStream & Trk::SpacePoint::dump ( MsgStream & out) const
overridepure virtual

Interface method for output, to be overloaded by child classes*.

Implements Trk::MeasurementBase.

Implemented in InDet::PixelSpacePoint, and InDet::SCT_SpacePoint.

◆ dump() [2/2]

virtual std::ostream & Trk::SpacePoint::dump ( std::ostream & out) const
overridepure virtual

Interface method for output, to be overloaded by child classes*.

Implements Trk::MeasurementBase.

Implemented in InDet::PixelSpacePoint, and InDet::SCT_SpacePoint.

◆ elementIdList()

const std::pair< IdentifierHash, IdentifierHash > & Trk::SpacePoint::elementIdList ( ) const
inline

return the pair of Ids of the element by reference

Definition at line 122 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

122 {
123 return m_elemIdList;
124}

◆ eta()

double Trk::SpacePoint::eta ( double z0 = 0) const
inline

calculate eta (not cached), needs z0 info

Definition at line 131 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

131 {
132 // double zr = (m_z-z0)/m_r;
133 double zr = (m_position.z() - z0) / m_position.perp();
134 return std::log(zr + std::sqrt(1. + zr * zr));
135}
@ z0
Definition ParamDefs.h:64

◆ globalPosition()

const Amg::Vector3D & Trk::SpacePoint::globalPosition ( ) const
inlinefinaloverridevirtual

Interface method to get the global Position.

Implements Trk::MeasurementBase.

Definition at line 146 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

146 {
147 return m_position;
148}

◆ localCovariance()

const Amg::MatrixX & Trk::MeasurementBase::localCovariance ( ) const
inlineinherited

Interface method to get the localError.

Definition at line 138 of file MeasurementBase.h.

139{
140 return m_localCovariance;
141}
Amg::MatrixX m_localCovariance

◆ localParameters()

const Trk::LocalParameters & Trk::MeasurementBase::localParameters ( ) const
inlineinherited

Interface method to get the LocalParameters.

Definition at line 132 of file MeasurementBase.h.

133{
134 return m_localParams;
135}
LocalParameters m_localParams

◆ operator=() [1/2]

SpacePoint & Trk::SpacePoint::operator= ( const SpacePoint & )
protecteddefault

◆ operator=() [2/2]

SpacePoint & Trk::SpacePoint::operator= ( SpacePoint && )
protecteddefaultnoexcept

◆ phi()

double Trk::SpacePoint::phi ( ) const
inline

returns the phi value of the SpacePoint's position (in cylindrical coordinates).

This is calculated once in the ctor and then cached

Definition at line 141 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

141 {
142 return m_position.phi();
143}

◆ r()

double Trk::SpacePoint::r ( ) const
inline

returns the r value of the SpacePoint's position (in cylindrical coordinates).

This is calculated once in the ctor and then cached

Definition at line 137 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

137 {
138 return m_position.perp();
139}

◆ setupGlobalFromLocalCovariance()

ATH_FLATTEN void Trk::SpacePoint::setupGlobalFromLocalCovariance ( )
protected

set up the global covariance matrix by rotating the local one

Definition at line 63 of file Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx.

63 {
64 const Amg::MatrixX& lc = this->localCovariance();
65
66 Eigen::Matrix3d cov;
67
68 cov << lc(0, 0), lc(0, 1), 0.,
69 lc(1, 0), lc(1, 1), 0.,
70 // cppcheck-suppress constStatement
71 0., 0., 0.;
72
73 // Suppress false-positive uninitialized warning seen with gcc15.
74#if __GNUC__ >= 15
75#pragma GCC diagnostic push
76#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
77#endif
78 const Amg::RotationMatrix3D& R = associatedSurface().transform().rotation();
79#if __GNUC__ >= 15
80#pragma GCC diagnostic pop
81#endif
82 m_globalCovariance = R * cov * R.transpose();
83 }
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
virtual const Surface & associatedSurface() const override final
Interface method to get the associated Surface.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)

◆ type()

virtual bool Trk::SpacePoint::type ( MeasurementBaseType::Type type) const
inlinefinaloverridevirtual

Extended method checking the type.

Implements Trk::MeasurementBase.

Definition at line 87 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

87 {
89 }
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.

◆ uniqueClone()

std::unique_ptr< SpacePoint > Trk::SpacePoint::uniqueClone ( ) const
inline

Clone.

Definition at line 82 of file Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h.

82 {
83 return std::unique_ptr<SpacePoint>(clone());
84 }
virtual SpacePoint * clone() const override=0
Clone.

Member Data Documentation

◆ m_clusList

std::pair<const PrepRawData*, const PrepRawData*> Trk::SpacePoint::m_clusList
protected

◆ m_elemIdList

std::pair<IdentifierHash, IdentifierHash> Trk::SpacePoint::m_elemIdList
protected

◆ m_localCovariance

Amg::MatrixX Trk::MeasurementBase::m_localCovariance
protectedinherited

Definition at line 112 of file MeasurementBase.h.

◆ m_localParams

LocalParameters Trk::MeasurementBase::m_localParams
protectedinherited

Definition at line 111 of file MeasurementBase.h.

◆ m_position

Amg::Vector3D Trk::SpacePoint::m_position
protected

The documentation for this class was generated from the following files: