ATLAS Offline Software
Loading...
Searching...
No Matches
NSWCandData_v1.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef XAODL0MUONCAND_VERSION_NSWCANDDATA_V1_H
5#define XAODL0MUONCAND_VERSION_NSWCANDDATA_V1_H
6
7// System include(s):
8#include <cstdint>
9#include <vector>
10#include <algorithm>
11#include <iostream>
12
14
15namespace xAOD {
16
19
21
22 public:
23
24 NSWCandData_v1() = default;
25 ~NSWCandData_v1() = default;
26
28
33 uint16_t bcid() const; // 12 bits, bit order [11:0]
34
39 uint8_t nSegments() const; // 3 bits, bit order [14:12], range [0:4]
40
45 bool overflow() const; // 1 bit, bit order [15]
46
51 uint8_t fiberId() const; // 4 bits, bit order [19:16]
52
57 uint8_t boardId() const; // 7 bits, bit order [26:20]
58
60
64 const std::vector<uint32_t>& segmentWords() const;
65
67
71 uint16_t segEtaIndex(size_t i) const;
72
77 uint16_t segPhiIndex(size_t i) const;
78
83 uint8_t segDeltaThetaIndex(size_t i) const;
84
89 uint8_t segQuality(size_t i) const;
90
96 float segEta(size_t i) const;
97
103 float segPhi(size_t i) const;
104
106
112
118
123 void setOverflow(bool ovf);
124
129 void setFiberId(uint8_t fiber);
130
135 void setBoardId(uint8_t board);
136
145 void addSegment(uint16_t etaIndex, uint16_t phiIndex, uint8_t deltaThetaIndex, uint8_t quality);
146
150 void clearSegments();
151
156 friend std::ostream& operator<<(std::ostream& os, const NSWCandData_v1& obj);
157
158 };
159
160} // namespace xAOD
161
162#include "xAODCore/BaseInfo.h"
164
165#endif // XAODL0MUONCAND_VERSION_NSWCANDDATA_V1_H
Base class for elements of a container that can have aux data.
#define SG_BASE(D, B)
Declare that class D derives from class B.
Data class describing the L0 muon candidates from NSW-TP to TGC SL.
void setBCID(uint16_t bcid)
Setters.
bool overflow() const
Check if the segment candidate limit has been exceeded.
float segEta(size_t i) const
Retrieve the decoded physical eta coordinate for a specific segment.
friend std::ostream & operator<<(std::ostream &os, const NSWCandData_v1 &obj)
Produce a formatted string representation of the candidates.
void setFiberId(uint8_t fiber)
Set the fiber id.
uint16_t bcid() const
Getters.
uint16_t segEtaIndex(size_t i) const
Element-by-Element Index.
void setNSegments(uint8_t nseg)
Set the total number of segments sent from NSW-TP to Sector Logic.
void clearSegments()
Clear all recorded segment vectors.
NSWCandData_v1()=default
uint8_t fiberId() const
Retrieve the fiber id.
void addSegment(uint16_t etaIndex, uint16_t phiIndex, uint8_t deltaThetaIndex, uint8_t quality)
Pack and append a single segment.
uint8_t nSegments() const
Retrieve the number of segments sent from NSW-TP to Sector Logic.
~NSWCandData_v1()=default
uint16_t segPhiIndex(size_t i) const
Retrieve the phi index for a specific segment.
const std::vector< uint32_t > & segmentWords() const
Segments.
float segPhi(size_t i) const
Retrieve the decoded physical phi coordinate for a specific segment.
uint8_t boardId() const
Retrieve the board id.
uint8_t segDeltaThetaIndex(size_t i) const
Retrieve the delta theta index for a specific segment.
void setBoardId(uint8_t board)
Set the board id.
void setOverflow(bool ovf)
Set the segment total capacity overflow state flag.
uint8_t segQuality(size_t i) const
Retrieve the quality flag for a specific segment.
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setWord1 uint16_t