ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::PixelSpacePoint Class Referencefinal

A PixelSpacePoint is created from a PixelCluster. More...

#include <PixelSpacePoint.h>

Inheritance diagram for InDet::PixelSpacePoint:
Collaboration diagram for InDet::PixelSpacePoint:

Public Member Functions

 PixelSpacePoint ()=default
 Default constructor.
 PixelSpacePoint (IdentifierHash elementId, const Trk::PrepRawData *clus)
 Parametrised constructor.
 PixelSpacePoint (IdentifierHash elementId, const Trk::PrepRawData *clus, const Amg::Vector3D &globpos, const AmgSymMatrix(3)&globcov)
 add Covariance Matrix and global position directly
 PixelSpacePoint (const PixelSpacePoint &PSP)=default
 PixelSpacePoint (PixelSpacePoint &&PSP) noexcept=default
PixelSpacePointoperator= (const PixelSpacePoint &)=default
PixelSpacePointoperator= (PixelSpacePoint &&) noexcept=default
 ~PixelSpacePoint ()=default
 Destructor.
virtual SpacePointclone () const override final
 Clones.
virtual MsgStream & dump (MsgStream &out) const override final
 Interface method for output, to be overloaded by child classes.
virtual std::ostream & dump (std::ostream &out) const override final
 Interface method for output, to be overloaded by child classes.
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 SurfaceassociatedSurface () const override final
 Interface method to get the associated Surface.
virtual const Amg::Vector3DglobalPosition () const override final
 Interface method to get the global Position.
std::unique_ptr< SpacePointuniqueClone () const
 Clone.
virtual bool type (MeasurementBaseType::Type type) const override final
 Extended method checking the type.
const LocalParameters & localParameters () const
 Interface method to get the LocalParameters.
const Amg::MatrixXlocalCovariance () const
 Interface method to get the localError.

Protected Member Functions

 AmgSymMatrix (3) m_globalCovariance
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, IdentifierHashm_elemIdList
Amg::Vector3D m_position
LocalParameters m_localParams
Amg::MatrixX m_localCovariance

Detailed Description

A PixelSpacePoint is created from a PixelCluster.

Definition at line 31 of file PixelSpacePoint.h.

Constructor & Destructor Documentation

◆ PixelSpacePoint() [1/5]

InDet::PixelSpacePoint::PixelSpacePoint ( )
default

Default constructor.

◆ PixelSpacePoint() [2/5]

InDet::PixelSpacePoint::PixelSpacePoint ( IdentifierHash elementId,
const Trk::PrepRawData * clus )

Parametrised constructor.

Constructor without globCovariance.

Definition at line 23 of file PixelSpacePoint.cxx.

25 : SpacePoint() {
26 assert(clus != nullptr);
28 Trk::LocalParameters(clus->localPosition());
32
33 m_clusList = {clus, nullptr};
34 m_elemIdList.first = elementId;
35 m_elemIdList.second = 0;
37}
LocalParameters m_localParams
Amg::MatrixX m_localCovariance
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
const Amg::Vector2D & localPosition() const
return the local position reference
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
void setupGlobalFromLocalCovariance()
set up the global covariance matrix by rotating the local one
std::pair< IdentifierHash, IdentifierHash > m_elemIdList
std::pair< const PrepRawData *, const PrepRawData * > m_clusList
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
virtual const Surface & surface() const =0
Return surface associated with this detector element.

◆ PixelSpacePoint() [3/5]

InDet::PixelSpacePoint::PixelSpacePoint ( IdentifierHash elementId,
const Trk::PrepRawData * clus,
const Amg::Vector3D & globpos,
const AmgSymMatrix(3)& globcov )

add Covariance Matrix and global position directly

Constructor with globPosition and globCovariance.

Definition at line 42 of file PixelSpacePoint.cxx.

46 : SpacePoint() {
47 assert(clus != nullptr);
48 m_position = globpos;
49 m_globalCovariance = globcov;
50 m_clusList = {clus, nullptr};
51 m_elemIdList.first = elementId;
52 m_elemIdList.second = 0;
53}

◆ PixelSpacePoint() [4/5]

InDet::PixelSpacePoint::PixelSpacePoint ( const PixelSpacePoint & PSP)
default

◆ PixelSpacePoint() [5/5]

InDet::PixelSpacePoint::PixelSpacePoint ( PixelSpacePoint && PSP)
defaultnoexcept

◆ ~PixelSpacePoint()

InDet::PixelSpacePoint::~PixelSpacePoint ( )
default

Destructor.

Member Function Documentation

◆ AmgSymMatrix() [1/2]

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

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 )
protectedinherited

◆ associatedSurface()

const Surface & SpacePoint::associatedSurface ( ) const
finaloverridevirtualinherited

Interface method to get the associated Surface.

Implements Trk::MeasurementBase.

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

77 {
78 assert(m_clusList.first->detectorElement());
79 return m_clusList.first->detectorElement()->surface();
80 }

◆ clone()

Trk::SpacePoint * InDet::PixelSpacePoint::clone ( ) const
inlinefinaloverridevirtual

Clones.

Implements Trk::SpacePoint.

Definition at line 71 of file PixelSpacePoint.h.

71 {
72 return new PixelSpacePoint(*this);
73}
PixelSpacePoint()=default
Default constructor.

◆ clusterList()

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

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]

MsgStream & InDet::PixelSpacePoint::dump ( MsgStream & out) const
finaloverridevirtual

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

Implements Trk::SpacePoint.

Definition at line 57 of file PixelSpacePoint.cxx.

57 {
58 std::ostringstream os;
59 dump(os);
60 out << os.str();
61 return out;
62}
virtual MsgStream & dump(MsgStream &out) const override final
Interface method for output, to be overloaded by child classes.

◆ dump() [2/2]

std::ostream & InDet::PixelSpacePoint::dump ( std::ostream & out) const
finaloverridevirtual

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

Implements Trk::SpacePoint.

Definition at line 66 of file PixelSpacePoint.cxx.

66 {
67 const std::string lf{"\n"}; // linefeed
68 out << "PixelSpacePoint contains: " << lf;
69 out << "Identifier Hash " << int(this->elementIdList().first) << lf;
70 out << "Global Position: " << Amg::toString(this->globalPosition(), 3) << lf;
71 out << "Global Covariance Matrix " << Amg::toString(this->globCovariance(), 3)
72 << lf;
73 out << "Local Parameters " << this->localParameters() << lf;
74 out << "Local Covariance " << Amg::toString(this->localCovariance()) << lf;
75 out << "Cluster 1 :" << lf << (*this->clusterList().first) << std::endl;
76
77 return out;
78}
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
virtual const Amg::Vector3D & globalPosition() const override final
Interface method to get the global Position.
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
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.

◆ elementIdList()

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

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 SpacePoint::eta ( double z0 = 0) const
inlineinherited

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 & SpacePoint::globalPosition ( ) const
inlinefinaloverridevirtualinherited

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}

◆ 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}

◆ operator=() [1/2]

PixelSpacePoint & InDet::PixelSpacePoint::operator= ( const PixelSpacePoint & )
default

◆ operator=() [2/2]

PixelSpacePoint & InDet::PixelSpacePoint::operator= ( PixelSpacePoint && )
defaultnoexcept

◆ phi()

double SpacePoint::phi ( ) const
inlineinherited

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 SpacePoint::r ( ) const
inlineinherited

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 SpacePoint::setupGlobalFromLocalCovariance ( )
protectedinherited

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 const Amg::RotationMatrix3D& R = associatedSurface().transform().rotation();
74 m_globalCovariance = R * cov * R.transpose();
75 }
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
inlinefinaloverridevirtualinherited

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
inlineinherited

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
protectedinherited

◆ m_elemIdList

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

◆ 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
protectedinherited

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