ATLAS Offline Software
JetTopoTOB.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef TRIGT1CALO_JETTOPOTOB_H
5 #define TRIGT1CALO_JETTOPOTOB_H
6 
7 #include <stdint.h>
8 
9 namespace LVL1 {
10 
19 class JetTopoTOB {
20 
21  public:
22 
23  JetTopoTOB();
25  JetTopoTOB(int crate, int jem, int frame, int localCoord, int etSmall, int etLarge);
27 
28  ~JetTopoTOB();
29 
31  int crate() const;
33  int jem() const;
35  int frame() const;
37  unsigned int localCoord() const;
39  unsigned int etSmall() const;
41  unsigned int etLarge() const;
42 
43  // eta index
44  int etaIndex() const;
45  // phi index
46  int phiIndex() const;
47  // Integer eta coordinate
48  int ieta() const;
49  // Integer phi coordinate
50  int iphi() const;
51  int iphiSigned() const;
52  // Floating eta coordinate
53  float eta() const;
54  // Floating phi coordinate
55  float phi() const;
56 
58  uint32_t tobWord() const;
59 
61  uint32_t roiWord() const;
62 
63  private:
64 
65  // Data locations within word
66  static const int s_jemBit = 24;
67  static const int s_frameBit = 21;
68  static const int s_lcBit = 19;
69  static const int s_etSmallBit = 10;
70  static const int s_etLargeBit = 0;
71  // Data masks
72  static const int s_jemMask = 0xf;
73  static const int s_frameMask = 0x7;
74  static const int s_lcMask = 0x3;
75  static const int s_etSmallMask = 0x1ff;
76  static const int s_etLargeMask = 0x3ff;
77  // For decoding coordinates
78  static const int s_framePhiWidth = 2;
79  static const int s_frameEtaWidth = 2;
80  static const int s_jemEtaWidth = 4;
81  static const int s_jemPhiWidth = 8;
82  static const int s_jemEtaOffset = 15;
83  static const int s_jemPhiOffset = 1;
84  static const int s_jemFJEta = 39;
85  static const int s_jemEC1Eta = 29;
86  static const int s_jemEC2Eta = 27;
87  static const int s_jemEC3Eta = 25;
88  static const int s_nJemPerQuadrant = 8;
89  static const int s_jetElementWidth = 2;
90 
92  int m_crate;
93 
96 
97 };
98 
99 inline int JetTopoTOB::crate() const
100 {
101  return m_crate;
102 }
103 
104 inline int JetTopoTOB::jem() const
105 {
106  return (m_tobWord >> s_jemBit) & s_jemMask;
107 }
108 
109 inline int JetTopoTOB::frame() const
110 {
111  return (m_tobWord >> s_frameBit) & s_frameMask;
112 }
113 
114 inline unsigned int JetTopoTOB::localCoord() const
115 {
116  return (m_tobWord >> s_lcBit) & s_lcMask;
117 }
118 
119 inline unsigned int JetTopoTOB::etSmall() const
120 {
121  return (m_tobWord >> s_etSmallBit) & s_etSmallMask;
122 }
123 
124 inline unsigned int JetTopoTOB::etLarge() const
125 {
126  return (m_tobWord >> s_etLargeBit) & s_etLargeMask;
127 }
128 
130 {
131  return m_tobWord;
132 }
133 
134 
135 } // end namespace
136 
137 #endif
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
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::~JetTopoTOB
~JetTopoTOB()
Definition: JetTopoTOB.cxx:49
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
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
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
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::JetTopoTOB::roiWord
uint32_t roiWord() const
Return corresponding RoI word (useful for Topo simulation)
Definition: JetTopoTOB.cxx:156
LVL1::JetTopoTOB::s_jemPhiOffset
static const int s_jemPhiOffset
Definition: JetTopoTOB.h:83
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::JetTopoTOB
JetTopoTOB()
Definition: JetTopoTOB.cxx:25
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
Jet TOB data for L1Topo.
Definition: JetTopoTOB.h:19
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
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