ATLAS Offline Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
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) More...
 
int jem () const
 Return JEM number (0-15) More...
 
int frame () const
 Return JEM frame number (0-7) More...
 
unsigned int localCoord () const
 Return local coordinate (RoI local coords) (0-) More...
 
unsigned int etSmall () const
 Small cluster ET value. More...
 
unsigned int etLarge () const
 Large cluster ET value. More...
 
int etaIndex () const
 Extract eta index from the TOB data (0-31) More...
 
int phiIndex () const
 Extract phi index from the TOB data (0-31) More...
 
int ieta () const
 Extract eta coordinate from TOB data The index is an integer eta coordinate in multiples of 0.1 (TT eta granularity) More...
 
int iphi () const
 Extract integer phi coordinate from TOB data. More...
 
int iphiSigned () const
 Signed iphi (-30 -> 32) More...
 
float eta () const
 
float phi () const
 
uint32_t tobWord () const
 Return packed TOB word. More...
 
uint32_t roiWord () const
 Return corresponding RoI word (useful for Topo simulation) More...
 

Private Attributes

int m_crate
 crate More...
 
uint32_t m_tobWord
 RoI word. More...
 

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 }

◆ JetTopoTOB() [2/4]

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

Definition at line 29 of file JetTopoTOB.cxx.

30 {
31 }

◆ 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;
36  m_tobWord |= (jem & s_jemMask) << s_jemBit;
41 }

◆ 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 }

◆ ~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 }

◆ 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 }

◆ etLarge()

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

Large cluster ET value.

Definition at line 124 of file JetTopoTOB.h.

125 {
126  return (m_tobWord >> s_etLargeBit) & s_etLargeMask;
127 }

◆ etSmall()

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

Small cluster ET value.

Definition at line 119 of file JetTopoTOB.h.

120 {
121  return (m_tobWord >> s_etSmallBit) & s_etSmallMask;
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 }

◆ 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 }

◆ 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 }

◆ phiIndex()

int LVL1::JetTopoTOB::phiIndex ( ) const

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

Definition at line 115 of file JetTopoTOB.cxx.

116 {
117  int index = (localCoord() >> 1) + (frame()&3)*s_framePhiWidth + m_crate*s_jemPhiWidth;
118  if (jem() >= s_nJemPerQuadrant) index += 2*s_jemPhiWidth;
119 
120  return index;
121 }

◆ 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 }

◆ 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:
LVL1::JetTopoTOB::s_jemFJEta
static const int s_jemFJEta
Definition: JetTopoTOB.h:84
LVL1::JetTopoTOB::iphi
int iphi() const
Extract integer phi coordinate from TOB data.
Definition: JetTopoTOB.cxx:127
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
LVL1::JetTopoTOB::etaIndex
int etaIndex() const
Extract eta index from the TOB data (0-31)
Definition: JetTopoTOB.cxx:54
LVL1::JetTopoTOB::s_etLargeMask
static const int s_etLargeMask
Definition: JetTopoTOB.h:76
LVL1::JetTopoTOB::tobWord
uint32_t tobWord() const
Return packed TOB word.
Definition: JetTopoTOB.h:129
LVL1::JetTopoTOB::frame
int frame() const
Return JEM frame number (0-7)
Definition: JetTopoTOB.h:109
LVL1::JetTopoTOB::s_jemMask
static const int s_jemMask
Definition: JetTopoTOB.h:72
LVL1::JetTopoTOB::iphiSigned
int iphiSigned() const
Signed iphi (-30 -> 32)
Definition: JetTopoTOB.cxx:138
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
index
Definition: index.py:1
LVL1::JetTopoTOB::eta
float eta() const
Definition: JetTopoTOB.cxx:88
LVL1::JetTopoTOB::s_nJemPerQuadrant
static const int s_nJemPerQuadrant
Definition: JetTopoTOB.h:88
LVL1::JetTopoTOB::jem
int jem() const
Return JEM number (0-15)
Definition: JetTopoTOB.h:104
M_PI
#define M_PI
Definition: ActiveFraction.h:11
LVL1::JetTopoTOB::s_framePhiWidth
static const int s_framePhiWidth
Definition: JetTopoTOB.h:78
LVL1::JetTopoTOB::etSmall
unsigned int etSmall() const
Small cluster ET value.
Definition: JetTopoTOB.h:119
LVL1::JetTopoTOB::roiWord
uint32_t roiWord() const
Return corresponding RoI word (useful for Topo simulation)
Definition: JetTopoTOB.cxx:156
LVL1::JetTopoTOB::s_lcMask
static const int s_lcMask
Definition: JetTopoTOB.h:74
LVL1::JetTopoTOB::phiIndex
int phiIndex() const
Extract phi index from the TOB data (0-31)
Definition: JetTopoTOB.cxx:115
LVL1::JetTopoTOB::s_etSmallMask
static const int s_etSmallMask
Definition: JetTopoTOB.h:75
LVL1::JetTopoTOB::s_jemEtaWidth
static const int s_jemEtaWidth
Definition: JetTopoTOB.h:80
LVL1::JetTopoTOB::s_jemEtaOffset
static const int s_jemEtaOffset
Definition: JetTopoTOB.h:82
LVL1::JetTopoTOB::s_frameEtaWidth
static const int s_frameEtaWidth
Definition: JetTopoTOB.h:79
LVL1::JetTopoTOB::s_jemPhiWidth
static const int s_jemPhiWidth
Definition: JetTopoTOB.h:81
LVL1::JetTopoTOB::m_tobWord
uint32_t m_tobWord
RoI word.
Definition: JetTopoTOB.h:95
LVL1::JetTopoTOB::etLarge
unsigned int etLarge() const
Large cluster ET value.
Definition: JetTopoTOB.h:124
LVL1::JetTopoTOB::s_jemEC2Eta
static const int s_jemEC2Eta
Definition: JetTopoTOB.h:86
LVL1::JetTopoTOB::m_crate
int m_crate
crate
Definition: JetTopoTOB.h:92
LVL1::JetTopoTOB::s_jemBit
static const int s_jemBit
Definition: JetTopoTOB.h:66
LVL1::JetTopoTOB::s_frameMask
static const int s_frameMask
Definition: JetTopoTOB.h:73
LVL1::JetTopoTOB::s_jemEC1Eta
static const int s_jemEC1Eta
Definition: JetTopoTOB.h:85
LVL1::JetTopoTOB::s_etSmallBit
static const int s_etSmallBit
Definition: JetTopoTOB.h:69
LVL1::JetTopoTOB::crate
int crate() const
Return crate number (0-3)
Definition: JetTopoTOB.h:99
DeMoScan.index
string index
Definition: DeMoScan.py:364
LVL1::JetTopoTOB::ieta
int ieta() const
Extract eta coordinate from TOB data The index is an integer eta coordinate in multiples of 0....
Definition: JetTopoTOB.cxx:62
LVL1::JetTopoTOB::localCoord
unsigned int localCoord() const
Return local coordinate (RoI local coords) (0-)
Definition: JetTopoTOB.h:114
LVL1::JetTopoTOB::s_jemEC3Eta
static const int s_jemEC3Eta
Definition: JetTopoTOB.h:87
LVL1::JetTopoTOB::s_frameBit
static const int s_frameBit
Definition: JetTopoTOB.h:67
LVL1::JetTopoTOB::s_etLargeBit
static const int s_etLargeBit
Definition: JetTopoTOB.h:70
LVL1::JetTopoTOB::phi
float phi() const
Definition: JetTopoTOB.cxx:149
LVL1::JetTopoTOB::s_jetElementWidth
static const int s_jetElementWidth
Definition: JetTopoTOB.h:89
LVL1::JetTopoTOB::s_lcBit
static const int s_lcBit
Definition: JetTopoTOB.h:68