ATLAS Offline Software
Loading...
Searching...
No Matches
xAOD::L1NSWCandData_v1 Class Reference

Data class describing the L0 muon candidates from NSW-TP to TGC SL. More...

#include <L1NSWCandData_v1.h>

Inheritance diagram for xAOD::L1NSWCandData_v1:
Collaboration diagram for xAOD::L1NSWCandData_v1:

Public Member Functions

 L1NSWCandData_v1 ()=default
 ~L1NSWCandData_v1 ()=default
uint16_t l1Bcid () const
 Getters.
uint8_t l1NSegments () const
 Retrieve the number of segments sent from NSW-TP to Sector Logic.
bool l1Overflow () const
 Check if the segment candidate limit has been exceeded.
uint16_t fiberID () const
 Retrieve the fiber id.
uint16_t boardID () const
 Retrieve the board id.
uint32_t l1SegmentWord () const
 Segment.
uint16_t segEtaIndex () const
 Retrieve the eta index of the segment.
uint16_t segPhiIndex () const
 Retrieve the phi index of the segment.
uint8_t segDeltaThetaIndex () const
 Retrieve the delta theta index of the segment.
uint8_t segQuality () const
 Retrieve the quality flag of the segment.
float segEta () const
 Retrieve the decoded physical eta coordinate of the segment.
float segPhi () const
 Retrieve the decoded physical phi coordinate of the segment.
void setL1Bcid (uint16_t bcid)
 Setters.
void setL1NSegments (uint8_t nseg)
 Set the total number of segments sent from NSW-TP to Sector Logic.
void setL1Overflow (bool ovf)
 Set the segment total capacity overflow state flag.
void setFiberID (uint16_t fiber)
 Set the fiber id.
void setBoardID (uint16_t board)
 Set the board id.
void setL1SegmentWord (uint32_t word)
 Set the raw packed segment word.
void setSegment (uint16_t etaIndex, uint16_t phiIndex, uint8_t deltaThetaIndex, uint8_t quality)
 Pack and set the segment from its decoded fields.

Friends

std::ostream & operator<< (std::ostream &os, const L1NSWCandData_v1 &obj)
 Produce a formatted string representation of the candidates.

Detailed Description

Data class describing the L0 muon candidates from NSW-TP to TGC SL.

Definition at line 20 of file L1NSWCandData_v1.h.

Constructor & Destructor Documentation

◆ L1NSWCandData_v1()

xAOD::L1NSWCandData_v1::L1NSWCandData_v1 ( )
default

◆ ~L1NSWCandData_v1()

xAOD::L1NSWCandData_v1::~L1NSWCandData_v1 ( )
default

Member Function Documentation

◆ boardID()

uint16_t xAOD::L1NSWCandData_v1::boardID ( ) const

Retrieve the board id.

Returns
Board identifier address

◆ fiberID()

uint16_t xAOD::L1NSWCandData_v1::fiberID ( ) const

Retrieve the fiber id.

Returns
Fiber identifier code

◆ l1Bcid()

uint16_t xAOD::L1NSWCandData_v1::l1Bcid ( ) const

Getters.

Retrieve the Bunch Crossing Identifier (BCID)

Returns
12-bit bunch crossing ID

◆ l1NSegments()

uint8_t xAOD::L1NSWCandData_v1::l1NSegments ( ) const

Retrieve the number of segments sent from NSW-TP to Sector Logic.

Returns
Number of segments

◆ l1Overflow()

bool xAOD::L1NSWCandData_v1::l1Overflow ( ) const

Check if the segment candidate limit has been exceeded.

Returns
True if there are more than 8 segments detected

Definition at line 22 of file L1NSWCandData_v1.cxx.

22 {
23 static const SG::Accessor<uint8_t> acc("l1Overflow");
24 return acc(*this);
25 }
static const SG::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.

◆ l1SegmentWord()

uint32_t xAOD::L1NSWCandData_v1::l1SegmentWord ( ) const

Segment.

Get the packed 32-bit segment word

Returns
The packed segment data word

◆ segDeltaThetaIndex()

uint8_t xAOD::L1NSWCandData_v1::segDeltaThetaIndex ( ) const

Retrieve the delta theta index of the segment.

Definition at line 40 of file L1NSWCandData_v1.cxx.

40 {
42 }
uint32_t l1SegmentWord() const
Segment.
constexpr uint32_t RUN4_NSWTP_DTH_SHIFT
Angular deviation of the locally defined segment from the infinite momentum track.

◆ segEta()

float xAOD::L1NSWCandData_v1::segEta ( ) const

Retrieve the decoded physical eta coordinate of the segment.

Returns
Transformed float value representing the physical eta position

Definition at line 48 of file L1NSWCandData_v1.cxx.

◆ segEtaIndex()

uint16_t xAOD::L1NSWCandData_v1::segEtaIndex ( ) const

Retrieve the eta index of the segment.

Definition at line 32 of file L1NSWCandData_v1.cxx.

◆ segPhi()

float xAOD::L1NSWCandData_v1::segPhi ( ) const

Retrieve the decoded physical phi coordinate of the segment.

Returns
Transformed float value representing the physical phi position (in radians)

Definition at line 53 of file L1NSWCandData_v1.cxx.

53 {
55 }
uint16_t segPhiIndex() const
Retrieve the phi index of the segment.

◆ segPhiIndex()

uint16_t xAOD::L1NSWCandData_v1::segPhiIndex ( ) const

Retrieve the phi index of the segment.

Definition at line 36 of file L1NSWCandData_v1.cxx.

◆ segQuality()

uint8_t xAOD::L1NSWCandData_v1::segQuality ( ) const

Retrieve the quality flag of the segment.

Definition at line 44 of file L1NSWCandData_v1.cxx.

◆ setBoardID()

void xAOD::L1NSWCandData_v1::setBoardID ( uint16_t board)

Set the board id.

Parameters
boardBoard id

◆ setFiberID()

void xAOD::L1NSWCandData_v1::setFiberID ( uint16_t fiber)

Set the fiber id.

Parameters
fiberFiber id code

◆ setL1Bcid()

void xAOD::L1NSWCandData_v1::setL1Bcid ( uint16_t bcid)

Setters.

Set the Bunch Crossing Identifier (BCID)

Parameters
bcid12-bit bunch crossing ID

◆ setL1NSegments()

void xAOD::L1NSWCandData_v1::setL1NSegments ( uint8_t nseg)

Set the total number of segments sent from NSW-TP to Sector Logic.

Parameters
nsegSegment count token

◆ setL1Overflow()

void xAOD::L1NSWCandData_v1::setL1Overflow ( bool ovf)

Set the segment total capacity overflow state flag.

Parameters
ovfOverflow flag state

Definition at line 27 of file L1NSWCandData_v1.cxx.

27 {
28 static const SG::Accessor<uint8_t> acc("l1Overflow");
29 acc(*this) = value;
30 }

◆ setL1SegmentWord()

void xAOD::L1NSWCandData_v1::setL1SegmentWord ( uint32_t word)

Set the raw packed segment word.

Parameters
wordPacked segment data word

◆ setSegment()

void xAOD::L1NSWCandData_v1::setSegment ( uint16_t etaIndex,
uint16_t phiIndex,
uint8_t deltaThetaIndex,
uint8_t quality )

Pack and set the segment from its decoded fields.

Parameters
etaIndexCalculated eta index
phiIndexCalculated phi index
deltaThetaIndexCalculated theta index
qualityQuality flag value

Definition at line 57 of file L1NSWCandData_v1.cxx.

57 {
58 // Pack the fields into a single 32-bit container word
59 uint32_t packedWord = 0;
62 packedWord |= (static_cast<uint32_t>(deltaThetaIndex) & L1Muon::NSWTPBits::RUN4_NSWTP_DTH_MASK) << L1Muon::NSWTPBits::RUN4_NSWTP_DTH_SHIFT;
64
65 setL1SegmentWord(packedWord);
66 }
void setL1SegmentWord(uint32_t word)
Set the raw packed segment word.
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition EtaPhiLUT.cxx:23
setEventNumber uint32_t

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const L1NSWCandData_v1 & obj )
friend

Produce a formatted string representation of the candidates.

Returns
A string summary of the candidates

Definition at line 69 of file L1NSWCandData_v1.cxx.

69 {
70 os << "\n*BEGIN* xAOD::L1NSWCandData" << std::endl;
71 os << " BCID: " << obj.l1Bcid() << std::endl;
72 os << " Board ID: " << static_cast<int>(obj.boardID()) << std::endl;
73 os << " Fiber ID: " << static_cast<int>(obj.fiberID()) << std::endl;
74 os << " Number of Segments: " << static_cast<int>(obj.l1NSegments()) << std::endl;
75 os << " Overflow Flag: " << (obj.l1Overflow() ? "TRUE" : "FALSE") << std::endl;
76 os << " Eta Index: " << obj.segEtaIndex() << " (eta ~ " << obj.segEta() << ")" << std::endl;
77 os << " Phi Index: " << obj.segPhiIndex() << " (phi ~ " << obj.segPhi() << ")" << std::endl;
78 os << " Delta Theta Index: " << static_cast<int>(obj.segDeltaThetaIndex()) << std::endl;
79 os << " Quality Flag: " << static_cast<int>(obj.segQuality()) << std::endl;
80 os << "*END* xAOD::L1NSWCandData" << std::endl;
81 return os;
82 }

The documentation for this class was generated from the following files: