ATLAS Offline Software
Loading...
Searching...
No Matches
FEXAlgoSpaceDefs.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5//***************************************************************************
6// FEXAlgoSpaceDefs.h -
7// -------------------
8// begin : 08 02 2021
9// email : jacob.julian.kempster@cern.ch
10// ***************************************************************************/
11
12#ifndef FEXAlgoSpaceDefs_H
13#define FEXAlgoSpaceDefs_H
14
15#include <array>
16
17namespace LVL1 {
18
19 //Doxygen class description below:
22
24
25 public:
26
27 constexpr static int jFEX_wide_algoSpace_width = 45;
28 constexpr static int jFEX_thin_algoSpace_width = 24;
29 constexpr static int jFEX_algoSpace_height = 32;
30
31
32//Array breakdown of jFEX_wide_algoSpace_width matric to indicate different eta and phi regions
33
34 constexpr static int jFEX_FCAL1_start = 700000;
35 constexpr static int jFEX_FCAL2_start = 900000;
36 constexpr static int jFEX_FCAL3_start = 1100000;
37
38 //Pileup bitshifts
39 constexpr static unsigned int pu_AreaINV = 6;
40 constexpr static unsigned int pu_Area = 11;
41 constexpr static unsigned int pu_rhoLUT = 20;
42
43
44//A side (jFEX Module 5):
45
46 //Eta space for core area
47 constexpr static int jFEX_algoSpace_A_EMB_eta = 8;
48 constexpr static int jFEX_algoSpace_A_EMIE_eta = 17;
49 constexpr static int jFEX_algoSpace_A_FCAL_start_eta = 21;
50 constexpr static int jFEX_algoSpace_A_FCAL_end_eta = 33;
51
52 //Eta space for core and overlaps, EM only
53 constexpr static int jFEX_algoSpace_A_lowerEM_eta = 0;
54 constexpr static int jFEX_algoSpace_A_upperEM_eta = 33;
55
56 //Eta space for core and overlaps, FCAL 2 (33-40) and 3 (41-44)
57 constexpr static int jFEX_algoSpace_A_lowerFCAL_eta = 33;
58 constexpr static int jFEX_algoSpace_A_upperFCAL2_eta = 41;
59 constexpr static int jFEX_algoSpace_A_upperFCAL_eta = 45;
60
61//C side (jFEX module 0):
62//there are more values on the C side as the matrix cannot be flipped in the bitwise framework.
63
64 //Eta space for core area
65 constexpr static int jFEX_algoSpace_C_EMB_start_eta = 28;
66 constexpr static int jFEX_algoSpace_C_EMB_end_eta = 37;
67 constexpr static int jFEX_algoSpace_C_EMIE_start_eta = 24;
68 constexpr static int jFEX_algoSpace_C_EMIE_end_eta = 28;
69 constexpr static int jFEX_algoSpace_C_FCAL_start_eta = 12;
70 constexpr static int jFEX_algoSpace_C_FCAL_end_eta = 24;
71
72 //Eta space for core and overlaps, EM only
73 constexpr static int jFEX_algoSpace_C_lowerEM_eta = 12;
74 constexpr static int jFEX_algoSpace_C_upperEM_eta = 45;
75
76 //Eta space for core and overlaps, FCAL 2 (4-11) and 3 (0-3)
77 constexpr static int jFEX_algoSpace_C_lowerFCAL_eta = 0;
78 constexpr static int jFEX_algoSpace_C_lowerFCAL2_eta = 4;
79 constexpr static int jFEX_algoSpace_C_upperFCAL_eta = 12;
80
81 //First and second FCAL 1st layer eta bins
82 constexpr static int jFEX_algoSpace_FCAL1_2nd = 22;
83 constexpr static int jFEX_algoSpace_A_FCAL1_1st = 21;
84 constexpr static int jFEX_algoSpace_C_FCAL1_1st = 23;
85
86 //Lowest/highest eta for jFEX Electrons
87 constexpr static int jFEX_algoSpace_A_FwdEl_start = 14;
88 constexpr static int jFEX_algoSpace_C_FwdEl_start = 30;
89
90 //Phi space breakdown
91 constexpr static int jFEX_algoSpace_EMB_start_phi = 8;
92 constexpr static int jFEX_algoSpace_EMB_end_phi = 24;
93 constexpr static int jFEX_algoSpace_EMIE_start_phi = 4;
94 constexpr static int jFEX_algoSpace_EMIE_end_phi = 12;
95 constexpr static int jFEX_algoSpace_FCAL_start_phi = 2;
96 constexpr static int jFEX_algoSpace_FCAL_end_phi = 6;
97
98// JFEX bit shifting in the TOB words
99 // jFEX Taus (jTau)
100 // Data locations within word
101 constexpr static int jTau_isoBit = 21;
102 constexpr static int jTau_etBit = 10;
103 constexpr static int jTau_etaBit = 5;
104 constexpr static int jTau_phiBit = 1;
105 constexpr static int jTau_satBit = 0;
106
107 // jFEX Forward Electrons (jEM)
108 // Data locations within word
109 constexpr static int jEM_resBit = 27;
110 constexpr static int jEM_emf2Bit = 25;
111 constexpr static int jEM_emf1Bit = 23;
112 constexpr static int jEM_isoBit = 21;
113 constexpr static int jEM_etBit = 10;
114 constexpr static int jEM_etaBit = 5;
115 constexpr static int jEM_phiBit = 1;
116 constexpr static int jEM_satBit = 0;
117
118 // jFEX SRJets (jJ)
119 // Data locations within word
120 constexpr static int jJ_resBit = 21;
121 constexpr static int jJ_etBit = 10;
122 constexpr static int jJ_etaBit = 5;
123 constexpr static int jJ_phiBit = 1;
124 constexpr static int jJ_satBit = 0;
125
126 // jFEX LRJets (jLJ)
127 // Data locations within word
128 constexpr static int jLJ_resBit = 23;
129 constexpr static int jLJ_etBit = 10;
130 constexpr static int jLJ_etaBit = 5;
131 constexpr static int jLJ_phiBit = 1;
132 constexpr static int jLJ_satBit = 0;
133
134 // jFEX MET (jXE)
135 // Data locations within word
136 constexpr static int jXE_ResBit = 31;
137 constexpr static int jXE_Ey_Bit = 16;
138 constexpr static int jXE_Ex_Bit = 1;
139 constexpr static int jXE_SatBit = 0;
140
141 // jFEX SumET (jTE)
142 // Data locations within word
143 constexpr static int jTE_Sat_upperBit = 31;
144 constexpr static int jTE_Et_upperBit = 16;
145 constexpr static int jTE_Et_lowerBit = 1;
146 constexpr static int jTE_Sat_lowerBit = 0;
147
148
149 //define constants needed by gFEX Jet algorithm
150 constexpr static int centralNphi = 32;
151 constexpr static int forwardNphi = 16;
152 constexpr static int centralNeta = 12;
153 constexpr static int forwardNeta = 6;
154 constexpr static int totalNeta = 40;
155
156 constexpr static int n_partial = 4;
157 constexpr static int ABCrows = 32;
158 constexpr static int ABcolumns = 12;
159 constexpr static int ABCcolumnsEng = 6;
160 constexpr static int gJetMax = 0x00000FFF; //Corresponds to the maximum value with 12 bits (4095)
161 constexpr static int gBlockMax = 0x00000FFF; //Corresponds to the maximum value with 12 bits (4095)
162 constexpr static int jetThr = 0x001E;
163
164 constexpr static bool ENABLE_INTER_AB = true;
165 constexpr static bool ENABLE_INTER_C = true;
166 constexpr static bool ENABLE_INTER_ABC = false;
167 constexpr static int gJetTOBfib = 6;
168 constexpr static int BTOBFIB = 6;
169 constexpr static bool ENABLE_PUC = true;
170 constexpr static bool APPLY_TRUNC = false;
171 //define constants needed by gFEX JwoJ algorithm
172 constexpr static bool ENABLE_JWOJ_C = false;
173
174 constexpr static int PS_UPPER_AB = 2047;
175 constexpr static int PS_LOWER_AB = -2048;
176 constexpr static int PS_SHIFT_AB = 3;
177 constexpr static int PS_UPPER_C = 511;
178 constexpr static int PS_LOWER_C = -511;
179 constexpr static int PS_SHIFT_C = 3;
180
181 constexpr static int fineCeiling = 255;
182 constexpr static int fineFloor = -256;
183
184 constexpr static std::array<unsigned int, 385> inv19 = {
185 0x00000,0x45000,0x22800,0x17000,0x11400,0x0DCC8,0x0B800,0x09DB0,
186 0x08A00,0x07AA8,0x06E60,0x06458,0x05C00,0x054E8,0x04ED8,0x04998,
187 0x04500,0x040F0,0x03D50,0x03A18,0x03730,0x03490,0x03228,0x03000,
188 0x02E00,0x02C28,0x02A70,0x028E0,0x02768,0x02610,0x024C8,0x02398,
189 0x02280,0x02170,0x02078,0x01F88,0x01EA8,0x01DD0,0x01D08,0x01C48,
190 0x01B98,0x01AE8,0x01A48,0x019A8,0x01910,0x01888,0x01800,0x01778,
191 0x01700,0x01680,0x01610,0x015A0,0x01538,0x014D0,0x01470,0x01410,
192 0x013B0,0x01358,0x01308,0x012B0,0x01260,0x01218,0x011C8,0x01180,
193 0x01140,0x010F8,0x010B8,0x01078,0x01038,0x01000,0x00FC0,0x00F88,
194 0x00F50,0x00F18,0x00EE8,0x00EB8,0x00E80,0x00E50,0x00E20,0x00DF8,
195 0x00DC8,0x00DA0,0x00D70,0x00D48,0x00D20,0x00CF8,0x00CD0,0x00CB0,
196 0x00C88,0x00C60,0x00C40,0x00C20,0x00C00,0x00BD8,0x00BB8,0x00B98,
197 0x00B80,0x00B60,0x00B40,0x00B20,0x00B08,0x00AE8,0x00AD0,0x00AB0,
198 0x00A98,0x00A80,0x00A68,0x00A50,0x00A38,0x00A20,0x00A08,0x009F0,
199 0x009D8,0x009C0,0x009A8,0x00998,0x00980,0x00968,0x00958,0x00940,
200 0x00930,0x00918,0x00908,0x008F8,0x008E0,0x008D0,0x008C0,0x008B0,
201 0x008A0,0x00888,0x00878,0x00868,0x00858,0x00848,0x00838,0x00828,
202 0x00818,0x00808,0x00800,0x007F0,0x007E0,0x007D0,0x007C0,0x007B8,
203 0x007A8,0x00798,0x00788,0x00780,0x00770,0x00768,0x00758,0x00748,
204 0x00740,0x00730,0x00728,0x00718,0x00710,0x00708,0x006F8,0x006F0,
205 0x006E0,0x006D8,0x006D0,0x006C0,0x006B8,0x006B0,0x006A0,0x00698,
206 0x00690,0x00688,0x00678,0x00670,0x00668,0x00660,0x00658,0x00648,
207 0x00640,0x00638,0x00630,0x00628,0x00620,0x00618,0x00610,0x00608,
208 0x00600,0x005F0,0x005E8,0x005E0,0x005D8,0x005D0,0x005C8,0x005C0,
209 0x005C0,0x005B8,0x005B0,0x005A8,0x005A0,0x00598,0x00590,0x00588,
210 0x00580,0x00578,0x00574,0x00570,0x00568,0x00560,0x00558,0x00550,
211 0x0054C,0x00548,0x00540,0x00538,0x00530,0x0052C,0x00528,0x00520,
212 0x00518,0x00514,0x00510,0x00508,0x00500,0x004FC,0x004F8,0x004F0,
213 0x004EC,0x004E8,0x004E0,0x004D8,0x004D4,0x004D0,0x004C8,0x004C4,
214 0x004C0,0x004B8,0x004B4,0x004B0,0x004AC,0x004A8,0x004A0,0x0049C,
215 0x00498,0x00490,0x0048C,0x00488,0x00484,0x00480,0x0047C,0x00478,
216 0x00470,0x0046C,0x00468,0x00464,0x00460,0x0045C,0x00458,0x00454,
217 0x00450,0x00448,0x00444,0x00440,0x0043C,0x00438,0x00434,0x00430,
218 0x0042C,0x00428,0x00424,0x00420,0x0041C,0x00418,0x00414,0x00410,
219 0x0040C,0x00408,0x00405,0x00402,0x00400,0x003FC,0x003F8,0x003F4,
220 0x003F0,0x003EC,0x003E8,0x003E4,0x003E0,0x003DD,0x003DA,0x003D8,
221 0x003D4,0x003D0,0x003CC,0x003C8,0x003C5,0x003C2,0x003C0,0x003BC,
222 0x003B8,0x003B5,0x003B2,0x003B0,0x003AC,0x003A8,0x003A5,0x003A2,
223 0x003A0,0x0039D,0x0039A,0x00398,0x00394,0x00390,0x0038D,0x0038A,
224 0x00388,0x00385,0x00382,0x00380,0x0037D,0x0037A,0x00378,0x00375,
225 0x00372,0x00370,0x0036D,0x0036A,0x00368,0x00365,0x00362,0x00360,
226 0x0035D,0x0035A,0x00358,0x00355,0x00352,0x00350,0x0034D,0x0034A,
227 0x00348,0x00345,0x00342,0x00340,0x0033D,0x0033A,0x00338,0x00336,
228 0x00334,0x00332,0x00330,0x0032D,0x0032A,0x00328,0x00326,0x00324,
229 0x00322,0x00320,0x0031D,0x0031A,0x00318,0x00316,0x00314,0x00312,
230 0x00310,0x0030E,0x0030C,0x0030A,0x00308,0x00306,0x00304,0x00302,
231 0x00300,0x002FD,0x002FA,0x002F8,0x002F6,0x002F4,0x002F2,0x002F0,
232 0x002EE,0x002EC,0x002EA,0x002E8,0x002E6,0x002E5,0x002E3,0x002E1,
233 0x002E0};
234
235
236 };
237
238} // end of namespace
239
240#endif
The FEXAlgoSpaceDefs class defines the size of a single jFEX algorithm window, for use in jFEXFPGA.
static constexpr int jEM_phiBit
static constexpr int centralNphi
static constexpr int jTE_Et_upperBit
static constexpr int PS_UPPER_AB
static constexpr int jTE_Sat_upperBit
static constexpr int jJ_satBit
static constexpr int jetThr
static constexpr int gJetMax
static constexpr int jFEX_algoSpace_A_FCAL1_1st
static constexpr int jEM_emf1Bit
static constexpr int jFEX_algoSpace_C_EMB_start_eta
static constexpr int ABCrows
static constexpr int jFEX_wide_algoSpace_width
static constexpr int jFEX_algoSpace_A_FCAL_end_eta
static constexpr int jFEX_algoSpace_C_EMB_end_eta
static constexpr std::array< unsigned int, 385 > inv19
static constexpr int jFEX_algoSpace_EMIE_end_phi
static constexpr int jFEX_algoSpace_C_FCAL_end_eta
static constexpr int jFEX_algoSpace_A_upperEM_eta
static constexpr int fineCeiling
static constexpr int jJ_phiBit
static constexpr int jLJ_phiBit
static constexpr unsigned int pu_AreaINV
static constexpr int BTOBFIB
static constexpr int jEM_etBit
static constexpr int fineFloor
static constexpr int jFEX_algoSpace_A_upperFCAL_eta
static constexpr int jEM_satBit
static constexpr bool ENABLE_INTER_AB
static constexpr int jFEX_algoSpace_A_EMB_eta
static constexpr unsigned int pu_Area
static constexpr unsigned int pu_rhoLUT
static constexpr int gJetTOBfib
static constexpr int jFEX_algoSpace_A_lowerFCAL_eta
static constexpr bool APPLY_TRUNC
static constexpr int jFEX_algoSpace_A_FCAL_start_eta
static constexpr int forwardNphi
static constexpr int centralNeta
static constexpr int jTE_Et_lowerBit
static constexpr int jFEX_algoSpace_C_upperEM_eta
static constexpr int jFEX_algoSpace_C_FCAL_start_eta
static constexpr int jFEX_algoSpace_A_EMIE_eta
static constexpr bool ENABLE_INTER_ABC
static constexpr bool ENABLE_JWOJ_C
static constexpr int jFEX_algoSpace_A_lowerEM_eta
static constexpr int jLJ_etaBit
static constexpr int jTau_phiBit
static constexpr int jLJ_etBit
static constexpr int jEM_emf2Bit
static constexpr int n_partial
static constexpr int jFEX_algoSpace_FCAL_end_phi
static constexpr bool ENABLE_INTER_C
static constexpr int PS_SHIFT_C
static constexpr int gBlockMax
static constexpr int jFEX_algoSpace_C_FCAL1_1st
static constexpr int jEM_resBit
static constexpr int jFEX_FCAL1_start
static constexpr int jXE_ResBit
static constexpr int PS_LOWER_C
static constexpr int forwardNeta
static constexpr int jFEX_algoSpace_EMB_end_phi
static constexpr int jJ_etBit
static constexpr int jXE_SatBit
static constexpr int jEM_isoBit
static constexpr int totalNeta
static constexpr int jLJ_resBit
static constexpr int jJ_resBit
static constexpr int jFEX_algoSpace_A_FwdEl_start
static constexpr bool ENABLE_PUC
static constexpr int ABcolumns
static constexpr int jFEX_algoSpace_C_upperFCAL_eta
static constexpr int jFEX_algoSpace_FCAL1_2nd
static constexpr int jTE_Sat_lowerBit
static constexpr int jFEX_algoSpace_C_lowerFCAL_eta
static constexpr int jFEX_FCAL3_start
static constexpr int jFEX_FCAL2_start
static constexpr int ABCcolumnsEng
static constexpr int jJ_etaBit
static constexpr int jFEX_algoSpace_FCAL_start_phi
static constexpr int PS_SHIFT_AB
static constexpr int jTau_etaBit
static constexpr int jEM_etaBit
static constexpr int jXE_Ey_Bit
static constexpr int jLJ_satBit
static constexpr int jFEX_algoSpace_EMIE_start_phi
static constexpr int PS_LOWER_AB
static constexpr int jTau_satBit
static constexpr int PS_UPPER_C
static constexpr int jFEX_algoSpace_C_FwdEl_start
static constexpr int jFEX_thin_algoSpace_width
static constexpr int jFEX_algoSpace_A_upperFCAL2_eta
static constexpr int jFEX_algoSpace_EMB_start_phi
static constexpr int jFEX_algoSpace_C_lowerFCAL2_eta
static constexpr int jTau_etBit
static constexpr int jTau_isoBit
static constexpr int jFEX_algoSpace_C_lowerEM_eta
static constexpr int jFEX_algoSpace_height
static constexpr int jXE_Ex_Bit
static constexpr int jFEX_algoSpace_C_EMIE_start_eta
static constexpr int jFEX_algoSpace_C_EMIE_end_eta
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...