ATLAS Offline Software
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.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_CPMTOBROI_H
5 #define TRIGT1CALO_CPMTOBROI_H
6 
7 #include <stdint.h>
8 
9 namespace LVL1 {
10 
19 class CPMTobRoI {
20 
21  public:
22 
23  CPMTobRoI();
25  CPMTobRoI(int crate, int cpm, int chip, int location, int type,
26  int energy, int isol);
27 
28  ~CPMTobRoI();
29 
31  int crate() const;
33  int cpm() const;
35  int chip() const;
37  int location() const;
39  int type() const;
41  int energy() const;
43  int isolation() const;
44 
46  uint32_t roiWord() const;
49 
50  private:
51 
53  static const unsigned int s_wordIdVal = 0xa;
54  // Data locations
55  static const int s_wordIdBit = 28;
56  static const int s_crateBit = 26;
57  static const int s_cpmBit = 22;
58  static const int s_chipBit = 19;
59  static const int s_locationBit = 16;
60  static const int s_isolBit = 8;
61  static const int s_energyBit = 0;
62  // Data masks
63  static const int s_wordIdMask = 0xf;
64  static const int s_crateMask = 0x3;
65  static const int s_cpmMask = 0xf;
66  static const int s_chipMask = 0x7;
67  static const int s_locationMask = 0x7;
68  static const int s_isolMask = 0x1f;
69  static const int s_energyMask = 0xff;
70  static const int s_typeMask = 0x1;
71 
74 
75 };
76 
77 inline int CPMTobRoI::crate() const
78 {
79  return (m_roiWord >> s_crateBit) & s_crateMask;
80 }
81 
82 inline int CPMTobRoI::cpm() const
83 {
84  return (m_roiWord >> s_cpmBit) & s_cpmMask;
85 }
86 
87 inline int CPMTobRoI::chip() const
88 {
89  return (m_roiWord >> s_chipBit) & s_chipMask;
90 }
91 
92 inline int CPMTobRoI::location() const
93 {
95 }
96 
97 inline int CPMTobRoI::type() const
98 {
99  return (m_roiWord >> s_wordIdBit) & s_typeMask;
100 }
101 
102 inline int CPMTobRoI::energy() const
103 {
104  return (m_roiWord >> s_energyBit) & s_energyMask;
105 }
106 
107 inline int CPMTobRoI::isolation() const
108 {
109  return (m_roiWord >> s_isolBit) & s_isolMask;
110 }
111 
113 {
114  return m_roiWord;
115 }
116 
117 } // end namespace
118 
119 #ifndef CPMTobRoI_ClassDEF_H
121 #endif
122 
123 #endif
LVL1::CPMTobRoI::cpm
int cpm() const
Return CPM number (1-14)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:82
LVL1::CPMTobRoI::type
int type() const
Return type em/tau (0/1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:97
LVL1::CPMTobRoI::energy
int energy() const
Return energy.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:102
LVL1::CPMTobRoI::CPMTobRoI
CPMTobRoI()
Definition: CPMTobRoI.cxx:30
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::CPMTobRoI::s_cpmBit
static const int s_cpmBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:57
LVL1::CPMTobRoI::s_wordIdMask
static const int s_wordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:63
LVL1::CPMTobRoI::s_crateMask
static const int s_crateMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:64
LVL1::CPMTobRoI::~CPMTobRoI
~CPMTobRoI()
Definition: CPMTobRoI.cxx:51
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::CPMTobRoI::s_locationMask
static const int s_locationMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:67
LVL1::CPMTobRoI::roiWord
uint32_t roiWord() const
Return packed RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:112
LVL1::CPMTobRoI::s_isolBit
static const int s_isolBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:60
CPMTobRoI_ClassDEF.h
LVL1::CPMTobRoI::s_crateBit
static const int s_crateBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:56
LVL1::CPMTobRoI::s_locationBit
static const int s_locationBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:59
LVL1::CPMTobRoI::s_typeMask
static const int s_typeMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:70
LVL1::CPMTobRoI::crate
int crate() const
Return crate number (0-1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:77
LVL1::CPMTobRoI::chip
int chip() const
Return CP chip number (0-7)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:87
LVL1::CPMTobRoI::s_isolMask
static const int s_isolMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:68
LVL1::CPMTobRoI::s_wordIdBit
static const int s_wordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:55
LVL1::CPMTobRoI
CPM RoI data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:19
LVL1::CPMTobRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition: CPMTobRoI.cxx:57
LVL1::CPMTobRoI::s_chipMask
static const int s_chipMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:66
LVL1::CPMTobRoI::isolation
int isolation() const
Return isolation.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:107
LVL1::CPMTobRoI::m_roiWord
uint32_t m_roiWord
RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:73
LVL1::CPMTobRoI::s_energyBit
static const int s_energyBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:61
LVL1::CPMTobRoI::location
int location() const
Return location (RoI local coords) (0-7)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:92
LVL1::CPMTobRoI::s_chipBit
static const int s_chipBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:58
LVL1::CPMTobRoI::s_energyMask
static const int s_energyMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:69
LVL1::CPMTobRoI::s_cpmMask
static const int s_cpmMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:65
LVL1::CPMTobRoI::s_wordIdVal
static const unsigned int s_wordIdVal
RoI word ID.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTobRoI.h:53