ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
HighGranularityTimingDetector
HGTD_EventCnv
HGTD_EventTPCnv
src
HGTD_ClusterCnv_p1.cxx
Go to the documentation of this file.
1
9
#include "
HGTD_EventTPCnv/HGTD_ClusterCnv_p1.h
"
10
11
#include "
EventPrimitives/EventPrimitives.h
"
12
#include <algorithm>
13
#include <iostream>
14
15
void
HGTD_ClusterCnv_p1::persToTrans
(
16
const
HGTD_Cluster_p1
* pers_obj,
HGTD_Cluster
* trans_obj,
17
MsgStream& log) {
18
log << MSG::VERBOSE <<
"In HGTD_ClusterCnv_p1::persToTrans"
<<
endmsg
;
19
*trans_obj =
createHGTDCluster
(pers_obj,
nullptr
, log);
20
}
21
22
HGTD_Cluster
HGTD_ClusterCnv_p1::createHGTDCluster
(
23
const
HGTD_Cluster_p1
* pers_obj,
24
const
InDetDD::SolidStateDetectorElementBase
* del_el, MsgStream& log) {
25
log << MSG::VERBOSE <<
"In HGTD_ClusterCnv_p1::createHGTDCluster"
<<
endmsg
;
26
// set the cluster identifier
27
Identifier
cluster_id(pers_obj->
m_clus_id
);
28
29
std::vector<Identifier> rdo_list;
30
size_t
rdo_list_size = pers_obj->
m_rdo_id_list
.size();
31
rdo_list.resize(rdo_list_size);
32
33
for
(
size_t
i = 0; i < rdo_list_size; i++) {
34
rdo_list.at(i) =
Identifier
(pers_obj->
m_rdo_id_list
.at(i));
35
}
36
37
// Local Position
38
Amg::Vector2D
local_pos;
39
local_pos[
Trk::locX
] = pers_obj->
m_local_pos_x
;
40
local_pos[
Trk::locY
] = pers_obj->
m_local_pos_y
;
41
42
InDet::SiWidth
width
;
43
m_si_width_cnv
.persToTrans(&pers_obj->
m_width
, &
width
, log);
44
45
// Error matrix
46
auto
cmat =
Amg::MatrixX
(2,2);
47
(cmat)(0, 0) =
static_cast<
double
>
(pers_obj->
m_mat_00
);
48
(cmat)(1, 0) =
static_cast<
double
>
(pers_obj->
m_mat_01
);
49
(cmat)(0, 1) =
static_cast<
double
>
(pers_obj->
m_mat_01
);
50
(cmat)(1, 1) =
static_cast<
double
>
(pers_obj->
m_mat_11
);
51
52
HGTD_Cluster
cluster(cluster_id, local_pos, std::move(rdo_list),
53
width
,
54
del_el,
55
std::move(cmat),
56
pers_obj->
m_time
,
57
pers_obj->
m_time_resolution
,
58
std::vector<int>(pers_obj->
m_time_over_threshold
));
59
60
return
cluster;
61
}
62
65
66
void
HGTD_ClusterCnv_p1::transToPers
(
const
HGTD_Cluster
* trans_obj,
67
HGTD_Cluster_p1
* pers_obj,
68
MsgStream& log) {
69
log << MSG::VERBOSE <<
"In HGTD_ClusterCnv_p1::transToPers"
<<
endmsg
;
70
m_si_width_cnv
.transToPers(&trans_obj->
width
(), &pers_obj->
m_width
, log);
71
72
// Local Position
73
pers_obj->
m_local_pos_x
= trans_obj->
localPosition
()[
Trk::locX
];
74
pers_obj->
m_local_pos_y
= trans_obj->
localPosition
()[
Trk::locY
];
75
76
// Error Matrix
77
pers_obj->
m_mat_00
= (trans_obj->
localCovariance
())(0, 0);
78
pers_obj->
m_mat_01
= (trans_obj->
localCovariance
())(0, 1);
79
pers_obj->
m_mat_11
= (trans_obj->
localCovariance
())(1, 1);
80
81
// Time
82
pers_obj->
m_time
= trans_obj->
time
();
83
pers_obj->
m_time_resolution
= trans_obj->
timeResolution
();
84
pers_obj->
m_time_over_threshold
= trans_obj->
totList
();
85
86
// Identifiers
87
pers_obj->
m_clus_id
= trans_obj->
identify
().
get_compact
();
88
89
size_t
rdo_size = trans_obj->
rdoList
().size();
90
pers_obj->
m_rdo_id_list
.resize(rdo_size);
91
for
(
size_t
i = 0; i < rdo_size; i++) {
92
pers_obj->
m_rdo_id_list
.at(i) = trans_obj->
rdoList
().at(i).get_compact();
93
}
94
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
EventPrimitives.h
HGTD_ClusterCnv_p1.h
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
width
const double width
Definition
TTileTripReader.cxx:24
HGTD_ClusterCnv_p1::createHGTDCluster
HGTD_Cluster createHGTDCluster(const HGTD_Cluster_p1 *pers_obj, const InDetDD::SolidStateDetectorElementBase *delEl, MsgStream &log)
Definition
HGTD_ClusterCnv_p1.cxx:22
HGTD_ClusterCnv_p1::persToTrans
void persToTrans(const HGTD_Cluster_p1 *, HGTD_Cluster *, MsgStream &)
Definition
HGTD_ClusterCnv_p1.cxx:15
HGTD_ClusterCnv_p1::transToPers
void transToPers(const HGTD_Cluster *, HGTD_Cluster_p1 *, MsgStream &)
Definition
HGTD_ClusterCnv_p1.cxx:66
HGTD_ClusterCnv_p1::m_si_width_cnv
InDet::SiWidthCnv_p2 m_si_width_cnv
Definition
HGTD_ClusterCnv_p1.h:43
HGTD_Cluster_p1
Definition
HGTD_Cluster_p1.h:17
HGTD_Cluster_p1::m_mat_00
float m_mat_00
Definition
HGTD_Cluster_p1.h:29
HGTD_Cluster_p1::m_mat_01
float m_mat_01
Definition
HGTD_Cluster_p1.h:30
HGTD_Cluster_p1::m_time_over_threshold
std::vector< int > m_time_over_threshold
Definition
HGTD_Cluster_p1.h:34
HGTD_Cluster_p1::m_local_pos_x
float m_local_pos_x
Definition
HGTD_Cluster_p1.h:27
HGTD_Cluster_p1::m_width
InDet::SiWidth_p2 m_width
Definition
HGTD_Cluster_p1.h:35
HGTD_Cluster_p1::m_rdo_id_list
std::vector< IdType_t > m_rdo_id_list
Definition
HGTD_Cluster_p1.h:26
HGTD_Cluster_p1::m_time_resolution
float m_time_resolution
Definition
HGTD_Cluster_p1.h:33
HGTD_Cluster_p1::m_local_pos_y
float m_local_pos_y
Definition
HGTD_Cluster_p1.h:28
HGTD_Cluster_p1::m_time
float m_time
Definition
HGTD_Cluster_p1.h:32
HGTD_Cluster_p1::m_mat_11
float m_mat_11
Definition
HGTD_Cluster_p1.h:31
HGTD_Cluster_p1::m_clus_id
IdType_t m_clus_id
Definition
HGTD_Cluster_p1.h:25
HGTD_Cluster
Definition
HGTD_Cluster.h:35
HGTD_Cluster::time
float time() const
Definition
HGTD_Cluster.h:114
HGTD_Cluster::totList
const std::vector< int > & totList() const
Definition
HGTD_Cluster.h:118
HGTD_Cluster::width
const InDet::SiWidth & width() const
Definition
HGTD_Cluster.h:91
HGTD_Cluster::timeResolution
float timeResolution() const
Definition
HGTD_Cluster.h:116
Identifier::get_compact
value_type get_compact() const
Get the compact id.
InDetDD::SolidStateDetectorElementBase
Class to hold geometrical description of a solid state detector element.
Definition
SolidStateDetectorElementBase.h:132
InDet::SiWidth
Definition
SiWidth.h:25
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