ATLAS Offline Software
Loading...
Searching...
No Matches
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*/
5
7#include <cmath>
8#include <algorithm>
9#include <iostream>
10
11namespace {
12 static const std::string preFixStr{"L0Mu_"};
13}
14
15namespace xAOD {
16
17 void RPCCandData_v1::setZPos(std::array<float, 4>& zPos) {
18 std::array<uint16_t, 4> zPosBins;
19 for (size_t i = 0; i < zPos.size(); ++i) {
20 uint16_t zPosBin = static_cast<uint16_t>(std::round((zPos[i] + s_zPosRange) / (2.0f * s_zPosRange) * static_cast<float>(s_zPosBitRange)));
21 zPosBins[i] = zPosBin;
22 }
23 static const SG::Accessor<std::array<uint16_t, 4>> acc(preFixStr + "zPos");
24 acc(*this) = zPosBins;
25 }
26
27 std::array<uint16_t, 4> RPCCandData_v1::zPos() const {
28 static const SG::ConstAccessor<std::array<uint16_t, 4>> acc(preFixStr + "zPos");
29 return acc(*this);
30 }
31
32} // namespace xAOD
33
34
35
Helper class to provide type-safe access to aux data.
Helper class to provide constant type-safe access to aux data.
void setZPos(std::array< float, 4 > &zPos)
Set the z positions of the RPC sector logic.
static constexpr float s_zPosRange
range of the RPC hits z positions
static constexpr uint16_t s_zPosBitRange
12 bits for z position
std::array< uint16_t, 4 > zPos() const
Retrieve the global z positions of the RPC sector logic.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setWord1 uint16_t
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.