ATLAS Offline Software
eFexEMRoI_v1.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: eFexEMRoI_v1.h 1 2019-06-30 12:15:18 watsona $
8 #ifndef XAODTRIGGER_VERSIONS_EFEXEMROI_V1_H
9 #define XAODTRIGGER_VERSIONS_EFEXEMROI_V1_H
10 
11 // System include(s):
12 extern "C" {
13 # include <stdint.h>
14 }
15 #include <vector>
16 #include <string>
17 
18 // xAOD include(s):
20 
21 namespace xAOD {
22 
33  class eFexEMRoI_v1 : public SG::AuxElement {
34 
35  public:
37  eFexEMRoI_v1();
38 
41  void initialize( unsigned int eFexNumber, unsigned int shelf, uint32_t word0 );
44 
46  enum ObjectType {
47  xTOB = 0,
48  TOB = 1
49  };
50 
52  uint32_t word0() const;
53  uint32_t word1() const;
57 
59  float et() const;
60  void setEt( float value);
61 
63  float eta() const;
64  void setEta(float value);
65  int iEta() const;
66  unsigned int seed() const;
67 
69  float phi() const;
70  void setPhi( float value);
71  int iPhi() const;
72 
74  int iEtaTopo() const;
75  int iPhiTopo() const;
76 
79  float Reta() const;
80  float Rhad() const;
81  float Wstot() const;
82 
84  uint16_t RetaCore() const;
85  uint16_t RetaEnv() const;
86  uint16_t RhadEM() const;
87  uint16_t RhadHad() const;
96 
98  char isTOB() const;
99  void setIsTOB( char value);
100 
102  uint32_t tobWord() const;
103 
104 
106 
108  ObjectType type() const;
109 
110  // Shelf number
111  unsigned int shelfNumber() const;
112 
113  // eFEX number
114  unsigned int eFexNumber() const;
115 
117  unsigned int fpga() const;
118 
120  unsigned int fpgaEta() const;
121 
123  unsigned int fpgaPhi() const;
124 
126  unsigned int UpNotDown() const;
127 
129  unsigned int etTOB() const;
130 
132  unsigned int etXTOB() const;
133 
135  unsigned int RetaThresholds() const;
136 
138  unsigned int RhadThresholds() const;
139 
141  unsigned int WstotThresholds() const;
142 
144  unsigned int seedMax() const;
145 
146  //? Bunch crossing number (last 4 bits, xTOB only)
147  unsigned int bcn4() const;
148 
149  private:
150 
152  static const float s_tobEtScale;
153  static const float s_xTobEtScale;
154  static const float s_towerEtaWidth;
155 
156 
162  // Data locations within word
163  static const int s_fpgaBit = 30;
164  static const int s_etaBit = 27;
165  static const int s_phiBit = 24;
166  static const int s_veto3Bit = 22;
167  static const int s_veto2Bit = 20;
168  static const int s_veto1Bit = 18;
169  static const int s_seedBit = 16;
170  static const int s_updownBit = 15;
171  static const int s_maxBit = 14;
172  static const int s_etBit = 0;
173  static const int s_etBitXTOB = 2;
174  static const int s_bcn4Bit = 28;
175  static const int s_shelfBit = 24;
176  static const int s_eFexBit = 20;
177 
178  // Data masks
179  static const int s_fpgaMask = 0x3;
180  static const int s_etaMask = 0x7;
181  static const int s_phiMask = 0x7;
182  static const int s_veto1Mask = 0x3;
183  static const int s_veto2Mask = 0x3;
184  static const int s_veto3Mask = 0x3;
185  static const int s_seedMask = 0x3;
186  static const int s_updownMask = 0x1;
187  static const int s_maxMask = 0x1;
188  static const int s_etMask = 0xfff;
189  static const int s_etFullMask = 0xffff;
190  static const int s_bcn4Mask = 0xf;
191  static const int s_eFexMask = 0xf;
192  static const int s_shelfMask = 0xf;
193  // For decoding coordinates
194  //
195  static const int s_numPhi = 64;
196  static const int s_eFexPhiMask = 0xf;
197  static const int s_eFexPhiBit = 0;
198  static const int s_eFexPhiWidth = 8;
199  static const int s_eFexPhiOffset = 2;
200  static const int s_eFexEtaMask = 0xf;
201  static const int s_eFexEtaBit = 4;
202  static const int s_eFexEtaWidth = 16;
203  static const int s_fpgaEtaWidth = 4;
204  static const int s_shelfPhiWidth = 4;
205  static const int s_minEta = -25;
206 
207 
208  }; // class eFexEMRoI_v1
209 
210 } // namespace xAOD
211 
212 // Declare the inheritance of the type:
213 #include "xAODCore/BaseInfo.h"
215 
216 #endif // XAODTRIGGER_VERSIONS_EFEXEMROI_V1_H
xAOD::eFexEMRoI_v1::Rhad
float Rhad() const
Definition: eFexEMRoI_v1.cxx:213
xAOD::eFexEMRoI_v1::s_shelfPhiWidth
static const int s_shelfPhiWidth
Definition: eFexEMRoI_v1.h:204
xAOD::eFexEMRoI_v1::isTOB
char isTOB() const
Is this one a TOB (or xTOB partner of a TOB)?
xAOD::eFexEMRoI_v1::iEta
int iEta() const
setter for the above
Definition: eFexEMRoI_v1.cxx:243
xAOD::eFexEMRoI_v1::WstotDenominator
uint16_t WstotDenominator() const
xAOD::eFexEMRoI_v1::s_etaBit
static const int s_etaBit
Definition: eFexEMRoI_v1.h:164
xAOD::eFexEMRoI_v1::iEtaTopo
int iEtaTopo() const
Getter for integer phi index (0-63)
Definition: eFexEMRoI_v1.cxx:262
xAOD::eFexEMRoI_v1::s_fpgaMask
static const int s_fpgaMask
Definition: eFexEMRoI_v1.h:179
xAOD::eFexEMRoI_v1::s_shelfMask
static const int s_shelfMask
Definition: eFexEMRoI_v1.h:192
xAOD::eFexEMRoI_v1::s_minEta
static const int s_minEta
Definition: eFexEMRoI_v1.h:205
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:446
xAOD::eFexEMRoI_v1::xTOB
@ xTOB
This object is an xTOB (2*32 bit words)
Definition: eFexEMRoI_v1.h:47
xAOD::eFexEMRoI_v1::Reta
float Reta() const
Jet Discriminants Derived floating point values (not used in actual algorithm)
Definition: eFexEMRoI_v1.cxx:207
xAOD::eFexEMRoI_v1::eFexNumber
unsigned int eFexNumber() const
Methods to decode data from the TOB/RoI and return to the user.
Definition: eFexEMRoI_v1.cxx:116
xAOD::eFexEMRoI_v1::s_eFexPhiMask
static const int s_eFexPhiMask
Definition: eFexEMRoI_v1.h:196
BaseInfo.h
athena.value
value
Definition: athena.py:122
xAOD::eFexEMRoI_v1::s_updownMask
static const int s_updownMask
Definition: eFexEMRoI_v1.h:186
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::eFexEMRoI_v1::etXTOB
unsigned int etXTOB() const
Cluster ET (xTOB ET scale, 25 MeV/count)
Definition: eFexEMRoI_v1.cxx:171
xAOD::eFexEMRoI_v1::s_eFexMask
static const int s_eFexMask
Definition: eFexEMRoI_v1.h:191
xAOD::eFexEMRoI_v1
Class describing a LVL1 eFEX EM region of interest.
Definition: eFexEMRoI_v1.h:33
xAOD::eFexEMRoI_v1::s_tobEtScale
static const float s_tobEtScale
Constants used in converting to ATLAS units.
Definition: eFexEMRoI_v1.h:152
xAOD::eFexEMRoI_v1::setWstotNumerator
void setWstotNumerator(uint16_t value)
xAOD::eFexEMRoI_v1::setRhadEM
void setRhadEM(uint16_t value)
xAOD::eFexEMRoI_v1::TOB
@ TOB
This object is a TOB (1*32 bit word)
Definition: eFexEMRoI_v1.h:48
xAOD::eFexEMRoI_v1::s_eFexEtaWidth
static const int s_eFexEtaWidth
Definition: eFexEMRoI_v1.h:202
xAOD::eFexEMRoI_v1::s_veto2Bit
static const int s_veto2Bit
Definition: eFexEMRoI_v1.h:167
xAOD::eFexEMRoI_v1::s_etBitXTOB
static const int s_etBitXTOB
Definition: eFexEMRoI_v1.h:173
xAOD::eFexEMRoI_v1::s_eFexPhiOffset
static const int s_eFexPhiOffset
Definition: eFexEMRoI_v1.h:199
xAOD::eFexEMRoI_v1::s_veto1Bit
static const int s_veto1Bit
Definition: eFexEMRoI_v1.h:168
xAOD::eFexEMRoI_v1::setRetaEnv
void setRetaEnv(uint16_t value)
xAOD::eFexEMRoI_v1::RhadHad
uint16_t RhadHad() const
xAOD::eFexEMRoI_v1::s_eFexPhiBit
static const int s_eFexPhiBit
Definition: eFexEMRoI_v1.h:197
SG_BASE
SG_BASE(xAOD::eFexEMRoI_v1, SG::AuxElement)
xAOD::eFexEMRoI_v1::word0
uint32_t word0() const
The "raw" 32-bit words describing the e/gamma candidate.
xAOD::eFexEMRoI_v1::s_eFexEtaMask
static const int s_eFexEtaMask
Definition: eFexEMRoI_v1.h:200
xAOD::eFexEMRoI_v1::s_etFullMask
static const int s_etFullMask
Definition: eFexEMRoI_v1.h:189
xAOD::eFexEMRoI_v1::iPhi
int iPhi() const
Setter for the above.
Definition: eFexEMRoI_v1.cxx:227
xAOD::eFexEMRoI_v1::fpgaPhi
unsigned int fpgaPhi() const
phi index within FPGA
Definition: eFexEMRoI_v1.cxx:140
xAOD::eFexEMRoI_v1::initialize
void initialize(unsigned int eFexNumber, unsigned int shelf, uint32_t word0)
Initialise the object with its most important properties TOB initialiser.
Definition: eFexEMRoI_v1.cxx:27
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
xAOD::eFexEMRoI_v1::setIsTOB
void setIsTOB(char value)
xAOD::eFexEMRoI_v1::RetaThresholds
unsigned int RetaThresholds() const
Jet Discriminant 1 (R_eta) results.
Definition: eFexEMRoI_v1.cxx:177
xAOD::eFexEMRoI_v1::type
ObjectType type() const
Data decoded from the TOB/RoI word and eFEX number.
Definition: eFexEMRoI_v1.cxx:126
xAOD::eFexEMRoI_v1::word1
uint32_t word1() const
xAOD::eFexEMRoI_v1::eFexEMRoI_v1
eFexEMRoI_v1()
Default constructor.
Definition: eFexEMRoI_v1.cxx:22
xAOD::eFexEMRoI_v1::iPhiTopo
int iPhiTopo() const
Return phi index in the range used by L1Topo (0->127)
Definition: eFexEMRoI_v1.cxx:254
xAOD::eFexEMRoI_v1::s_veto2Mask
static const int s_veto2Mask
Definition: eFexEMRoI_v1.h:183
xAOD::eFexEMRoI_v1::s_maxBit
static const int s_maxBit
Definition: eFexEMRoI_v1.h:171
xAOD::eFexEMRoI_v1::s_eFexBit
static const int s_eFexBit
Definition: eFexEMRoI_v1.h:176
xAOD::eFexEMRoI_v1::s_eFexPhiWidth
static const int s_eFexPhiWidth
Definition: eFexEMRoI_v1.h:198
xAOD::eFexEMRoI_v1::s_seedMask
static const int s_seedMask
Definition: eFexEMRoI_v1.h:185
xAOD::eFexEMRoI_v1::setPhi
void setPhi(float value)
Floating point, ATLAS phi convention (-pi -> pi)
xAOD::eFexEMRoI_v1::s_veto3Mask
static const int s_veto3Mask
Definition: eFexEMRoI_v1.h:184
xAOD::eFexEMRoI_v1::s_updownBit
static const int s_updownBit
Definition: eFexEMRoI_v1.h:170
xAOD::eFexEMRoI_v1::s_seedBit
static const int s_seedBit
Definition: eFexEMRoI_v1.h:169
xAOD::eFexEMRoI_v1::setWstotDenominator
void setWstotDenominator(uint16_t value)
xAOD::eFexEMRoI_v1::s_eFexEtaBit
static const int s_eFexEtaBit
Definition: eFexEMRoI_v1.h:201
xAOD::eFexEMRoI_v1::etTOB
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
Definition: eFexEMRoI_v1.cxx:157
xAOD::eFexEMRoI_v1::et
float et() const
TOB ET (decoded from TOB, stored for convenience)
xAOD::eFexEMRoI_v1::s_numPhi
static const int s_numPhi
Definition: eFexEMRoI_v1.h:195
xAOD::eFexEMRoI_v1::s_veto3Bit
static const int s_veto3Bit
Definition: eFexEMRoI_v1.h:166
xAOD::eFexEMRoI_v1::WstotThresholds
unsigned int WstotThresholds() const
Jet Discriminant 3 (W_stot) results.
Definition: eFexEMRoI_v1.cxx:185
xAOD::eFexEMRoI_v1::s_bcn4Bit
static const int s_bcn4Bit
Definition: eFexEMRoI_v1.h:174
xAOD::eFexEMRoI_v1::ObjectType
ObjectType
Object types.
Definition: eFexEMRoI_v1.h:46
xAOD::eFexEMRoI_v1::tobWord
uint32_t tobWord() const
Return TOB word corresponding to this TOB or xTOB.
Definition: eFexEMRoI_v1.cxx:194
xAOD::eFexEMRoI_v1::s_maxMask
static const int s_maxMask
Definition: eFexEMRoI_v1.h:187
xAOD::eFexEMRoI_v1::fpgaEta
unsigned int fpgaEta() const
eta index within FPGA
Definition: eFexEMRoI_v1.cxx:136
xAOD::eFexEMRoI_v1::setWord0
void setWord0(uint32_t value)
Set the "raw" 32-bit words describing the e/gamma candidate.
xAOD::eFexEMRoI_v1::s_etaMask
static const int s_etaMask
Definition: eFexEMRoI_v1.h:180
xAOD::eFexEMRoI_v1::s_towerEtaWidth
static const float s_towerEtaWidth
Definition: eFexEMRoI_v1.h:154
xAOD::eFexEMRoI_v1::eta
float eta() const
setter for the above
xAOD::eFexEMRoI_v1::s_xTobEtScale
static const float s_xTobEtScale
Definition: eFexEMRoI_v1.h:153
xAOD::eFexEMRoI_v1::RetaCore
uint16_t RetaCore() const
Actual values used in algorithm (setters and getters)
xAOD::eFexEMRoI_v1::s_etMask
static const int s_etMask
Definition: eFexEMRoI_v1.h:188
xAOD::eFexEMRoI_v1::s_veto1Mask
static const int s_veto1Mask
Definition: eFexEMRoI_v1.h:182
xAOD::eFexEMRoI_v1::seedMax
unsigned int seedMax() const
Seed = max flag. Is this really useful?
Definition: eFexEMRoI_v1.cxx:152
xAOD::eFexEMRoI_v1::setWord1
void setWord1(uint32_t value)
xAOD::eFexEMRoI_v1::s_phiMask
static const int s_phiMask
Definition: eFexEMRoI_v1.h:181
xAOD::eFexEMRoI_v1::s_fpgaEtaWidth
static const int s_fpgaEtaWidth
Definition: eFexEMRoI_v1.h:203
xAOD::eFexEMRoI_v1::WstotNumerator
uint16_t WstotNumerator() const
xAOD::eFexEMRoI_v1::seed
unsigned int seed() const
getter for integer eta index (-25->+24)
Definition: eFexEMRoI_v1.cxx:148
xAOD::eFexEMRoI_v1::s_bcn4Mask
static const int s_bcn4Mask
Definition: eFexEMRoI_v1.h:190
xAOD::eFexEMRoI_v1::s_fpgaBit
static const int s_fpgaBit
Constants used in decoding TOB words For TOB word format changes these can be replaced by arrays in t...
Definition: eFexEMRoI_v1.h:163
xAOD::eFexEMRoI_v1::setRhadHad
void setRhadHad(uint16_t value)
xAOD::eFexEMRoI_v1::bcn4
unsigned int bcn4() const
Definition: eFexEMRoI_v1.cxx:189
xAOD::eFexEMRoI_v1::shelfNumber
unsigned int shelfNumber() const
Shelf number.
Definition: eFexEMRoI_v1.cxx:121
xAOD::eFexEMRoI_v1::UpNotDown
unsigned int UpNotDown() const
Cluster up/down flag (1 = up, 0 = down)
Definition: eFexEMRoI_v1.cxx:144
xAOD::eFexEMRoI_v1::s_etBit
static const int s_etBit
Definition: eFexEMRoI_v1.h:172
xAOD::eFexEMRoI_v1::s_shelfBit
static const int s_shelfBit
Definition: eFexEMRoI_v1.h:175
xAOD::eFexEMRoI_v1::Wstot
float Wstot() const
Definition: eFexEMRoI_v1.cxx:219
xAOD::eFexEMRoI_v1::setRetaCore
void setRetaCore(uint16_t value)
xAOD::eFexEMRoI_v1::RhadThresholds
unsigned int RhadThresholds() const
Jet Discriminant 2 (R_had) results.
Definition: eFexEMRoI_v1.cxx:181
xAOD::eFexEMRoI_v1::phi
float phi() const
Seed supercell index within central tower (0 -> 3)
xAOD::eFexEMRoI_v1::fpga
unsigned int fpga() const
FPGA number.
Definition: eFexEMRoI_v1.cxx:132
xAOD::eFexEMRoI_v1::RetaEnv
uint16_t RetaEnv() const
xAOD::eFexEMRoI_v1::setEt
void setEt(float value)
floating point value (MeV, TOB scale)
xAOD::eFexEMRoI_v1::setEta
void setEta(float value)
Getter for floating point, full precision (0.025) eta.
xAOD::eFexEMRoI_v1::RhadEM
uint16_t RhadEM() const
xAOD::eFexEMRoI_v1::s_phiBit
static const int s_phiBit
Definition: eFexEMRoI_v1.h:165
AuxElement.h
Base class for elements of a container that can have aux data.