ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Muon
L1MuonEndcap
src
SectorLogicWordEncoder.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
SectorLogicWordEncoder.h
"
6
7
#include "
TrigT1MuctpiBits/MuCTPI_Bits.h
"
8
9
namespace
{
10
11
namespace
bits =
L1Muon::MuCTPIBits
;
12
13
constexpr
std::uint32_t encodeField(
const
std::uint32_t value,
14
const
std::uint32_t shift,
15
const
std::uint32_t mask) {
16
return
(value & mask) <<
shift
;
17
}
18
19
}
// namespace
20
21
namespace
L1Muon::L1TGC
{
22
23
SectorLogicWords
SectorLogicWordEncoder::encode
(
24
const
xAOD::L1TGCCandData
& candidate) {
25
SectorLogicWords
words;
26
words.candWord =
27
encodeField(candidate.
l1Pt
(), bits::RUN4_SL2MUCTPI_PT_VAL_SHIFT,
28
bits::RUN4_SL2MUCTPI_PT_VAL_MASK) |
29
encodeField(candidate.
l1CandCharge
(), bits::RUN4_SL2MUCTPI_CHARGE_SHIFT,
30
bits::RUN4_SL2MUCTPI_CHARGE_MASK) |
31
encodeField(candidate.
l1Phi
(), bits::RUN4_SL2MUCTPI_PHI_SHIFT,
32
bits::RUN4_SL2MUCTPI_PHI_MASK) |
33
encodeField(candidate.
l1Eta
(), bits::RUN4_SL2MUCTPI_ETA_SHIFT,
34
bits::RUN4_SL2MUCTPI_ETA_MASK);
35
36
words.candExtraWord =
37
encodeField(candidate.
l1Threshold
(),
38
bits::RUN4_SL2MUCTPI_PTTHRESHOLD_SHIFT,
39
bits::RUN4_SL2MUCTPI_PTTHRESHOLD_MASK) |
40
encodeField(candidate.
tcId
(), bits::RUN4_SL2MUCTPI_TCID_SHIFT,
41
bits::RUN4_SL2MUCTPI_TCID_MASK) |
42
encodeField(candidate.
coinType
(), bits::RUN4_SL2MUCTPI_COINTYPE_SHIFT,
43
bits::RUN4_SL2MUCTPI_COINTYPE_MASK);
44
return
words;
45
}
46
47
}
// namespace L1Muon::L1TGC
MuCTPI_Bits.h
SectorLogicWordEncoder.h
L1Muon::L1TGC::SectorLogicWordEncoder::encode
static SectorLogicWords encode(const xAOD::L1TGCCandData &candidate)
Encode one TGC candidate without MDT or overlap information.
Definition
SectorLogicWordEncoder.cxx:23
xAOD::IL1CandData_v1::coinType
uint8_t coinType() const
Retrieve the coincidence type.
Definition
IL1CandData_v1.cxx:60
xAOD::IL1CandData_v1::l1Threshold
uint8_t l1Threshold() const
Retrieve the threshold.
xAOD::IL1CandData_v1::l1CandCharge
uint8_t l1CandCharge() const
Retrieve the candidate charge.
xAOD::IL1CandData_v1::l1Pt
uint8_t l1Pt() const
Retrieve the encoded candidate pT.
Definition
IL1CandData_v1.cxx:49
xAOD::IL1CandData_v1::l1Eta
uint16_t l1Eta() const
Retrieve the eta.
Definition
IL1CandData_v1.cxx:24
xAOD::IL1CandData_v1::tcId
uint8_t tcId() const
Retrieve the trigger-candidate identifier.
Definition
IL1CandData_v1.cxx:70
xAOD::IL1CandData_v1::l1Phi
uint16_t l1Phi() const
Retrieve the phi.
Definition
IL1CandData_v1.cxx:35
L1Muon::L1TGC
Definition
SectorLogicWordEncoder.cxx:21
L1Muon::MuCTPIBits
Definition
MuCTPI_Bits.h:254
SG::shift
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the container.
xAOD::L1TGCCandData
L1TGCCandData_v1 L1TGCCandData
Definition
L1TGCCandData.h:11
L1Muon::L1TGC::SectorLogicWords
MuCTPI candidate words produced from one TGC candidate.
Definition
SectorLogicWordEncoder.h:15
Generated on
for ATLAS Offline Software by
1.17.0