ATLAS Offline Software
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef TRIGT1CALO_JEMROI_H
5 #define TRIGT1CALO_JEMROI_H
6 
7 #include <stdint.h>
8 
9 namespace LVL1 {
10 
19 class JEMRoI {
20 
21  public:
22 
23  JEMRoI();
25  JEMRoI(int crate, int jem, int frame, int location, int forward,
26  int hits, int error);
27 
28  ~JEMRoI();
29 
31  int crate() const;
33  int jem() const;
35  int frame() const;
37  int location() const;
39  int forward() const;
41  int hits() const;
43  int error() const;
44 
46  uint32_t roiWord() const;
49 
50  private:
51 
53  static const unsigned int s_wordIdVal = 0x4;
54  // Data locations
55  static const int s_wordIdBit = 29;
56  static const int s_crateBit = 28;
57  static const int s_jemBit = 24;
58  static const int s_frameBit = 21;
59  static const int s_locationBit = 19;
60  static const int s_forwardBit = 18;
61  static const int s_parityBit = 17;
62  static const int s_saturationBit = 16;
63  static const int s_forwardHitsBit = 8;
64  static const int s_mainHitsBit = 0;
65  // Data masks
66  static const int s_wordIdMask = 0x7;
67  static const int s_crateMask = 0x1;
68  static const int s_jemMask = 0xf;
69  static const int s_frameMask = 0x7;
70  static const int s_locationMask = 0x3;
71  static const int s_forwardMask = 0x1;
72  static const int s_parityMask = 0x1;
73  static const int s_saturationMask = 0x1;
74  static const int s_forwardHitsMask = 0xf;
75  static const int s_mainHitsMask = 0xff;
76 
78  int parity() const;
80  int saturation() const;
81 
84 
85 };
86 
87 inline int JEMRoI::crate() const
88 {
89  return (m_roiWord >> s_crateBit) & s_crateMask;
90 }
91 
92 inline int JEMRoI::jem() const
93 {
94  return (m_roiWord >> s_jemBit) & s_jemMask;
95 }
96 
97 inline int JEMRoI::frame() const
98 {
99  return (m_roiWord >> s_frameBit) & s_frameMask;
100 }
101 
102 inline int JEMRoI::location() const
103 {
104  return (m_roiWord >> s_locationBit) & s_locationMask;
105 }
106 
107 inline int JEMRoI::forward() const
108 {
109  return (m_roiWord >> s_forwardBit) & s_forwardMask;
110 }
111 
112 inline int JEMRoI::error() const
113 {
114  return (parity() << 1) | saturation();
115 }
116 
117 inline uint32_t JEMRoI::roiWord() const
118 {
119  return m_roiWord;
120 }
121 
122 inline int JEMRoI::parity() const
123 {
124  return (m_roiWord >> s_parityBit) & s_parityMask;
125 }
126 
127 inline int JEMRoI::saturation() const
128 {
130 }
131 
132 } // end namespace
133 
134 #ifndef JEMRoI_ClassDEF_H
136 #endif
137 
138 #endif
LVL1::JEMRoI::s_forwardMask
static const int s_forwardMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:71
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::JEMRoI::s_parityBit
static const int s_parityBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:61
LVL1::JEMRoI::m_roiWord
uint32_t m_roiWord
RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:83
LVL1::JEMRoI::s_mainHitsMask
static const int s_mainHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:75
LVL1::JEMRoI::location
int location() const
Return location (RoI local coords) (0-3)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:102
LVL1::JEMRoI::parity
int parity() const
Return parity error flag (0/1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:122
LVL1::JEMRoI::forward
int forward() const
Return forward jet flag (0/1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:107
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::JEMRoI::s_forwardHitsBit
static const int s_forwardHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:63
LVL1::JEMRoI::s_locationBit
static const int s_locationBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:59
LVL1::JEMRoI::s_wordIdVal
static const unsigned int s_wordIdVal
RoI word ID.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:53
LVL1::JEMRoI::JEMRoI
JEMRoI()
Definition: JEMRoI.cxx:35
LVL1::JEMRoI::error
int error() const
Return error flags (bit 0 Saturation, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:112
LVL1::JEMRoI::hits
int hits() const
Return Jet hit map (8 bits Main or 4 bits Forward)
Definition: JEMRoI.cxx:64
LVL1::JEMRoI::s_mainHitsBit
static const int s_mainHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:64
LVL1::JEMRoI::s_forwardHitsMask
static const int s_forwardHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:74
LVL1::JEMRoI::s_forwardBit
static const int s_forwardBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:60
JEMRoI_ClassDEF.h
LVL1::JEMRoI::s_locationMask
static const int s_locationMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:70
LVL1::JEMRoI::s_frameBit
static const int s_frameBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:58
LVL1::JEMRoI::s_frameMask
static const int s_frameMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:69
LVL1::JEMRoI::s_crateMask
static const int s_crateMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:67
LVL1::JEMRoI::crate
int crate() const
Return crate number (0-1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:87
LVL1::JEMRoI::s_crateBit
static const int s_crateBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:56
LVL1::JEMRoI::s_saturationMask
static const int s_saturationMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:73
LVL1::JEMRoI::s_jemMask
static const int s_jemMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:68
LVL1::JEMRoI::s_wordIdMask
static const int s_wordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:66
LVL1::JEMRoI::s_parityMask
static const int s_parityMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:72
LVL1::JEMRoI::~JEMRoI
~JEMRoI()
Definition: JEMRoI.cxx:58
LVL1::JEMRoI::jem
int jem() const
Return JEM number (0-15)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:92
LVL1::JEMRoI::s_saturationBit
static const int s_saturationBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:62
LVL1::JEMRoI::s_jemBit
static const int s_jemBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:57
LVL1::JEMRoI
JEM RoI data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:19
LVL1::JEMRoI::saturation
int saturation() const
Return saturation flag (0/1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:127
error
Definition: IImpactPoint3dEstimator.h:70
LVL1::JEMRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition: JEMRoI.cxx:74
LVL1::JEMRoI::roiWord
uint32_t roiWord() const
Return packed RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:117
LVL1::JEMRoI::frame
int frame() const
Return RoI frame number (0-7)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:97
LVL1::JEMRoI::s_wordIdBit
static const int s_wordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:55