ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetEventCnv
InDetEventTPCnv
src
InDetPrepRawData
PixelClusterCnv_p2.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//-----------------------------------------------------------------------------
6
//
7
// file: PixelClusterCnv_p2.cxx
8
//
9
//-----------------------------------------------------------------------------
10
11
#include "
InDetPrepRawData/PixelCluster.h
"
12
#include "
EventPrimitives/EventPrimitives.h
"
13
#include "
InDetEventTPCnv/InDetPrepRawData/PixelClusterCnv_p2.h
"
14
15
#include <memory>
16
17
InDet::PixelCluster
18
PixelClusterCnv_p2::createPixelCluster
(
const
InDet::PixelCluster_p2
* persObj,
19
const
InDetDD::SiDetectorElement
* detEl,
20
MsgStream &log)
21
{
22
// Local Position
23
Amg::Vector2D
localPos;
24
localPos[
Trk::locX
] = persObj->
m_localPosX
;
25
localPos[
Trk::locY
] = persObj->
m_localPosY
;
26
27
std::vector<Identifier> rdoList;
28
rdoList.resize( persObj->
m_rdoList
.size() );
29
Identifier
id (persObj->
m_clusId
);
30
Identifier::value_type id32 =
id
.get_compact();
31
std::vector<Identifier>::iterator tit = rdoList.begin();
32
for
(
const
InDet::PixelCluster_p2::rdo_diff_type
& rdo : persObj->
m_rdoList
)
33
{
34
*tit =
Identifier
((Identifier::value_type) rdo + id32);
35
++tit;
36
}
37
38
InDet::SiWidth
width
;
39
m_swCnv
.persToTrans(&persObj->
m_width
, &
width
, log);
40
41
// Error matrix
42
auto
cmat =
Amg::MatrixX
(2,2);
43
(cmat)(0,0) =
static_cast<
double
>
(persObj->
m_mat00
);
44
(cmat)(1,0) =
static_cast<
double
>
(persObj->
m_mat01
);
45
(cmat)(0,1) =
static_cast<
double
>
(persObj->
m_mat01
);
46
(cmat)(1,1) =
static_cast<
double
>
(persObj->
m_mat11
);
47
48
InDet::PixelCluster
clus (
id
,
49
localPos,
50
std::move(rdoList),
51
0,
// lvl1a
52
0,
// totalToT
53
std::vector<float>(),
// chargeList
54
0,
// totalCharge
55
width
,
56
detEl,
57
std::move(cmat),
58
persObj->
m_omX
,
59
persObj->
m_omY
,
60
0
//splitInfo
61
);
62
return
clus;
63
}
64
65
66
void
PixelClusterCnv_p2::
67
persToTrans
(
const
InDet::PixelCluster_p2
*persObj,
InDet::PixelCluster
*transObj, MsgStream &log)
68
{
69
*transObj =
createPixelCluster
(persObj,
nullptr
, log);
70
}
71
72
73
void
PixelClusterCnv_p2::transToPers
(
const
InDet::PixelCluster
*transObj,
InDet::PixelCluster_p2
*persObj, MsgStream &log )
74
{
75
// log << MSG::VERBOSE << "In PixelCluster::transToPers" << endmsg;
76
m_swCnv
.transToPers(&transObj->
width
(), &persObj->
m_width
, log);
77
78
persObj->
m_omX
= transObj->
omegax
();
79
persObj->
m_omY
= transObj->
omegay
();
80
81
// base class:
82
//
83
84
// Local Position
85
persObj->
m_localPosX
= transObj->
localPosition
()[
Trk::locX
];
86
persObj->
m_localPosY
= transObj->
localPosition
()[
Trk::locY
];
87
88
// Error Matrix
89
persObj->
m_mat00
= (transObj->
localCovariance
())(0,0);
90
persObj->
m_mat01
= (transObj->
localCovariance
())(0,1);
91
persObj->
m_mat11
= (transObj->
localCovariance
())(1,1);
92
93
// List of Id of the cluster
94
persObj->
m_clusId
= transObj->
identify
().
get_compact
();
95
persObj->
m_rdoList
.resize( transObj->
rdoList
().size() );
96
// convert the list of ID saved for the cluster
97
persObj->
m_rdoList
.resize(transObj->
rdoList
().size() );
98
99
100
std::vector<InDet::PixelCluster_p2::rdo_diff_type>::iterator pit = persObj->
m_rdoList
.begin();
101
for
(
const
Identifier
&
id
: transObj->
rdoList
()) {
102
*pit = (
InDet::PixelCluster_p2::rdo_diff_type
) (
id
.get_compact()) - persObj->
m_clusId
;
103
++pit;
104
}
105
106
}
107
108
EventPrimitives.h
PixelCluster.h
PixelClusterCnv_p2.h
width
const double width
Definition
TTileTripReader.cxx:24
Identifier::get_compact
value_type get_compact() const
Get the compact id.
InDetDD::SiDetectorElement
Class to hold geometrical description of a silicon detector element.
Definition
SiDetectorElement.h:109
InDet::PixelCluster_p2
Definition
PixelCluster_p2.h:17
InDet::PixelCluster_p2::m_width
InDet::SiWidth_p2 m_width
Definition
PixelCluster_p2.h:36
InDet::PixelCluster_p2::m_localPosX
float m_localPosX
Definition
PixelCluster_p2.h:27
InDet::PixelCluster_p2::m_mat11
float m_mat11
Definition
PixelCluster_p2.h:31
InDet::PixelCluster_p2::m_omX
float m_omX
Definition
PixelCluster_p2.h:32
InDet::PixelCluster_p2::m_omY
float m_omY
Definition
PixelCluster_p2.h:33
InDet::PixelCluster_p2::m_mat00
float m_mat00
Definition
PixelCluster_p2.h:29
InDet::PixelCluster_p2::rdo_diff_type
Identifier::diff_type rdo_diff_type
Definition
PixelCluster_p2.h:20
InDet::PixelCluster_p2::m_mat01
float m_mat01
Definition
PixelCluster_p2.h:30
InDet::PixelCluster_p2::m_clusId
Identifier::value_type m_clusId
Definition
PixelCluster_p2.h:25
InDet::PixelCluster_p2::m_localPosY
float m_localPosY
Definition
PixelCluster_p2.h:28
InDet::PixelCluster_p2::m_rdoList
std::vector< rdo_diff_type > m_rdoList
Definition
PixelCluster_p2.h:26
InDet::PixelCluster
Definition
InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:49
InDet::PixelCluster::omegax
float omegax() const
Definition
InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:194
InDet::PixelCluster::omegay
float omegay() const
Definition
InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:198
InDet::SiCluster::width
const InDet::SiWidth & width() const
return width class reference
InDet::SiWidth
Definition
SiWidth.h:25
PixelClusterCnv_p2::createPixelCluster
InDet::PixelCluster createPixelCluster(const InDet::PixelCluster_p2 *persObj, const InDetDD::SiDetectorElement *delEl, MsgStream &log)
Definition
PixelClusterCnv_p2.cxx:18
PixelClusterCnv_p2::transToPers
void transToPers(const InDet::PixelCluster *, InDet::PixelCluster_p2 *, MsgStream &)
Definition
PixelClusterCnv_p2.cxx:73
PixelClusterCnv_p2::persToTrans
void persToTrans(const InDet::PixelCluster_p2 *, InDet::PixelCluster *, MsgStream &)
Definition
PixelClusterCnv_p2.cxx:67
PixelClusterCnv_p2::m_swCnv
InDet::SiWidthCnv_p2 m_swCnv
Definition
PixelClusterCnv_p2.h:40
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)
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::locY
@ locY
local cartesian
Definition
ParamDefs.h:38
Trk::locX
@ locX
Definition
ParamDefs.h:37
Generated on
for ATLAS Offline Software by
1.17.0