ATLAS Offline Software
Loading...
Searching...
No Matches
eFexEMRoI_v1.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2025 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):
12extern "C" {
13# include <stdint.h>
14}
15#include <vector>
16#include <string>
17
18// xAOD include(s):
20
21namespace xAOD {
22
34
35 public:
38
41 void initialize( unsigned int eFexNumber, unsigned int shelf, uint32_t word0 );
44
47 xTOB = 0,
48 TOB = 1
49 };
50
52 uint32_t word0() const;
53 uint32_t word1() const;
55 void setWord0( uint32_t value );
56 void setWord1( uint32_t value );
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
90 void setRetaCore( uint16_t value);
91 void setRetaEnv( uint16_t value);
92 void setRhadEM( uint16_t value);
93 void setRhadHad( uint16_t value);
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. Usually 0 or 1, but can be 12 for Surface Test Facility.
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
165
166 // Data locations within word
167 static const int s_fpgaBit = 30;
168 static const int s_etaBit = 27;
169 static const int s_phiBit = 24;
170 static const int s_veto3Bit = 22;
171 static const int s_veto2Bit = 20;
172 static const int s_veto1Bit = 18;
173 static const int s_seedBit = 16;
174 static const int s_updownBit = 15;
175 static const int s_maxBit = 14;
176 static const int s_etBit = 0;
177 static const int s_etBitXTOB = 2;
178 static const int s_bcn4Bit = 28;
179 static const int s_shelfBit = 24;
180 static const int s_eFexBit = 20;
181
182 // Data masks
183 static const int s_fpgaMask = 0x3;
184 static const int s_etaMask = 0x7;
185 static const int s_phiMask = 0x7;
186 static const int s_veto1Mask = 0x3;
187 static const int s_veto2Mask = 0x3;
188 static const int s_veto3Mask = 0x3;
189 static const int s_seedMask = 0x3;
190 static const int s_updownMask = 0x1;
191 static const int s_maxMask = 0x1;
192 static const int s_etMask = 0xfff;
193 static const int s_etFullMask = 0xffff;
194 static const int s_bcn4Mask = 0xf;
195 static const int s_eFexMask = 0xf;
196 static const int s_shelfMask = 0xf;
197 // For decoding coordinates
198 //
199 static const int s_numPhi = 64;
200 static const int s_eFexPhiMask = 0xf;
201 static const int s_eFexPhiBit = 0;
202 static const int s_eFexPhiWidth = 8;
203 static const int s_eFexPhiOffset = 2;
204 static const int s_eFexEtaMask = 0xf;
205 static const int s_eFexEtaBit = 4;
206 static const int s_eFexEtaWidth = 16;
207 static const int s_fpgaEtaWidth = 4;
208 static const int s_shelfPhiWidth = 4;
209 static const int s_minEta = -25;
210
211
212 }; // class eFexEMRoI_v1
213
214} // namespace xAOD
215
216// Declare the inheritance of the type:
217#include "xAODCore/BaseInfo.h"
219
220#endif // XAODTRIGGER_VERSIONS_EFEXEMROI_V1_H
Base class for elements of a container that can have aux data.
#define SG_BASE(D, B)
Declare that class D derives from class B.
Base class for elements of a container that can have aux data.
Definition AuxElement.h:483
Class describing a LVL1 eFEX EM region of interest.
void setEt(float value)
floating point value (MeV, TOB scale)
float et() const
TOB ET (decoded from TOB, stored for convenience)
static const int s_numPhi
static const int s_updownMask
unsigned int shelfNumber() const
void setWstotNumerator(uint16_t value)
static const float s_xTobEtScale
uint16_t WstotDenominator() const
uint32_t word0() const
The "raw" 32-bit words describing the e/gamma candidate.
float eta() const
setter for the above
void setPhi(float value)
Floating point, ATLAS phi convention (-pi -> pi)
static const float s_tobEtScale
Constants used in converting to ATLAS units.
static const int s_fpgaMask
static const int s_seedMask
static const int s_seedBit
static const int s_eFexEtaMask
unsigned int eFexNumber() const
Methods to decode data from the TOB/RoI and return to the user.
uint16_t RetaEnv() const
uint16_t WstotNumerator() const
void setWord1(uint32_t value)
uint16_t RetaCore() const
Actual values used in algorithm (setters and getters)
static const int s_etaBit
static const int s_veto3Mask
static const int s_eFexPhiMask
unsigned int bcn4() const
static const int s_phiMask
unsigned int RetaThresholds() const
Jet Discriminant 1 (R_eta) results.
void setRetaEnv(uint16_t value)
unsigned int WstotThresholds() const
Jet Discriminant 3 (W_stot) results.
uint16_t RhadHad() const
float Reta() const
Jet Discriminants Derived floating point values (not used in actual algorithm)
static const int s_etBitXTOB
static const int s_etFullMask
static const int s_etBit
unsigned int fpga() const
FPGA number.
static const int s_eFexEtaBit
unsigned int fpgaPhi() const
phi index within FPGA
static const int s_fpgaBit
Constants used in decoding TOB words For TOB word format changes these can be replaced by arrays in t...
static const int s_veto2Mask
static const int s_eFexPhiOffset
static const int s_bcn4Bit
void setWord0(uint32_t value)
Set the "raw" 32-bit words describing the e/gamma candidate.
unsigned int fpgaEta() const
eta index within FPGA
static const int s_minEta
int iPhi() const
Setter for the above.
static const int s_shelfPhiWidth
static const int s_etaMask
float phi() const
Seed supercell index within central tower (0 -> 3)
static const int s_shelfBit
void setRhadHad(uint16_t value)
static const int s_phiBit
static const int s_updownBit
static const int s_eFexPhiWidth
void setWstotDenominator(uint16_t value)
static const int s_maxMask
unsigned int RhadThresholds() const
Jet Discriminant 2 (R_had) results.
static const int s_shelfMask
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
static const int s_veto3Bit
static const int s_veto1Bit
static const int s_veto2Bit
unsigned int seedMax() const
Seed = max flag. Is this really useful?
static const int s_veto1Mask
unsigned int UpNotDown() const
Cluster up/down flag (1 = up, 0 = down)
float Wstot() const
void setRetaCore(uint16_t value)
static const int s_etMask
uint16_t RhadEM() const
int iEta() const
setter for the above
static const int s_fpgaEtaWidth
static const int s_bcn4Mask
int iEtaTopo() const
Getter for integer phi index (0-63)
uint32_t word1() const
char isTOB() const
Is this one a TOB (or xTOB partner of a TOB)?
static const int s_eFexMask
static const int s_eFexPhiBit
void setEta(float value)
Getter for floating point, full precision (0.025) eta.
static const int s_eFexBit
unsigned int seed() const
getter for integer eta index (-25->+24)
static const float s_towerEtaWidth
static const int s_maxBit
ObjectType type() const
Data decoded from the TOB/RoI word and eFEX number.
ObjectType
Object types.
@ xTOB
This object is an xTOB (2*32 bit words)
@ TOB
This object is a TOB (1*32 bit word)
eFexEMRoI_v1()
Default constructor.
void setRhadEM(uint16_t value)
static const int s_eFexEtaWidth
unsigned int etXTOB() const
Cluster ET (xTOB ET scale, 25 MeV/count)
uint32_t tobWord() const
Return TOB word corresponding to this TOB or xTOB.
int iPhiTopo() const
Return phi index in the range used by L1Topo (0->127)
void setIsTOB(char value)
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setWord1 uint16_t
setEventNumber uint32_t
void initialize()