ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODMeasurementBase
xAODMeasurementBase
MeasurementDefs.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef XAODMEASUREMENTBASE_MEASUREMENTDEFS_H
5
#define XAODMEASUREMENTBASE_MEASUREMENTDEFS_H
6
// EDM include(s):
7
#include <array>
8
9
#include "
xAODMeasurementBase/EigenZeroDefs.h
"
10
#include "
AthContainers/AuxElement.h
"
11
#include "
EventPrimitives/EventPrimitives.h
"
12
13
#define AUX_MEASUREMENTVAR(VAR, DIM) \
14
do { \
15
static const std::string varName = \
16
std::string{#VAR} + "Dim" + std::to_string(DIM); \
17
static const auxid_t auxId = getAuxID(varName, VAR); \
18
regAuxVar(auxId, varName, VAR); \
19
} while (false);
20
21
namespace
xAOD
{
22
24
enum class
UncalibMeasType
{
25
Other
= 0,
26
// InDet
27
PixelClusterType
= 1,
28
StripClusterType
= 2,
29
// Muon
30
MdtDriftCircleType
= 3,
31
RpcStripType
= 4,
32
TgcStripType
= 5,
33
MMClusterType
= 6,
34
sTgcStripType
= 7,
35
// HGTD
36
HGTDClusterType
= 8,
37
// Do not add anything after nTypes
38
nTypes
39
};
40
42
std::string
toString
(
const
UncalibMeasType
type
);
43
44
inline
std::ostream&
operator<<
(std::ostream&ostr,
const
UncalibMeasType
type
) {
45
return
(ostr<<
toString
(
type
));
46
}
47
48
using
DetectorIDHashType
=
unsigned
int
;
49
using
DetectorIdentType
=
long
unsigned
int
;
51
template
<
size_t
N>
52
using
PosAccessor
=
SG::Accessor<std::array<float, N>
>;
54
template
<
size_t
N>
55
using
CovAccessor
=
SG::Accessor<std::array<float, N * N>
>;
57
template
<
size_t
N>
58
using
MeasVector
= Eigen::Matrix<float, N, 1>;
59
template
<
size_t
N>
60
using
MeasMatrix
= Eigen::Matrix<float, N, N>;
61
62
template
<
size_t
N>
63
using
VectorMap
= Eigen::Map<MeasVector<N>>;
64
template
<
size_t
N>
65
using
ConstVectorMap
= Eigen::Map<const MeasVector<N>>;
66
67
template
<
size_t
N>
68
using
MatrixMap
= Eigen::Map<MeasMatrix<N>>;
69
template
<
size_t
N>
70
using
ConstMatrixMap
= Eigen::Map<const MeasMatrix<N>>;
71
74
template
<
int
N>
MeasVector<N>
toStorage
(
const
AmgVector
(N)& amgVec){
75
MeasVector<N>
vec
{
MeasVector<N>::Zero
()};
76
for
(
int
i =0 ; i < N ; ++i)
vec
[i] = amgVec[i];
77
return
vec
;
78
}
79
82
template
<
int
N>
MeasMatrix<N>
toStorage
(
const
AmgSymMatrix
(N)& amgMat)
83
requires
(N > 1) {
84
MeasMatrix<N>
mat{
MeasMatrix<N>::Zero
()};
85
for
(
int
i =0 ; i < N; ++i){
86
for
(
int
j =0 ; j < N; ++j) {
87
mat(i,j) = amgMat(i, j);
88
}
89
}
90
return
mat;
91
}
92
95
template
<
int
N>
AmgSymMatrix
(N) toEigen(
const
ConstMatrixMap<N>
& xAODmat)
96
requires
(N > 1) {
97
AmgSymMatrix
(N) mat{
AmgSymMatrix
(N)::Zero()};
98
for
(
int
i=0; i < N; ++i){
99
for
(
int
j =0; j < N; ++j){
100
mat(i, j) = xAODmat(i, j);
101
}
102
}
103
return
mat;
104
}
105
108
template
<
int
N>
AmgVector
(N) toEigen(
const
ConstVectorMap<N>
& xAODvec) {
109
AmgVector
(N) v{
AmgVector
(N)::Zero()};
110
for
(
int
i = 0 ; i < N; ++i) {
111
v[i] = xAODvec[i];
112
}
113
return
v;
114
}
115
116
117
}
// namespace xAOD
118
#endif
AuxElement.h
Base class for elements of a container that can have aux data.
vec
std::vector< size_t > vec
Definition
CombinationsGeneratorTest.cxx:9
EigenZeroDefs.h
Ensure that eigen aux variables get properly zeroed.
EventPrimitives.h
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition
EventPrimitives.h:50
AmgVector
#define AmgVector(rows)
Definition
EventPrimitives.h:55
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition
Control/AthContainers/AthContainers/Accessor.h:68
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::Other
@ Other
Definition
TrackingPrimitives.h:573
xAOD::MeasMatrix
Eigen::Matrix< float, N, N > MeasMatrix
Definition
MeasurementDefs.h:60
xAOD::ConstMatrixMap
Eigen::Map< const MeasMatrix< N > > ConstMatrixMap
Definition
MeasurementDefs.h:70
xAOD::MeasVector
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
Definition
MeasurementDefs.h:58
xAOD::VectorMap
Eigen::Map< MeasVector< N > > VectorMap
Definition
MeasurementDefs.h:63
xAOD::int
setRawEt setRawPhi int
Definition
TrigCaloCluster_v1.cxx:33
xAOD::DetectorIdentType
long unsigned int DetectorIdentType
Definition
MeasurementDefs.h:49
xAOD::PosAccessor
SG::Accessor< std::array< float, N > > PosAccessor
xAOD Accessor to the position
Definition
MeasurementDefs.h:52
xAOD::toStorage
MeasVector< N > toStorage(const AmgVector(N)&amgVec)
Converts the double precision of the AmgVector into the floating point storage precision of the MeasV...
Definition
MeasurementDefs.h:74
xAOD::UncalibMeasType
UncalibMeasType
Define the type of the uncalibrated measurement.
Definition
MeasurementDefs.h:24
xAOD::UncalibMeasType::TgcStripType
@ TgcStripType
Definition
MeasurementDefs.h:32
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
Definition
MeasurementDefs.h:30
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
Definition
MeasurementDefs.h:33
xAOD::UncalibMeasType::RpcStripType
@ RpcStripType
Definition
MeasurementDefs.h:31
xAOD::UncalibMeasType::StripClusterType
@ StripClusterType
Definition
MeasurementDefs.h:28
xAOD::UncalibMeasType::nTypes
@ nTypes
Definition
MeasurementDefs.h:38
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
Definition
MeasurementDefs.h:34
xAOD::UncalibMeasType::PixelClusterType
@ PixelClusterType
Definition
MeasurementDefs.h:27
xAOD::UncalibMeasType::HGTDClusterType
@ HGTDClusterType
Definition
MeasurementDefs.h:36
xAOD::CovAccessor
SG::Accessor< std::array< float, N *N > > CovAccessor
xAOD Accessor to the covariance
Definition
MeasurementDefs.h:55
xAOD::MatrixMap
Eigen::Map< MeasMatrix< N > > MatrixMap
Definition
MeasurementDefs.h:68
xAOD::operator<<
std::ostream & operator<<(std::ostream &out, const std::pair< FIRST, SECOND > &pair)
Helper print operator.
Definition
RDataSource.cxx:53
xAOD::toString
std::string toString(const SG::AuxElement &obj)
Definition
PrintHelpers.cxx:45
xAOD::DetectorIDHashType
unsigned int DetectorIDHashType
@ detector ID element hash
Definition
MeasurementDefs.h:48
xAOD::ConstVectorMap
Eigen::Map< const MeasVector< N > > ConstVectorMap
Definition
MeasurementDefs.h:65
type
Generated on
for ATLAS Offline Software by
1.17.0