ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkEvent
TrkPrepRawData
src
PrepRawData.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
// PrepRawData.cxx, (c) ATLAS Detector software
8
9
#include "
TrkPrepRawData/PrepRawData.h
"
10
#include "GaudiKernel/MsgStream.h"
11
#include "
GeoPrimitives/GeoPrimitivesToStringConverter.h
"
12
#include <new>
13
14
namespace
Trk
{
15
16
PrepRawData::PrepRawData
(
const
Identifier
& clusId,
17
const
Amg::Vector2D
& locpos,
18
const
std::vector<Identifier>&
rdoList
,
19
const
Amg::MatrixX
& locerr)
20
:
Trk
::
ObjectCounter
<
Trk
::
PrepRawData
>()
21
,
m_clusId
(clusId)
22
,
m_localPos
(locpos)
23
,
m_rdoList
(
rdoList
)
24
,
m_localCovariance
(locerr)
25
,
m_indexAndHash
()
26
{
27
}
28
29
PrepRawData::PrepRawData
(
const
Identifier
& clusId,
30
const
Amg::Vector2D
& locpos,
31
std::vector<Identifier>&&
rdoList
,
32
Amg::MatrixX
&& locerr)
33
:
Trk
::
ObjectCounter
<
Trk
::
PrepRawData
>()
34
,
m_clusId
(clusId)
35
,
m_localPos
(locpos)
36
,
m_rdoList
(
std
::move(
rdoList
))
37
,
m_localCovariance
(
std
::move(locerr))
38
,
m_indexAndHash
()
39
{
40
}
41
42
// Constructor with parameters:
43
PrepRawData::PrepRawData
(
const
Identifier
& clusId,
44
const
Amg::Vector2D
& locpos,
45
const
Amg::MatrixX
& locerr)
46
:
Trk
::
ObjectCounter
<
Trk
::
PrepRawData
>()
47
,
m_clusId
(clusId)
48
,
m_localPos
(locpos)
49
,
m_localCovariance
(locerr)
50
,
m_indexAndHash
()
51
{
52
m_rdoList
.push_back(clusId);
53
}
54
55
PrepRawData::PrepRawData
(
const
Identifier
& clusId,
56
const
Amg::Vector2D
& locpos,
57
Amg::MatrixX
&& locerr)
58
:
Trk
::
ObjectCounter
<
Trk
::
PrepRawData
>()
59
,
m_clusId
(clusId)
60
,
m_localPos
(locpos)
61
,
m_localCovariance
(
std
::move(locerr))
62
,
m_indexAndHash
()
63
{
64
m_rdoList
.push_back(clusId);
65
}
66
67
// Default constructor:
68
PrepRawData::PrepRawData
()
69
:
Trk
::
ObjectCounter
<
Trk
::
PrepRawData
>()
70
,
m_clusId
(0)
71
,
m_localPos
()
72
,
m_rdoList
()
73
,
m_localCovariance
{}
74
,
m_indexAndHash
()
75
{
76
}
77
78
MsgStream&
79
PrepRawData::dump
(MsgStream& stream)
const
80
{
81
stream <<
"PrepRawData object"
<<
endmsg
;
82
stream <<
"Identifier = ("
<< this->
identify
().
getString
() <<
"), "
;
83
84
stream <<
"Local Position = ("
;
85
stream <<
Amg::toString
(this->
localPosition
()) <<
"), "
;
86
87
stream <<
"Local Covariance = ("
;
88
if
(this->
m_localCovariance
.size() != 0) {
89
stream <<
Amg::toString
(this->
localCovariance
()) <<
"), "
;
90
}
else
{
91
stream <<
"NULL!), "
;
92
}
93
94
stream <<
"RDO List = ["
;
95
std::vector<Identifier>::const_iterator rdoIt = this->
rdoList
().begin();
96
std::vector<Identifier>::const_iterator rdoItEnd = this->
rdoList
().end();
97
for
(; rdoIt != rdoItEnd; ++rdoIt) {
98
stream << rdoIt->getString() <<
", "
;
99
}
100
stream <<
"], "
;
101
102
stream <<
"}"
<<
endmsg
;
103
return
stream;
104
}
105
106
std::ostream&
107
PrepRawData::dump
(std::ostream& stream)
const
108
{
109
stream <<
"PrepRawData object"
<< std::endl;
110
stream <<
"Identifier "
<<
m_clusId
<< std::endl;
111
stream <<
"Local Position = ("
;
112
113
stream <<
Amg::toString
(this->
localPosition
()) <<
"), "
;
114
stream <<
"Local Covariance = ("
;
115
if
(this->
m_localCovariance
.size() != 0) {
116
stream <<
Amg::toString
(this->
localCovariance
()) <<
"), "
;
117
}
else
{
118
stream <<
"NULL!), "
;
119
}
120
stream <<
"Collection Hash: "
<<
m_indexAndHash
.collHash()
121
<<
"\tIndex in collection: "
<<
m_indexAndHash
.objIndex() << std::endl;
122
stream <<
"RDO List = ["
;
123
for
(
auto
it :
m_rdoList
) {
124
stream << it << std::endl;
125
}
126
stream <<
"], "
;
127
return
stream;
128
}
129
130
MsgStream&
131
operator<<
(MsgStream& stream,
const
PrepRawData
& prd)
132
{
133
return
prd.
dump
(stream);
134
}
135
136
std::ostream&
137
operator<<
(std::ostream& stream,
const
PrepRawData
& prd)
138
{
139
return
prd.
dump
(stream);
140
}
141
142
}
// end of ns
143
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:61
GeoPrimitivesToStringConverter.h
PrepRawData.h
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition
Identifier.cxx:37
Trk::ObjectCounter< Trk::PrepRawData >::ObjectCounter
ObjectCounter()
Definition
TrkObjectCounter.h:36
Trk::PrepRawData
Definition
PrepRawData.h:62
Trk::PrepRawData::m_rdoList
std::vector< Identifier > m_rdoList
Stores the identifiers of the RDOs.
Definition
PrepRawData.h:161
Trk::PrepRawData::m_localPos
Amg::Vector2D m_localPos
see derived classes for definition of meaning of LocalPosition
Definition
PrepRawData.h:159
Trk::PrepRawData::m_localCovariance
Amg::MatrixX m_localCovariance
See derived classes for definition of ErrorMatrix.
Definition
PrepRawData.h:163
Trk::PrepRawData::dump
virtual MsgStream & dump(MsgStream &stream) const
dump information about the PRD object.
Definition
PrepRawData.cxx:79
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
Trk::PrepRawData::rdoList
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
Trk::PrepRawData::m_indexAndHash
IdentContIndex m_indexAndHash
Stores its own position (index) in collection plus the hash id for the collection (needed for the EL ...
Definition
PrepRawData.h:167
Trk::PrepRawData::PrepRawData
PrepRawData()
public because of DataPool
Definition
PrepRawData.cxx:68
Trk::PrepRawData::m_clusId
Identifier m_clusId
PrepRawData ID, not const because of DataPool.
Definition
PrepRawData.h:156
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition
GeoPrimitivesToStringConverter.h:40
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition
EventPrimitives.h:27
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition
GeoPrimitives.h:48
Identifier
Definition
IdentifierFieldParser.cxx:14
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
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0