ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkEvent
TrkSpacePoint
src
Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// SpacePoint.cxx Implementation file for class SpacePoint
8
// (c) ATLAS Detector software
10
// Version 1.0 14/10/2003 Veronique Boisvert
11
// Version 2.0 /12/2005 Martin Siebel
13
14
#include "
TrkSpacePoint/SpacePoint.h
"
15
#include "GaudiKernel/MsgStream.h"
16
#include "
TrkDetElementBase/TrkDetElementBase.h
"
17
#include "
TrkEventPrimitives/LocalParameters.h
"
18
#include "
TrkPrepRawData/PrepRawData.h
"
19
#include "
TrkSurfaces/Surface.h
"
20
#include <ostream>
21
#include <new>
22
23
namespace
Trk
24
{
25
26
27
// ------------------------------------------------------------------
28
29
// Default constructor
30
SpacePoint::SpacePoint
()
31
:
32
m_clusList
(nullptr, nullptr),
33
m_elemIdList
(0,0),
34
m_position
(),
35
m_globalCovariance()
36
{
37
}
38
39
// ------------------------------------------------------------------
40
41
43
MsgStream&
operator <<
( MsgStream& sl,
const
Trk::SpacePoint
& spacePoint)
44
{
45
return
spacePoint.
dump
(sl);
46
}
47
48
// ------------------------------------------------------------------
49
50
std::ostream&
operator <<
( std::ostream& sl,
const
Trk::SpacePoint
& spacePoint)
51
{
52
return
spacePoint.
dump
(sl);
53
}
54
56
57
// We compile this function with optimization, even in debug builds; otherwise,
58
// the heavy use of Eigen makes it too slow. However, from here we may call
59
// to out-of-line Eigen code that is linked from other DSOs; in that case,
60
// it would not be optimized. Avoid this by forcing all Eigen code
61
// to be inlined here if possible.
62
ATH_FLATTEN
63
void
SpacePoint::setupGlobalFromLocalCovariance
() {
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
}
84
85
const
Surface
&
SpacePoint::associatedSurface
()
const
{
86
assert(
m_clusList
.first->detectorElement());
87
return
m_clusList
.first->detectorElement()->surface();
88
}
89
90
}
// namespace Trk
91
LocalParameters.h
PrepRawData.h
Surface.h
SpacePoint.h
TrkDetElementBase.h
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition
MeasurementBase.h:138
Trk::SpacePoint
Definition
Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:35
Trk::SpacePoint::m_position
Amg::Vector3D m_position
Definition
Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:99
Trk::SpacePoint::dump
virtual MsgStream & dump(MsgStream &out) const override=0
Interface method for output, to be overloaded by child classes*.
Trk::SpacePoint::associatedSurface
virtual const Surface & associatedSurface() const override final
Interface method to get the associated Surface.
Definition
Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx:85
Trk::SpacePoint::SpacePoint
SpacePoint()
Definition
Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx:30
Trk::SpacePoint::setupGlobalFromLocalCovariance
void setupGlobalFromLocalCovariance()
set up the global covariance matrix by rotating the local one
Definition
Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx:63
Trk::SpacePoint::m_elemIdList
std::pair< IdentifierHash, IdentifierHash > m_elemIdList
Definition
Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:98
Trk::SpacePoint::m_clusList
std::pair< const PrepRawData *, const PrepRawData * > m_clusList
Definition
Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:97
Trk::Surface
Abstract Base Class for tracking surfaces.
Definition
Surface.h:79
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
ATH_FLATTEN
#define ATH_FLATTEN
Definition
inline_hints.h:52
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition
GeoPrimitives.h:49
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition
EventPrimitives.h:27
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition
AlignModule.cxx:204
Generated on
for ATLAS Offline Software by
1.17.0