ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonPhaseII
Event
xAOD
xAODL0MuonCand
Root
RPCCandData_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 "
xAODL0MuonCand/RPCCandData.h
"
5
6
#include "
xAODMuonPrepData/versions/AccessorMacros.h
"
7
#include "
CxxUtils/trapping_fp.h
"
8
#include <cmath>
9
#include <algorithm>
10
#include <iostream>
11
12
namespace
{
13
static
const
std::string preFixStr{
"L0Mu_"
};
14
}
15
16
namespace
xAOD
{
17
18
void
RPCCandData_v1::setZPos
(std::array<float, 4>&
zPos
) {
19
std::array<uint16_t, 4> zPosBins;
20
for
(
size_t
i = 0; i <
zPos
.size(); ++i) {
21
// Avoid FPE with clang.
22
CXXUTILS_TRAPPING_FP
;
23
uint16_t
zPosBin =
static_cast<
uint16_t
>
(std::round((
zPos
[i] +
s_zPosRange
) / (2.0f *
s_zPosRange
) *
static_cast<
float
>
(
s_zPosBitRange
)));
24
zPosBins[i] = zPosBin;
25
}
26
static
const
SG::Accessor<std::array<uint16_t, 4>
>
acc
(preFixStr +
"zPos"
);
27
acc
(*
this
) = zPosBins;
28
}
29
30
std::array<uint16_t, 4>
RPCCandData_v1::zPos
()
const
{
31
static
const
SG::ConstAccessor<std::array<uint16_t, 4>
>
acc
(preFixStr +
"zPos"
);
32
return
acc
(*
this
);
33
}
34
35
}
// namespace xAOD
36
37
38
AccessorMacros.h
RPCCandData.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::RPCCandData_v1::setZPos
void setZPos(std::array< float, 4 > &zPos)
Set the z positions of the RPC sector logic.
Definition
RPCCandData_v1.cxx:18
xAOD::RPCCandData_v1::s_zPosRange
static constexpr float s_zPosRange
range of the RPC hits z positions
Definition
RPCCandData_v1.h:41
xAOD::RPCCandData_v1::s_zPosBitRange
static constexpr uint16_t s_zPosBitRange
12 bits for z position
Definition
RPCCandData_v1.h:43
xAOD::RPCCandData_v1::zPos
std::array< uint16_t, 4 > zPos() const
Retrieve the global z positions of the RPC sector logic.
Definition
RPCCandData_v1.cxx:30
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::AuxElement::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