ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMTobRoI.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_JEMTOBROI_H
5#define TRIGT1CALO_JEMTOBROI_H
6
7#include <stdint.h>
8
9namespace LVL1 {
10
18
19class JEMTobRoI {
20
21 public:
22
23 JEMTobRoI();
24 JEMTobRoI(uint32_t roiWord);
25 JEMTobRoI(int crate, int jem, int frame, int location, int energyLarge,
26 int energySmall);
27
28 ~JEMTobRoI();
29
31 int crate() const;
33 int jem() const;
35 int frame() const;
37 int location() const;
39 int energyLarge() const;
41 int energySmall() const;
42
44 uint32_t roiWord() const;
46 bool setRoiWord(uint32_t roiWord);
47
48 private:
49
51 static const int s_wordIdVal = 0;
52 // Data locations
53 static const int s_wordIdBit = 29;
54 static const int s_crateBit = 28;
55 static const int s_jemBit = 24;
56 static const int s_frameBit = 21;
57 static const int s_locationBit = 19;
58 static const int s_energySmallBit = 10;
59 static const int s_energyLargeBit = 0;
60 // Data masks
61 static const int s_wordIdMask = 0x7;
62 static const int s_crateMask = 0x1;
63 static const int s_jemMask = 0xf;
64 static const int s_frameMask = 0x7;
65 static const int s_locationMask = 0x3;
66 static const int s_energySmallMask = 0x1ff;
67 static const int s_energyLargeMask = 0x3ff;
68
70 uint32_t m_roiWord;
71
72};
73
74inline int JEMTobRoI::crate() const
75{
76 return (m_roiWord >> s_crateBit) & s_crateMask;
77}
78
79inline int JEMTobRoI::jem() const
80{
81 return (m_roiWord >> s_jemBit) & s_jemMask;
82}
83
84inline int JEMTobRoI::frame() const
85{
86 return (m_roiWord >> s_frameBit) & s_frameMask;
87}
88
89inline int JEMTobRoI::location() const
90{
92}
93
94inline int JEMTobRoI::energyLarge() const
95{
97}
98
99inline int JEMTobRoI::energySmall() const
100{
102}
103
104inline uint32_t JEMTobRoI::roiWord() const
105{
106 return m_roiWord;
107}
108
109} // end namespace
110
111#ifndef JEMTobRoI_ClassDEF_H
113#endif
114
115#endif
int location() const
Return location (RoI local coords) (0-3)
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition JEMTobRoI.cxx:55
uint32_t roiWord() const
Return packed RoI word.
int frame() const
Return RoI frame number (0-7)
int energyLarge() const
Return energy large window size.
int energySmall() const
Return energy small window size.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...