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

Jet TOB data for L1Topo. More...

#include <JetTopoTOB.h>

Collaboration diagram for LVL1::JetTopoTOB:

Public Member Functions

 JetTopoTOB ()
 JetTopoTOB (int crate, uint32_t tobWord)
 JetTopoTOB (int crate, int jem, int frame, int localCoord, int etSmall, int etLarge)
 JetTopoTOB (uint32_t roiWord)
 ~JetTopoTOB ()
int crate () const
 Return crate number (0-3)
int jem () const
 Return JEM number (0-15)
int frame () const
 Return JEM frame number (0-7)
unsigned int localCoord () const
 Return local coordinate (RoI local coords) (0-)
unsigned int etSmall () const
 Small cluster ET value.
unsigned int etLarge () const
 Large cluster ET value.
int etaIndex () const
 Extract eta index from the TOB data (0-31)
int phiIndex () const
 Extract phi index from the TOB data (0-31)
int ieta () const
 Extract eta coordinate from TOB data The index is an integer eta coordinate in multiples of 0.1 (TT eta granularity)
int iphi () const
 Extract integer phi coordinate from TOB data.
int iphiSigned () const
 Signed iphi (-30 -> 32)
float eta () const
float phi () const
uint32_t tobWord () const
 Return packed TOB word.
uint32_t roiWord () const
 Return corresponding RoI word (useful for Topo simulation)

Private Attributes

int m_crate
 crate
uint32_t m_tobWord
 RoI word.

Static Private Attributes

static const int s_jemBit = 24
static const int s_frameBit = 21
static const int s_lcBit = 19
static const int s_etSmallBit = 10
static const int s_etLargeBit = 0
static const int s_jemMask = 0xf
static const int s_frameMask = 0x7
static const int s_lcMask = 0x3
static const int s_etSmallMask = 0x1ff
static const int s_etLargeMask = 0x3ff
static const int s_framePhiWidth = 2
static const int s_frameEtaWidth = 2
static const int s_jemEtaWidth = 4
static const int s_jemPhiWidth = 8
static const int s_jemEtaOffset = 15
static const int s_jemPhiOffset = 1
static const int s_jemFJEta = 39
static const int s_jemEC1Eta = 29
static const int s_jemEC2Eta = 27
static const int s_jemEC3Eta = 25
static const int s_nJemPerQuadrant = 8
static const int s_jetElementWidth = 2

Detailed Description

Jet TOB data for L1Topo.

Contains a Jet Processor TOB word and crate number. Plus functions to return individual data members

Author
Alan Watson

Definition at line 19 of file JetTopoTOB.h.

Constructor & Destructor Documentation

◆ JetTopoTOB() [1/4]

LVL1::JetTopoTOB::JetTopoTOB ( )

Definition at line 25 of file JetTopoTOB.cxx.

25 : m_crate(0), m_tobWord(0)
26{
27}
int m_crate
crate
Definition JetTopoTOB.h:92
uint32_t m_tobWord
RoI word.
Definition JetTopoTOB.h:95

◆ JetTopoTOB() [2/4]

LVL1::JetTopoTOB::JetTopoTOB ( int crate,
uint32_t tobWord )

Definition at line 29 of file JetTopoTOB.cxx.

30{
31}
int crate() const
Return crate number (0-3)
Definition JetTopoTOB.h:99
uint32_t tobWord() const
Return packed TOB word.
Definition JetTopoTOB.h:129

◆ JetTopoTOB() [3/4]

LVL1::JetTopoTOB::JetTopoTOB ( int crate,
int jem,
int frame,
int localCoord,
int etSmall,
int etLarge )

Definition at line 33 of file JetTopoTOB.cxx.

33 : m_crate(crate)
34{
35 m_tobWord = 0;
41}
static const int s_etLargeBit
Definition JetTopoTOB.h:70
static const int s_frameBit
Definition JetTopoTOB.h:67
static const int s_etSmallMask
Definition JetTopoTOB.h:75
static const int s_jemBit
Definition JetTopoTOB.h:66
int frame() const
Return JEM frame number (0-7)
Definition JetTopoTOB.h:109
unsigned int localCoord() const
Return local coordinate (RoI local coords) (0-)
Definition JetTopoTOB.h:114
static const int s_lcMask
Definition JetTopoTOB.h:74
unsigned int etSmall() const
Small cluster ET value.
Definition JetTopoTOB.h:119
static const int s_frameMask
Definition JetTopoTOB.h:73
static const int s_lcBit
Definition JetTopoTOB.h:68
static const int s_etLargeMask
Definition JetTopoTOB.h:76
int jem() const
Return JEM number (0-15)
Definition JetTopoTOB.h:104
static const int s_jemMask
Definition JetTopoTOB.h:72
unsigned int etLarge() const
Large cluster ET value.
Definition JetTopoTOB.h:124
static const int s_etSmallBit
Definition JetTopoTOB.h:69

◆ JetTopoTOB() [4/4]

LVL1::JetTopoTOB::JetTopoTOB ( uint32_t roiWord)

Definition at line 43 of file JetTopoTOB.cxx.

44{
45 m_crate = (roiWord>>28) & 0x1;
46 m_tobWord = (roiWord&0xfffffff);
47}
uint32_t roiWord() const
Return corresponding RoI word (useful for Topo simulation)

◆ ~JetTopoTOB()

LVL1::JetTopoTOB::~JetTopoTOB ( )

Definition at line 49 of file JetTopoTOB.cxx.

50{
51}

Member Function Documentation

◆ crate()

int LVL1::JetTopoTOB::crate ( ) const
inline

Return crate number (0-3)

Definition at line 99 of file JetTopoTOB.h.

100{
101 return m_crate;
102}

◆ eta()

float LVL1::JetTopoTOB::eta ( ) const

Definition at line 88 of file JetTopoTOB.cxx.

89{
90
91 float eta = ieta()*0.1;
92
93 /*
94 int absEta = abs(ieta());
95 int sign = (eta > 0 ? 1 : -1);
96
97 switch (absEta) {
98 case s_jemEC3Eta:
99 eta = sign*2.45;
100 break;
101 case s_jemEC2Eta:
102 eta = sign*2.65;
103 break;
104 case s_jemEC1Eta:
105 eta = sign*2.95;
106 break;
107 }
108 */
109
110 return eta;
111}
int ieta() const
Extract eta coordinate from TOB data The index is an integer eta coordinate in multiples of 0....
float eta() const

◆ etaIndex()

int LVL1::JetTopoTOB::etaIndex ( ) const

Extract eta index from the TOB data (0-31)

Definition at line 54 of file JetTopoTOB.cxx.

55{
56 return (localCoord()&1) + (frame()>>2)*s_frameEtaWidth + (jem()&7)*s_jemEtaWidth;
57}
static const int s_jemEtaWidth
Definition JetTopoTOB.h:80
static const int s_frameEtaWidth
Definition JetTopoTOB.h:79

◆ etLarge()

unsigned int LVL1::JetTopoTOB::etLarge ( ) const
inline

Large cluster ET value.

Definition at line 124 of file JetTopoTOB.h.

125{
127}

◆ etSmall()

unsigned int LVL1::JetTopoTOB::etSmall ( ) const
inline

Small cluster ET value.

Definition at line 119 of file JetTopoTOB.h.

120{
122}

◆ frame()

int LVL1::JetTopoTOB::frame ( ) const
inline

Return JEM frame number (0-7)

Definition at line 109 of file JetTopoTOB.h.

110{
111 return (m_tobWord >> s_frameBit) & s_frameMask;
112}

◆ ieta()

int LVL1::JetTopoTOB::ieta ( ) const

Extract eta coordinate from TOB data The index is an integer eta coordinate in multiples of 0.1 (TT eta granularity)

Definition at line 62 of file JetTopoTOB.cxx.

63{
64
65 int index = etaIndex();
66
67 int ieta = 0;
68 if (index < 4 || index > 26) {
69 if (index==0) ieta = -s_jemFJEta;
70 else if (index==1) ieta = -s_jemEC1Eta;
71 else if (index==2) ieta = -s_jemEC2Eta;
72 else if (index==3) ieta = -s_jemEC3Eta;
73 else if (index==27) ieta = s_jemEC3Eta;
74 else if (index==28) ieta = s_jemEC2Eta;
75 else if (index==29) ieta = s_jemEC1Eta;
76 else if (index==30) ieta = s_jemFJEta;
77 else if (index==31) ieta = s_jemFJEta;
78 }
79 else {
81 }
82
83 return ieta;
84}
static const int s_jemEC2Eta
Definition JetTopoTOB.h:86
static const int s_jemEtaOffset
Definition JetTopoTOB.h:82
static const int s_jetElementWidth
Definition JetTopoTOB.h:89
static const int s_jemEC1Eta
Definition JetTopoTOB.h:85
static const int s_jemFJEta
Definition JetTopoTOB.h:84
static const int s_jemEC3Eta
Definition JetTopoTOB.h:87
int etaIndex() const
Extract eta index from the TOB data (0-31)
str index
Definition DeMoScan.py:362

◆ iphi()

int LVL1::JetTopoTOB::iphi ( ) const

Extract integer phi coordinate from TOB data.

The coordinate has the range 0 -> 62 in steps of 2

Definition at line 127 of file JetTopoTOB.cxx.

128{
129 int index = phiIndex();
130
131 int iphi = (index+1)*s_jetElementWidth;
132 if (iphi > 63) iphi -= 64;
133 return iphi;
134}
int phiIndex() const
Extract phi index from the TOB data (0-31)
int iphi() const
Extract integer phi coordinate from TOB data.

◆ iphiSigned()

int LVL1::JetTopoTOB::iphiSigned ( ) const

Signed iphi (-30 -> 32)

Definition at line 138 of file JetTopoTOB.cxx.

139{
140 int index = phiIndex();
141
142 int iphi = (index+1)*s_jetElementWidth;
143 if (iphi > 32) iphi -= 64;
144 return iphi;
145}

◆ jem()

int LVL1::JetTopoTOB::jem ( ) const
inline

Return JEM number (0-15)

Definition at line 104 of file JetTopoTOB.h.

105{
106 return (m_tobWord >> s_jemBit) & s_jemMask;
107}

◆ localCoord()

unsigned int LVL1::JetTopoTOB::localCoord ( ) const
inline

Return local coordinate (RoI local coords) (0-)

Definition at line 114 of file JetTopoTOB.h.

115{
116 return (m_tobWord >> s_lcBit) & s_lcMask;
117}

◆ phi()

float LVL1::JetTopoTOB::phi ( ) const

Definition at line 149 of file JetTopoTOB.cxx.

150{
151 float phi = iphiSigned()*M_PI/32;
152 return phi;
153}
#define M_PI
float phi() const
int iphiSigned() const
Signed iphi (-30 -> 32)

◆ phiIndex()

int LVL1::JetTopoTOB::phiIndex ( ) const

Extract phi index from the TOB data (0-31)

Definition at line 115 of file JetTopoTOB.cxx.

116{
119
120 return index;
121}
static const int s_jemPhiWidth
Definition JetTopoTOB.h:81
static const int s_framePhiWidth
Definition JetTopoTOB.h:78
static const int s_nJemPerQuadrant
Definition JetTopoTOB.h:88

◆ roiWord()

uint32_t LVL1::JetTopoTOB::roiWord ( ) const

Return corresponding RoI word (useful for Topo simulation)

Definition at line 156 of file JetTopoTOB.cxx.

157{
158 // ET values and coordinate within crate
159 uint32_t word = m_tobWord&0xfffffff;
160 // Crate number
161 word += (m_crate<<28);
162 // Type is 000 anyway, so nothing more to do
163
164 return word;
165}
setEventNumber uint32_t

◆ tobWord()

uint32_t LVL1::JetTopoTOB::tobWord ( ) const
inline

Return packed TOB word.

Definition at line 129 of file JetTopoTOB.h.

130{
131 return m_tobWord;
132}

Member Data Documentation

◆ m_crate

int LVL1::JetTopoTOB::m_crate
private

crate

Definition at line 92 of file JetTopoTOB.h.

◆ m_tobWord

uint32_t LVL1::JetTopoTOB::m_tobWord
private

RoI word.

Definition at line 95 of file JetTopoTOB.h.

◆ s_etLargeBit

const int LVL1::JetTopoTOB::s_etLargeBit = 0
staticprivate

Definition at line 70 of file JetTopoTOB.h.

◆ s_etLargeMask

const int LVL1::JetTopoTOB::s_etLargeMask = 0x3ff
staticprivate

Definition at line 76 of file JetTopoTOB.h.

◆ s_etSmallBit

const int LVL1::JetTopoTOB::s_etSmallBit = 10
staticprivate

Definition at line 69 of file JetTopoTOB.h.

◆ s_etSmallMask

const int LVL1::JetTopoTOB::s_etSmallMask = 0x1ff
staticprivate

Definition at line 75 of file JetTopoTOB.h.

◆ s_frameBit

const int LVL1::JetTopoTOB::s_frameBit = 21
staticprivate

Definition at line 67 of file JetTopoTOB.h.

◆ s_frameEtaWidth

const int LVL1::JetTopoTOB::s_frameEtaWidth = 2
staticprivate

Definition at line 79 of file JetTopoTOB.h.

◆ s_frameMask

const int LVL1::JetTopoTOB::s_frameMask = 0x7
staticprivate

Definition at line 73 of file JetTopoTOB.h.

◆ s_framePhiWidth

const int LVL1::JetTopoTOB::s_framePhiWidth = 2
staticprivate

Definition at line 78 of file JetTopoTOB.h.

◆ s_jemBit

const int LVL1::JetTopoTOB::s_jemBit = 24
staticprivate

Definition at line 66 of file JetTopoTOB.h.

◆ s_jemEC1Eta

const int LVL1::JetTopoTOB::s_jemEC1Eta = 29
staticprivate

Definition at line 85 of file JetTopoTOB.h.

◆ s_jemEC2Eta

const int LVL1::JetTopoTOB::s_jemEC2Eta = 27
staticprivate

Definition at line 86 of file JetTopoTOB.h.

◆ s_jemEC3Eta

const int LVL1::JetTopoTOB::s_jemEC3Eta = 25
staticprivate

Definition at line 87 of file JetTopoTOB.h.

◆ s_jemEtaOffset

const int LVL1::JetTopoTOB::s_jemEtaOffset = 15
staticprivate

Definition at line 82 of file JetTopoTOB.h.

◆ s_jemEtaWidth

const int LVL1::JetTopoTOB::s_jemEtaWidth = 4
staticprivate

Definition at line 80 of file JetTopoTOB.h.

◆ s_jemFJEta

const int LVL1::JetTopoTOB::s_jemFJEta = 39
staticprivate

Definition at line 84 of file JetTopoTOB.h.

◆ s_jemMask

const int LVL1::JetTopoTOB::s_jemMask = 0xf
staticprivate

Definition at line 72 of file JetTopoTOB.h.

◆ s_jemPhiOffset

const int LVL1::JetTopoTOB::s_jemPhiOffset = 1
staticprivate

Definition at line 83 of file JetTopoTOB.h.

◆ s_jemPhiWidth

const int LVL1::JetTopoTOB::s_jemPhiWidth = 8
staticprivate

Definition at line 81 of file JetTopoTOB.h.

◆ s_jetElementWidth

const int LVL1::JetTopoTOB::s_jetElementWidth = 2
staticprivate

Definition at line 89 of file JetTopoTOB.h.

◆ s_lcBit

const int LVL1::JetTopoTOB::s_lcBit = 19
staticprivate

Definition at line 68 of file JetTopoTOB.h.

◆ s_lcMask

const int LVL1::JetTopoTOB::s_lcMask = 0x3
staticprivate

Definition at line 74 of file JetTopoTOB.h.

◆ s_nJemPerQuadrant

const int LVL1::JetTopoTOB::s_nJemPerQuadrant = 8
staticprivate

Definition at line 88 of file JetTopoTOB.h.


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