ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Muon
L0MuonInterface
src
RPCCandData.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
L0MuonInterface/RPCCandData.h
"
5
#include <algorithm>
6
#include <stdexcept>
7
8
namespace
L0Muon
9
{
10
11
RPCCandData::RPCCandData
(uint16_t
subdetectorId
, uint16_t
sectorId
, uint16_t
bcTag
)
12
:
ICandData
(
subdetectorId
,
sectorId
,
bcTag
)
13
14
{
15
// Initialize the z positions and coincidence type
16
for
(
int
i = 0; i < 4; ++i)
17
{
18
m_zPos
[i] = 0xffff;
19
}
20
m_coinType
= 0;
21
}
22
23
void
RPCCandData::setZPos
(
float
zPos
,
int
index
)
24
{
25
if
(index < 0 || index > 3)
26
{
27
return
;
28
}
30
31
m_zPos
[
index
] =
static_cast<
uint16_t
>
(std::round((
zPos
+
s_zPosRange
) / (2.0f *
s_zPosRange
) *
static_cast<
float
>
(
s_zPosBitRange
)));
32
33
34
}
35
void
RPCCandData::setCoinType
(uint8_t
coinType
)
36
{
38
m_coinType
=
static_cast<
uint8_t
>
(
coinType
/
s_coinTypeRange
*
static_cast<
float
>
(
s_coinTypeBitRange
));
39
}
40
41
42
float
RPCCandData::zPos
(
int
index
)
const
43
{
44
if
(index < 0 || index > 3) {
45
return
0.0;
46
}
47
48
if
(
m_zPos
[
index
] == 0xffff) {
49
return
-999.f;
50
}
51
return
static_cast<
float
>
(
m_zPos
[
index
]) /
static_cast<
float
>
(
s_zPosBitRange
) * 2.0f *
s_zPosRange
-
s_zPosRange
;
52
}
53
54
uint8_t
RPCCandData::coinType
()
const
55
{
56
return
static_cast<
uint8_t
>
(
m_coinType
/
s_coinTypeRange
*
static_cast<
float
>
(
s_coinTypeBitRange
));
57
}
58
59
}
60
RPCCandData.h
L0Muon::ICandData::bcTag
uint16_t bcTag() const
Definition
Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h:25
L0Muon::ICandData::subdetectorId
uint16_t subdetectorId() const
Definition
Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h:23
L0Muon::ICandData::ICandData
ICandData(uint16_t subdetectorId, uint16_t sectorId, uint16_t bcTag)
Definition
Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h:17
L0Muon::ICandData::sectorId
uint16_t sectorId() const
Definition
Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/ICandData.h:24
L0Muon::RPCCandData::coinType
uint8_t coinType() const
Definition
RPCCandData.cxx:54
L0Muon::RPCCandData::m_zPos
std::array< uint16_t, 4 > m_zPos
Z positions of the RPC hits.
Definition
Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/RPCCandData.h:50
L0Muon::RPCCandData::s_coinTypeRange
static constexpr uint8_t s_coinTypeRange
range of the coincidence type value
Definition
Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/RPCCandData.h:39
L0Muon::RPCCandData::RPCCandData
RPCCandData()=default
L0Muon::RPCCandData::s_coinTypeBitRange
static constexpr uint8_t s_coinTypeBitRange
3 bits for the coincidence type
Definition
Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/RPCCandData.h:43
L0Muon::RPCCandData::m_coinType
uint8_t m_coinType
coincidence type
Definition
Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/RPCCandData.h:53
L0Muon::RPCCandData::setZPos
void setZPos(float zPos, int index)
Definition
RPCCandData.cxx:23
L0Muon::RPCCandData::s_zPosRange
static constexpr float s_zPosRange
range of the RPC hits z positions
Definition
Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/RPCCandData.h:37
L0Muon::RPCCandData::s_zPosBitRange
static constexpr uint16_t s_zPosBitRange
12 bits for z position
Definition
Trigger/TrigT1/Muon/L0MuonInterface/L0MuonInterface/RPCCandData.h:41
L0Muon::RPCCandData::zPos
float zPos(int index) const
Definition
RPCCandData.cxx:42
L0Muon::RPCCandData::setCoinType
void setCoinType(uint8_t coinType)
Definition
RPCCandData.cxx:35
L0Muon
Definition
NSWTPBits.h:7
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0