ATLAS Offline Software
Loading...
Searching...
No Matches
PixelSpacePoint.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
7#include <memory>
8#include <ostream>
9#include <sstream>
10
16#include "TrkSurfaces/Surface.h"
17
18namespace InDet {
19
20//-------------------------------------------------------------
22
24 const Trk::PrepRawData* clus)
25 : SpacePoint() {
26 assert(clus != nullptr);
32
33 m_clusList = {clus, nullptr};
34 m_elemIdList.first = elementId;
35 m_elemIdList.second = 0;
37}
38
39//------------ -------------------------------------------------
40
43 const Trk::PrepRawData* clus,
44 const Amg::Vector3D& globpos,
45 const AmgSymMatrix(3)& globcov)
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}
54
55//-------------------------------------------------------------
56
57MsgStream& PixelSpacePoint::dump(MsgStream& out) const {
58 std::ostringstream os;
59 dump(os);
60 out << os.str();
61 return out;
62}
63
64//-------------------------------------------------------------
65
66std::ostream& PixelSpacePoint::dump(std::ostream& out) const {
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}
79
80// ------------------------------------------------------------------
81
82
83} // namespace InDet
84
#define AmgSymMatrix(dim)
This is a "hash" representation of an Identifier.
virtual MsgStream & dump(MsgStream &out) const override final
Interface method for output, to be overloaded by child classes.
PixelSpacePoint()=default
Default constructor.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
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
virtual const Amg::Vector3D & globalPosition() const override final
Interface method to get the global Position.
void setupGlobalFromLocalCovariance()
set up the global covariance matrix by rotating the local one
const std::pair< IdentifierHash, IdentifierHash > & elementIdList() const
return the pair of Ids of the element by reference
std::pair< IdentifierHash, IdentifierHash > m_elemIdList
const std::pair< const PrepRawData *, const PrepRawData * > & clusterList() const
return the pair of cluster pointers by reference
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.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 1 > Vector3D
Primary Vertex Finder.
-event-from-file