ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::CMXRoI Class Reference

CMX RoI data. More...

#include <CMXRoI.h>

Collaboration diagram for LVL1::CMXRoI:

Public Types

enum  SumType { NORMAL = 0 , MASKED = 1 }

Public Member Functions

 CMXRoI ()
 CMXRoI (uint32_t roiWord0, uint32_t roiWord1, uint32_t roiWord2, uint32_t roiWord3, uint32_t roiWord4, uint32_t roiWord5)
 CMXRoI (unsigned int ex, unsigned int ey, unsigned int et, int exError, int eyError, int etError, unsigned int sumEtHits, unsigned int missingEtHits, unsigned int missingEtSigHits, unsigned int exM, unsigned int eyM, unsigned int etM, int exErrorM, int eyErrorM, int etErrorM, unsigned int sumEtHitsM, unsigned int missingEtHitsM)
 ~CMXRoI ()
unsigned int ex (SumType type=NORMAL) const
 Return Ex.
unsigned int ey (SumType type=NORMAL) const
 Return Ey.
unsigned int et (SumType type=NORMAL) const
 Return Et.
int exError (SumType type=NORMAL) const
 Return Ex error flags (bit 0 Overflow)
int eyError (SumType type=NORMAL) const
 Return Ey error flags (bit 0 Overflow)
int etError (SumType type=NORMAL) const
 Return Et error flags (bit 0 Overflow)
unsigned int sumEtHits (SumType type=NORMAL) const
 Return Sum-ET hits.
unsigned int missingEtHits (SumType type=NORMAL) const
 Return Missing-ET hits.
unsigned int missingEtSigHits () const
 Return Missing-ET-Sig hits.
uint32_t roiWord (int word) const
 Return packed Energy RoI word (0-5)
unsigned int exWord (SumType type=NORMAL) const
 Return Ex RoI word.
unsigned int eyWord (SumType type=NORMAL) const
 Return Ey RoI word.
unsigned int etWord (SumType type=NORMAL) const
 Return ET RoI word.
bool setRoiWord (uint32_t roiWord)
 Set RoI word with ID check.

Private Attributes

std::vector< uint32_t > m_roiWords

Static Private Attributes

static const int s_wordIdVal0 = 0x4
static const int s_wordIdVal1 = 0x6
static const int s_wordIdVal2 = 0x5
static const int s_wordIdBit = 28
static const int s_sumEtHitsBit = 16
static const int s_missingEtHitsBit = 16
static const int s_missingEtSigHitsBit = 16
static const int s_energyBit = 0
static const int s_overflowBit = 15
static const int s_sumTypeBit = 26
static const int s_wordIdMask = 0xf
static const int s_sumEtHitsMask = 0xff
static const int s_missingEtHitsMask = 0xff
static const int s_missingEtSigHitsMask = 0xff
static const int s_energyMask = 0x7fff
static const int s_overflowMask = 0x1
static const int s_sumTypeMask = 0x1
static const int s_exOffset = 0
static const int s_eyOffset = 2
static const int s_etOffset = 4
static const int s_maxRoiWords = 6

Detailed Description

CMX RoI data.

Contains six Energy RoI words. Used in analysis of RoI readout.

Author
Peter Faulkner

Definition at line 22 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

Member Enumeration Documentation

◆ SumType

Constructor & Destructor Documentation

◆ CMXRoI() [1/3]

LVL1::CMXRoI::CMXRoI ( )

◆ CMXRoI() [2/3]

LVL1::CMXRoI::CMXRoI ( uint32_t roiWord0,
uint32_t roiWord1,
uint32_t roiWord2,
uint32_t roiWord3,
uint32_t roiWord4,
uint32_t roiWord5 )

Definition at line 40 of file CMXRoI.cxx.

43{
44 m_roiWords[0] = roiWord0;
46 m_roiWords[2] = roiWord2;
48 m_roiWords[4] = roiWord4;
50}
setRoIWord1 roiWord3
setRoIWord1 setRoIWord3 roiWord5

◆ CMXRoI() [3/3]

LVL1::CMXRoI::CMXRoI ( unsigned int ex,
unsigned int ey,
unsigned int et,
int exError,
int eyError,
int etError,
unsigned int sumEtHits,
unsigned int missingEtHits,
unsigned int missingEtSigHits,
unsigned int exM,
unsigned int eyM,
unsigned int etM,
int exErrorM,
int eyErrorM,
int etErrorM,
unsigned int sumEtHitsM,
unsigned int missingEtHitsM )

Definition at line 52 of file CMXRoI.cxx.

60{
61 int type = NORMAL;
62 int ix = s_exOffset + type;
69 type = MASKED;
70 ix = s_exOffset + type;
73 m_roiWords[ix] |= (exM & s_energyMask) << s_energyBit;
74 m_roiWords[ix] |= (exErrorM & s_overflowMask) << s_overflowBit;
75
76 type = NORMAL;
77 ix = s_eyOffset + type;
84 type = MASKED;
85 ix = s_eyOffset + type;
88 m_roiWords[ix] |= (eyM & s_energyMask) << s_energyBit;
89 m_roiWords[ix] |= (eyErrorM & s_overflowMask) << s_overflowBit;
90 m_roiWords[ix] |= (missingEtHitsM & s_missingEtHitsMask)
92 type = NORMAL;
93 ix = s_etOffset + type;
99
100 type = MASKED;
101 ix = s_etOffset + type;
103 m_roiWords[ix] |= type << s_sumTypeBit;
104 m_roiWords[ix] |= (etM & s_energyMask) << s_energyBit;
105 m_roiWords[ix] |= (etErrorM & s_overflowMask) << s_overflowBit;
106 m_roiWords[ix] |= (sumEtHitsM & s_sumEtHitsMask) << s_sumEtHitsBit;
107}
int eyError(SumType type=NORMAL) const
Return Ey error flags (bit 0 Overflow)
unsigned int missingEtHits(SumType type=NORMAL) const
Return Missing-ET hits.
unsigned int sumEtHits(SumType type=NORMAL) const
Return Sum-ET hits.
unsigned int missingEtSigHits() const
Return Missing-ET-Sig hits.
unsigned int ex(SumType type=NORMAL) const
Return Ex.
int exError(SumType type=NORMAL) const
Return Ex error flags (bit 0 Overflow)
int etError(SumType type=NORMAL) const
Return Et error flags (bit 0 Overflow)
unsigned int et(SumType type=NORMAL) const
Return Et.
unsigned int ey(SumType type=NORMAL) const
Return Ey.

◆ ~CMXRoI()

LVL1::CMXRoI::~CMXRoI ( )

Definition at line 109 of file CMXRoI.cxx.

110{
111}

Member Function Documentation

◆ et()

unsigned int LVL1::CMXRoI::et ( SumType type = NORMAL) const
inline

Return Et.

Definition at line 114 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

115{
116 return (m_roiWords[s_etOffset+type] >> s_energyBit) & s_energyMask;
117}

◆ etError()

int LVL1::CMXRoI::etError ( SumType type = NORMAL) const
inline

Return Et error flags (bit 0 Overflow)

Definition at line 129 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

130{
132}

◆ etWord()

unsigned int LVL1::CMXRoI::etWord ( SumType type = NORMAL) const
inline

Return ET RoI word.

Definition at line 164 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

165{
166 return m_roiWords[s_etOffset+type];
167}

◆ ex()

unsigned int LVL1::CMXRoI::ex ( SumType type = NORMAL) const
inline

Return Ex.

Definition at line 104 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

105{
106 return (m_roiWords[s_exOffset+type] >> s_energyBit) & s_energyMask;
107}

◆ exError()

int LVL1::CMXRoI::exError ( SumType type = NORMAL) const
inline

Return Ex error flags (bit 0 Overflow)

Definition at line 119 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

120{
122}

◆ exWord()

unsigned int LVL1::CMXRoI::exWord ( SumType type = NORMAL) const
inline

Return Ex RoI word.

Definition at line 154 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

155{
156 return m_roiWords[s_exOffset+type];
157}

◆ ey()

unsigned int LVL1::CMXRoI::ey ( SumType type = NORMAL) const
inline

Return Ey.

Definition at line 109 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

110{
111 return (m_roiWords[s_eyOffset+type] >> s_energyBit) & s_energyMask;
112}

◆ eyError()

int LVL1::CMXRoI::eyError ( SumType type = NORMAL) const
inline

Return Ey error flags (bit 0 Overflow)

Definition at line 124 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

125{
127}

◆ eyWord()

unsigned int LVL1::CMXRoI::eyWord ( SumType type = NORMAL) const
inline

Return Ey RoI word.

Definition at line 159 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

160{
161 return m_roiWords[s_eyOffset+type];
162}

◆ missingEtHits()

unsigned int LVL1::CMXRoI::missingEtHits ( SumType type = NORMAL) const
inline

Return Missing-ET hits.

Definition at line 139 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

140{
142}

◆ missingEtSigHits()

unsigned int LVL1::CMXRoI::missingEtSigHits ( ) const
inline

Return Missing-ET-Sig hits.

Definition at line 144 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

◆ roiWord()

uint32_t LVL1::CMXRoI::roiWord ( int word) const
inline

Return packed Energy RoI word (0-5)

Definition at line 149 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

150{
151 return (word < s_maxRoiWords) ? m_roiWords[word] : 0;
152}

◆ setRoiWord()

bool LVL1::CMXRoI::setRoiWord ( uint32_t roiWord)

Set RoI word with ID check.

Definition at line 115 of file CMXRoI.cxx.

116{
117 bool valid = true;
118 int wordId = (roiWord >> s_wordIdBit) & s_wordIdMask;
121 else if (wordId == s_wordIdVal1) m_roiWords[s_eyOffset+type] = roiWord;
122 else if (wordId == s_wordIdVal2) m_roiWords[s_etOffset+type] = roiWord;
123 else valid = false;
124 return valid;
125}
uint32_t roiWord(int word) const
Return packed Energy RoI word (0-5)
list valid
Definition calibdata.py:44

◆ sumEtHits()

unsigned int LVL1::CMXRoI::sumEtHits ( SumType type = NORMAL) const
inline

Return Sum-ET hits.

Definition at line 134 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h.

135{
137}

Member Data Documentation

◆ m_roiWords

std::vector<uint32_t> LVL1::CMXRoI::m_roiWords
private

◆ s_energyBit

const int LVL1::CMXRoI::s_energyBit = 0
staticprivate

◆ s_energyMask

const int LVL1::CMXRoI::s_energyMask = 0x7fff
staticprivate

◆ s_etOffset

const int LVL1::CMXRoI::s_etOffset = 4
staticprivate

◆ s_exOffset

const int LVL1::CMXRoI::s_exOffset = 0
staticprivate

◆ s_eyOffset

const int LVL1::CMXRoI::s_eyOffset = 2
staticprivate

◆ s_maxRoiWords

const int LVL1::CMXRoI::s_maxRoiWords = 6
staticprivate

◆ s_missingEtHitsBit

const int LVL1::CMXRoI::s_missingEtHitsBit = 16
staticprivate

◆ s_missingEtHitsMask

const int LVL1::CMXRoI::s_missingEtHitsMask = 0xff
staticprivate

◆ s_missingEtSigHitsBit

const int LVL1::CMXRoI::s_missingEtSigHitsBit = 16
staticprivate

◆ s_missingEtSigHitsMask

const int LVL1::CMXRoI::s_missingEtSigHitsMask = 0xff
staticprivate

◆ s_overflowBit

const int LVL1::CMXRoI::s_overflowBit = 15
staticprivate

◆ s_overflowMask

const int LVL1::CMXRoI::s_overflowMask = 0x1
staticprivate

◆ s_sumEtHitsBit

const int LVL1::CMXRoI::s_sumEtHitsBit = 16
staticprivate

◆ s_sumEtHitsMask

const int LVL1::CMXRoI::s_sumEtHitsMask = 0xff
staticprivate

◆ s_sumTypeBit

const int LVL1::CMXRoI::s_sumTypeBit = 26
staticprivate

◆ s_sumTypeMask

const int LVL1::CMXRoI::s_sumTypeMask = 0x1
staticprivate

◆ s_wordIdBit

const int LVL1::CMXRoI::s_wordIdBit = 28
staticprivate

◆ s_wordIdMask

const int LVL1::CMXRoI::s_wordIdMask = 0xf
staticprivate

◆ s_wordIdVal0

const int LVL1::CMXRoI::s_wordIdVal0 = 0x4
staticprivate

◆ s_wordIdVal1

const int LVL1::CMXRoI::s_wordIdVal1 = 0x6
staticprivate

◆ s_wordIdVal2

const int LVL1::CMXRoI::s_wordIdVal2 = 0x5
staticprivate

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