ATLAS Offline Software
Loading...
Searching...
No Matches
eFexTauRoI_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#ifndef XAODTRIGGER_VERSIONS_EFEXTAUROI_V1_H
8#define XAODTRIGGER_VERSIONS_EFEXTAUROI_V1_H
9
10// System include(s):
11extern "C" {
12# include <stdint.h>
13}
14#include <vector>
15#include <string>
16
17// xAOD include(s):
19
20namespace xAOD {
21
30
31 public:
34
36 void initialize( unsigned int eFexNumber, unsigned int shelf, uint32_t word0 );
38
41 xTOB = 0,
42 TOB = 1
43 };
44
46 enum AlgoType {
48 BDT = 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
58 // Shelf number (decoded from second xTOB word)
59 // Usually 0 or 1, but can be 12 for Surface Test Facility.
60 unsigned int shelfNumber() const;
61
62 // eFEX number (decoded from second xTOB word)
63 unsigned int eFexNumber() const;
64
66 float et() const;
67 void setEt( float value);
68
70 float eta() const;
71 void setEta( float value);
72 int iEta() const;
73 unsigned int seed() const;
74
76 float phi() const;
77 void setPhi( float value);
78 int iPhi() const;
79
81 int iEtaTopo() const;
82 int iPhiTopo() const;
83
86 float rCore() const;
87 float rHad() const;
88
98
100 char isTOB() const;
101 void setIsTOB( char value);
102
104 uint32_t tobWord() const;
105
106
108
110 unsigned int tobVersion() const;
111
113 ObjectType type() const;
114
115
117 unsigned int fpga() const;
118
120 unsigned int fpgaEta() const;
121
123 unsigned int fpgaPhi() const;
124
126 bool upNotDown() const;
127
129 unsigned int etTOB() const;
130
132 unsigned int etXTOB() const;
133
135 unsigned int rCoreThresholds() const;
136
138 unsigned int bdtThresholds() const;
139
141 unsigned int rHadThresholds() const;
142
144 unsigned int tauOneThresholds() const;
145
147 unsigned int tauTwoThresholds() const;
148
150 unsigned int tauThreeThresholds() const;
151
153 bool seedMax() const;
154
155 //? Bunch crossing number (last 4 bits, xTOB only)
156 unsigned int bcn4() const;
157
159 unsigned int bdtScore() const;
160
161 private:
162
165 float computeEta() const;
166
168 static const float s_tobEtScale;
169 static const float s_xTobEtScale;
170 static const float s_towerEtaWidth;
171
172
177
178 // Data locations within word
179 static const int s_fpgaBit = 30;
180 static const int s_etaBit = 27;
181 static const int s_phiBit = 24;
182 static const int s_veto3Bit = 22;
183 static const int s_veto2Bit = 20;
184 static const int s_veto1Bit = 18;
185 static const int s_seedBit = 16;
186 static const int s_updownBit = 15;
187 static const int s_maxBit = 14;
188 static const int s_versionBit = 12;
189 static const int s_etBit = 0;
190 static const int s_etBitXTOB = 2;
191 static const int s_bcn4Bit = 28;
192 static const int s_shelfBit = 24;
193 static const int s_eFexBit = 20;
194 static const int s_bdtScoreBit = 0;
195
196 // Data masks
197 static const int s_fpgaMask = 0x3;
198 static const int s_etaMask = 0x7;
199 static const int s_phiMask = 0x7;
200 static const int s_veto1Mask = 0x3;
201 static const int s_veto2Mask = 0x3;
202 static const int s_veto3Mask = 0x3;
203 static const int s_seedMask = 0x3;
204 static const int s_updownMask = 0x1;
205 static const int s_maxMask = 0x1;
206 static const int s_versionMask = 0x3;
207 static const int s_etMask = 0xfff;
208 static const int s_etFullMask = 0xffff;
209 static const int s_bcn4Mask = 0xf;
210 static const int s_eFexMask = 0xf;
211 static const int s_shelfMask = 0xf;
212 static const int s_bdtScoreMask = 0xfff;
213
214 // For decoding coordinates
215 //
216 static const int s_numPhi = 64;
217 static const int s_eFexPhiMask = 0xf;
218 static const int s_eFexPhiBit = 0;
219 static const int s_eFexPhiWidth = 8;
220 static const int s_eFexPhiOffset = 2;
221 static const int s_eFexEtaMask = 0xf;
222 static const int s_eFexEtaBit = 4;
223 static const int s_eFexEtaWidth = 16;
224 static const int s_fpgaEtaWidth = 4;
225 static const int s_shelfPhiWidth = 4;
226 static const int s_minEta = -25;
227
228 }; // class eFexTauRoI_v1
229
230} // namespace xAOD
231
232// Declare the inheritance of the type:
233#include "xAODCore/BaseInfo.h"
235
236#endif // XAODTRIGGER_VERSIONS_EFEXTAUROI_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 tau region of interest.
static const int s_fpgaBit
Constants used in decoding TOB words For TOB word format changes these can be replaced by arrays in t...
unsigned int tobVersion() const
Data decoded from the TOB/RoI word and eFEX number.
static const int s_etaBit
void setWord0(uint32_t value)
Set the "raw" 32-bit words describing the e/gamma candidate.
static const int s_eFexEtaBit
static const int s_veto2Bit
static const int s_veto2Mask
int iPhi() const
Setter for the above.
uint32_t word0() const
The "raw" 32-bit words describing the e/gamma candidate.
static const int s_bdtScoreBit
static const int s_veto1Bit
ObjectType type() const
Object type (TOB or xTOB)
int iPhiTopo() const
Return phi index in the range used by L1Topo (0->127)
unsigned int shelfNumber() const
static const int s_etBitXTOB
unsigned int eFexNumber() const
eFEX number
static const int s_versionBit
static const int s_etaMask
static const int s_phiBit
static const int s_seedBit
static const int s_seedMask
static const int s_shelfMask
unsigned int bdtThresholds() const
Alternative Tau Condition 1 (BDT) results.
char isTOB() const
Is this one a TOB (or xTOB partner of a TOB)?
unsigned int rHadThresholds() const
Tau Condition 2 (Had/EM) results.
static const int s_shelfBit
unsigned int bdtScore() const
BDT Score (xTOB only)
static const int s_maxMask
uint16_t rHadNumerator() const
static const int s_eFexEtaMask
AlgoType
Tau id algorithm types.
@ BDT
This object is generated by the BDT algorithm.
@ Heuristic
This object is generated by the heuristic algorithm.
static const int s_eFexPhiOffset
static const int s_veto3Bit
static const int s_minEta
static const float s_tobEtScale
Constants used in converting to ATLAS units.
eFexTauRoI_v1()
Default constructor.
float et() const
TOB ET (decoded from TOB, stored for convenience)
int iEta() const
setter for the above
unsigned int fpgaEta() const
eta index within FPGA
float phi() const
Seed supercell index within central tower (0 -> 3)
static const int s_numPhi
unsigned int tauOneThresholds() const
Tau Condition 1 (generic) results.
uint16_t rCoreDenominator() const
static const int s_fpgaEtaWidth
void setRHadNumerator(uint16_t value)
unsigned int seed() const
getter for integer eta index (-25->24)
ObjectType
Object types.
@ xTOB
This object is an xTOB (2*32 bit words)
@ TOB
This object is a TOB (1*32 bit word)
static const float s_towerEtaWidth
void setRCoreNumerator(uint16_t value)
static const int s_etMask
static const float s_xTobEtScale
static const int s_eFexPhiWidth
static const int s_veto1Mask
float rCore() const
Jet Discriminants Derived floating point values (not used in actual algorithm)
uint16_t rCoreNumerator() const
Actual values used in algorithm (setters and getters)
static const int s_updownBit
void setRHadDenominator(uint16_t value)
unsigned int bcn4() const
Last 4 bits of BCN (xTOB only)
void setEta(float value)
Floating point, full precision (0.025)
uint32_t tobWord() const
Return TOB word corresponding to this TOB or xTOB.
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
bool seedMax() const
Seed = max flag. Is this really useful?
static const int s_eFexEtaWidth
float eta() const
setter for the above
static const int s_bdtScoreMask
void setWord1(uint32_t value)
static const int s_etBit
unsigned int tauThreeThresholds() const
Tau Condition 3 (unused) results.
static const int s_eFexPhiMask
static const int s_phiMask
unsigned int etXTOB() const
Cluster ET (xTOB ET scale, 25 MeV/count)
static const int s_bcn4Mask
static const int s_shelfPhiWidth
unsigned int fpgaPhi() const
phi index within FPGA
static const int s_fpgaMask
static const int s_maxBit
int iEtaTopo() const
Getter for integer phi index (0-63)
static const int s_eFexBit
static const int s_veto3Mask
unsigned int fpga() const
FPGA number.
uint16_t rHadDenominator() const
static const int s_versionMask
float computeEta() const
Compute TOB eta.
static const int s_bcn4Bit
void setIsTOB(char value)
unsigned int tauTwoThresholds() const
Tau Condition 2 (generic) results.
static const int s_eFexPhiBit
void setPhi(float value)
Floating point, ATLAS phi convention (-pi -> pi)
void setRCoreDenominator(uint16_t value)
void setEt(float value)
floating point value (MeV, TOB scale)
static const int s_eFexMask
static const int s_updownMask
bool upNotDown() const
Cluster up/down flag (1 = up, 0 = down)
uint32_t word1() const
unsigned int rCoreThresholds() const
Tau Condition 1 (rCore) results.
static const int s_etFullMask
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setWord1 uint16_t
setEventNumber uint32_t
void initialize()