ATLAS Offline Software
Loading...
Searching...
No Matches
RPCCandData.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
5
6namespace L0Muon
7{
8
11
12 {
13 // Initialize the z positions and coincidence type
14 for (int i = 0; i < 4; ++i)
15 {
16 m_zPos[i] = 0xffff;
17 }
18 m_coinType = 0;
19 }
20
22 {
23 if (index < 0 || index > 3)
24 {
25 return;
26 }
28 m_zPos[index] = (uint16_t)(zPos / s_zPosRange * (float)s_zPosBitRange);
29 }
31 {
34 }
35
36 float RPCCandData::zPos(int index) const
37 {
38 if (index < 0 || index > 3)
39 {
40 return 0.0;
41 }
42 return (float)m_zPos[index] / (float)s_zPosBitRange * s_zPosRange;
43 }
44 uint8_t RPCCandData::coinType() const
45 {
46 return (uint8_t)(m_coinType / s_coinTypeRange * (float)s_coinTypeBitRange);
47 }
48
49}
uint16_t bcTag() const
Definition ICandData.h:25
uint16_t subdetectorId() const
Definition ICandData.h:23
ICandData(uint16_t subdetectorId, uint16_t sectorId, uint16_t bcTag)
Definition ICandData.h:17
uint16_t sectorId() const
Definition ICandData.h:24
uint8_t coinType() const
static constexpr uint8_t s_coinTypeRange
range of the coincidence type value
Definition RPCCandData.h:39
static constexpr uint8_t s_coinTypeBitRange
3 bits for the coincidence type
Definition RPCCandData.h:43
uint16_t m_zPos[4]
Z positions of the RPC hits.
Definition RPCCandData.h:50
uint8_t m_coinType
coincidence type
Definition RPCCandData.h:52
void setZPos(float zPos, int index)
static constexpr float s_zPosRange
range of the RPC hits z positions
Definition RPCCandData.h:37
static constexpr uint16_t s_zPosBitRange
12 bits for z position
Definition RPCCandData.h:41
float zPos(int index) const
void setCoinType(uint8_t coinType)
Definition index.py:1