ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODTrigL1Muon
Root
L1RPCCandData_v1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
xAODTrigL1Muon/L1RPCCandData.h
"
5
6
#include "
CxxUtils/trapping_fp.h
"
7
#include <cmath>
8
#include <algorithm>
9
10
namespace
xAOD
{
11
12
void
L1RPCCandData_v1::setL1ZPos
(std::array<float, 4>& zPos) {
13
std::array<uint16_t, 4> zPosBins;
14
for
(
size_t
i = 0; i < zPos.size(); ++i) {
15
// Avoid FPE with clang.
16
CXXUTILS_TRAPPING_FP
;
17
uint16_t
zPosBin =
static_cast<
uint16_t
>
(std::round((zPos[i] +
s_zPosRange
) / (2.0f *
s_zPosRange
) *
static_cast<
float
>
(
s_zPosBitRange
)));
18
zPosBins[i] = zPosBin;
19
}
20
static
const
SG::Accessor<std::array<uint16_t, 4>
>
acc
(
"l1ZPos"
);
21
acc
(*
this
) = zPosBins;
22
}
23
24
std::array<uint16_t, 4>
L1RPCCandData_v1::l1ZPos
()
const
{
25
static
const
SG::ConstAccessor<std::array<uint16_t, 4>
>
acc
(
"l1ZPos"
);
26
return
acc
(*
this
);
27
}
28
29
}
// namespace xAOD
L1RPCCandData.h
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition
Control/AthContainers/AthContainers/Accessor.h:68
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition
ConstAccessor.h:55
xAOD::L1RPCCandData_v1::l1ZPos
std::array< uint16_t, 4 > l1ZPos() const
Retrieve the global z positions of the RPC sector logic.
Definition
L1RPCCandData_v1.cxx:24
xAOD::L1RPCCandData_v1::s_zPosBitRange
static constexpr uint16_t s_zPosBitRange
12 bits for z position
Definition
L1RPCCandData_v1.h:42
xAOD::L1RPCCandData_v1::s_zPosRange
static constexpr float s_zPosRange
range of the RPC hits z positions
Definition
L1RPCCandData_v1.h:40
xAOD::L1RPCCandData_v1::setL1ZPos
void setL1ZPos(std::array< float, 4 > &zPos)
Set the z positions of the RPC sector logic.
Definition
L1RPCCandData_v1.cxx:12
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::uint16_t
setWord1 uint16_t
Definition
eFexEMRoI_v1.cxx:93
xAOD::acc
static const SG::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.
trapping_fp.h
Tell the compiler to optimize assuming that FP may trap.
CXXUTILS_TRAPPING_FP
#define CXXUTILS_TRAPPING_FP
Definition
trapping_fp.h:24
Generated on
for ATLAS Offline Software by
1.17.0