CMS 3D CMS Logo

Phase2L1RCT.h
Go to the documentation of this file.
1 #ifndef L1Trigger_L1CaloTrigger_Phase2L1RCT
2 #define L1Trigger_L1CaloTrigger_Phase2L1RCT
3 
5 
7 // Other emulator helper functions
9 
11  ap_uint<5> Eta = 0x0;
12  ap_uint<5> Phi = 0x0;
13 
15 
16  out.etaStrip0.cr0.energy = temporary[Eta + 0][Phi + 0].energy;
17  out.etaStrip0.cr0.eta = 0;
18  out.etaStrip0.cr0.phi = 0;
19  out.etaStrip0.cr1.energy = temporary[Eta + 0][Phi + 1].energy;
20  out.etaStrip0.cr1.eta = 0;
21  out.etaStrip0.cr1.phi = 1;
22  out.etaStrip0.cr2.energy = temporary[Eta + 0][Phi + 2].energy;
23  out.etaStrip0.cr2.eta = 0;
24  out.etaStrip0.cr2.phi = 2;
25  out.etaStrip0.cr3.energy = temporary[Eta + 0][Phi + 3].energy;
26  out.etaStrip0.cr3.eta = 0;
27  out.etaStrip0.cr3.phi = 3;
28  out.etaStrip0.cr4.energy = temporary[Eta + 0][Phi + 4].energy;
29  out.etaStrip0.cr4.eta = 0;
30  out.etaStrip0.cr4.phi = 4;
31  out.etaStrip0.cr5.energy = temporary[Eta + 0][Phi + 5].energy;
32  out.etaStrip0.cr5.eta = 0;
33  out.etaStrip0.cr5.phi = 5;
34  out.etaStrip0.cr6.energy = temporary[Eta + 0][Phi + 6].energy;
35  out.etaStrip0.cr6.eta = 0;
36  out.etaStrip0.cr6.phi = 6;
37  out.etaStrip0.cr7.energy = temporary[Eta + 0][Phi + 7].energy;
38  out.etaStrip0.cr7.eta = 0;
39  out.etaStrip0.cr7.phi = 7;
40  out.etaStrip0.cr8.energy = temporary[Eta + 0][Phi + 8].energy;
41  out.etaStrip0.cr8.eta = 0;
42  out.etaStrip0.cr8.phi = 8;
43  out.etaStrip0.cr9.energy = temporary[Eta + 0][Phi + 9].energy;
44  out.etaStrip0.cr9.eta = 0;
45  out.etaStrip0.cr9.phi = 9;
46  out.etaStrip0.cr10.energy = temporary[Eta + 0][Phi + 10].energy;
47  out.etaStrip0.cr10.eta = 0;
48  out.etaStrip0.cr10.phi = 10;
49  out.etaStrip0.cr11.energy = temporary[Eta + 0][Phi + 11].energy;
50  out.etaStrip0.cr11.eta = 0;
51  out.etaStrip0.cr11.phi = 11;
52  out.etaStrip0.cr12.energy = temporary[Eta + 0][Phi + 12].energy;
53  out.etaStrip0.cr12.eta = 0;
54  out.etaStrip0.cr12.phi = 12;
55  out.etaStrip0.cr13.energy = temporary[Eta + 0][Phi + 13].energy;
56  out.etaStrip0.cr13.eta = 0;
57  out.etaStrip0.cr13.phi = 13;
58  out.etaStrip0.cr14.energy = temporary[Eta + 0][Phi + 14].energy;
59  out.etaStrip0.cr14.eta = 0;
60  out.etaStrip0.cr14.phi = 14;
61  out.etaStrip0.cr15.energy = temporary[Eta + 0][Phi + 15].energy;
62  out.etaStrip0.cr15.eta = 0;
63  out.etaStrip0.cr15.phi = 15;
64  out.etaStrip0.cr16.energy = temporary[Eta + 0][Phi + 16].energy;
65  out.etaStrip0.cr16.eta = 0;
66  out.etaStrip0.cr16.phi = 16;
67  out.etaStrip0.cr17.energy = temporary[Eta + 0][Phi + 17].energy;
68  out.etaStrip0.cr17.eta = 0;
69  out.etaStrip0.cr17.phi = 17;
70  out.etaStrip0.cr18.energy = temporary[Eta + 0][Phi + 18].energy;
71  out.etaStrip0.cr18.eta = 0;
72  out.etaStrip0.cr18.phi = 18;
73  out.etaStrip0.cr19.energy = temporary[Eta + 0][Phi + 19].energy;
74  out.etaStrip0.cr19.eta = 0;
75  out.etaStrip0.cr19.phi = 19;
76 
77  out.etaStrip1.cr0.energy = temporary[Eta + 1][Phi + 0].energy;
78  out.etaStrip1.cr0.eta = 1;
79  out.etaStrip1.cr0.phi = 0;
80  out.etaStrip1.cr1.energy = temporary[Eta + 1][Phi + 1].energy;
81  out.etaStrip1.cr1.eta = 1;
82  out.etaStrip1.cr1.phi = 1;
83  out.etaStrip1.cr2.energy = temporary[Eta + 1][Phi + 2].energy;
84  out.etaStrip1.cr2.eta = 1;
85  out.etaStrip1.cr2.phi = 2;
86  out.etaStrip1.cr3.energy = temporary[Eta + 1][Phi + 3].energy;
87  out.etaStrip1.cr3.eta = 1;
88  out.etaStrip1.cr3.phi = 3;
89  out.etaStrip1.cr4.energy = temporary[Eta + 1][Phi + 4].energy;
90  out.etaStrip1.cr4.eta = 1;
91  out.etaStrip1.cr4.phi = 4;
92  out.etaStrip1.cr5.energy = temporary[Eta + 1][Phi + 5].energy;
93  out.etaStrip1.cr5.eta = 1;
94  out.etaStrip1.cr5.phi = 5;
95  out.etaStrip1.cr6.energy = temporary[Eta + 1][Phi + 6].energy;
96  out.etaStrip1.cr6.eta = 1;
97  out.etaStrip1.cr6.phi = 6;
98  out.etaStrip1.cr7.energy = temporary[Eta + 1][Phi + 7].energy;
99  out.etaStrip1.cr7.eta = 1;
100  out.etaStrip1.cr7.phi = 7;
101  out.etaStrip1.cr8.energy = temporary[Eta + 1][Phi + 8].energy;
102  out.etaStrip1.cr8.eta = 1;
103  out.etaStrip1.cr8.phi = 8;
104  out.etaStrip1.cr9.energy = temporary[Eta + 1][Phi + 9].energy;
105  out.etaStrip1.cr9.eta = 1;
106  out.etaStrip1.cr9.phi = 9;
107  out.etaStrip1.cr10.energy = temporary[Eta + 1][Phi + 10].energy;
108  out.etaStrip1.cr10.eta = 1;
109  out.etaStrip1.cr10.phi = 10;
110  out.etaStrip1.cr11.energy = temporary[Eta + 1][Phi + 11].energy;
111  out.etaStrip1.cr11.eta = 1;
112  out.etaStrip1.cr11.phi = 11;
113  out.etaStrip1.cr12.energy = temporary[Eta + 1][Phi + 12].energy;
114  out.etaStrip1.cr12.eta = 1;
115  out.etaStrip1.cr12.phi = 12;
116  out.etaStrip1.cr13.energy = temporary[Eta + 1][Phi + 13].energy;
117  out.etaStrip1.cr13.eta = 1;
118  out.etaStrip1.cr13.phi = 13;
119  out.etaStrip1.cr14.energy = temporary[Eta + 1][Phi + 14].energy;
120  out.etaStrip1.cr14.eta = 1;
121  out.etaStrip1.cr14.phi = 14;
122  out.etaStrip1.cr15.energy = temporary[Eta + 1][Phi + 15].energy;
123  out.etaStrip1.cr15.eta = 1;
124  out.etaStrip1.cr15.phi = 15;
125  out.etaStrip1.cr16.energy = temporary[Eta + 1][Phi + 16].energy;
126  out.etaStrip1.cr16.eta = 1;
127  out.etaStrip1.cr16.phi = 16;
128  out.etaStrip1.cr17.energy = temporary[Eta + 1][Phi + 17].energy;
129  out.etaStrip1.cr17.eta = 1;
130  out.etaStrip1.cr17.phi = 17;
131  out.etaStrip1.cr18.energy = temporary[Eta + 1][Phi + 18].energy;
132  out.etaStrip1.cr18.eta = 1;
133  out.etaStrip1.cr18.phi = 18;
134  out.etaStrip1.cr19.energy = temporary[Eta + 1][Phi + 19].energy;
135  out.etaStrip1.cr19.eta = 1;
136  out.etaStrip1.cr19.phi = 19;
137 
138  out.etaStrip2.cr0.energy = temporary[Eta + 2][Phi + 0].energy;
139  out.etaStrip2.cr0.eta = 2;
140  out.etaStrip2.cr0.phi = 0;
141  out.etaStrip2.cr1.energy = temporary[Eta + 2][Phi + 1].energy;
142  out.etaStrip2.cr1.eta = 2;
143  out.etaStrip2.cr1.phi = 1;
144  out.etaStrip2.cr2.energy = temporary[Eta + 2][Phi + 2].energy;
145  out.etaStrip2.cr2.eta = 2;
146  out.etaStrip2.cr2.phi = 2;
147  out.etaStrip2.cr3.energy = temporary[Eta + 2][Phi + 3].energy;
148  out.etaStrip2.cr3.eta = 2;
149  out.etaStrip2.cr3.phi = 3;
150  out.etaStrip2.cr4.energy = temporary[Eta + 2][Phi + 4].energy;
151  out.etaStrip2.cr4.eta = 2;
152  out.etaStrip2.cr4.phi = 4;
153  out.etaStrip2.cr5.energy = temporary[Eta + 2][Phi + 5].energy;
154  out.etaStrip2.cr5.eta = 2;
155  out.etaStrip2.cr5.phi = 5;
156  out.etaStrip2.cr6.energy = temporary[Eta + 2][Phi + 6].energy;
157  out.etaStrip2.cr6.eta = 2;
158  out.etaStrip2.cr6.phi = 6;
159  out.etaStrip2.cr7.energy = temporary[Eta + 2][Phi + 7].energy;
160  out.etaStrip2.cr7.eta = 2;
161  out.etaStrip2.cr7.phi = 7;
162  out.etaStrip2.cr8.energy = temporary[Eta + 2][Phi + 8].energy;
163  out.etaStrip2.cr8.eta = 2;
164  out.etaStrip2.cr8.phi = 8;
165  out.etaStrip2.cr9.energy = temporary[Eta + 2][Phi + 9].energy;
166  out.etaStrip2.cr9.eta = 2;
167  out.etaStrip2.cr9.phi = 9;
168  out.etaStrip2.cr10.energy = temporary[Eta + 2][Phi + 10].energy;
169  out.etaStrip2.cr10.eta = 2;
170  out.etaStrip2.cr10.phi = 10;
171  out.etaStrip2.cr11.energy = temporary[Eta + 2][Phi + 11].energy;
172  out.etaStrip2.cr11.eta = 2;
173  out.etaStrip2.cr11.phi = 11;
174  out.etaStrip2.cr12.energy = temporary[Eta + 2][Phi + 12].energy;
175  out.etaStrip2.cr12.eta = 2;
176  out.etaStrip2.cr12.phi = 12;
177  out.etaStrip2.cr13.energy = temporary[Eta + 2][Phi + 13].energy;
178  out.etaStrip2.cr13.eta = 2;
179  out.etaStrip2.cr13.phi = 13;
180  out.etaStrip2.cr14.energy = temporary[Eta + 2][Phi + 14].energy;
181  out.etaStrip2.cr14.eta = 2;
182  out.etaStrip2.cr14.phi = 14;
183  out.etaStrip2.cr15.energy = temporary[Eta + 2][Phi + 15].energy;
184  out.etaStrip2.cr15.eta = 2;
185  out.etaStrip2.cr15.phi = 15;
186  out.etaStrip2.cr16.energy = temporary[Eta + 2][Phi + 16].energy;
187  out.etaStrip2.cr16.eta = 2;
188  out.etaStrip2.cr16.phi = 16;
189  out.etaStrip2.cr17.energy = temporary[Eta + 2][Phi + 17].energy;
190  out.etaStrip2.cr17.eta = 2;
191  out.etaStrip2.cr17.phi = 17;
192  out.etaStrip2.cr18.energy = temporary[Eta + 2][Phi + 18].energy;
193  out.etaStrip2.cr18.eta = 2;
194  out.etaStrip2.cr18.phi = 18;
195  out.etaStrip2.cr19.energy = temporary[Eta + 2][Phi + 19].energy;
196  out.etaStrip2.cr19.eta = 2;
197  out.etaStrip2.cr19.phi = 19;
198 
199  out.etaStrip3.cr0.energy = temporary[Eta + 3][Phi + 0].energy;
200  out.etaStrip3.cr0.eta = 3;
201  out.etaStrip3.cr0.phi = 0;
202  out.etaStrip3.cr1.energy = temporary[Eta + 3][Phi + 1].energy;
203  out.etaStrip3.cr1.eta = 3;
204  out.etaStrip3.cr1.phi = 1;
205  out.etaStrip3.cr2.energy = temporary[Eta + 3][Phi + 2].energy;
206  out.etaStrip3.cr2.eta = 3;
207  out.etaStrip3.cr2.phi = 2;
208  out.etaStrip3.cr3.energy = temporary[Eta + 3][Phi + 3].energy;
209  out.etaStrip3.cr3.eta = 3;
210  out.etaStrip3.cr3.phi = 3;
211  out.etaStrip3.cr4.energy = temporary[Eta + 3][Phi + 4].energy;
212  out.etaStrip3.cr4.eta = 3;
213  out.etaStrip3.cr4.phi = 4;
214  out.etaStrip3.cr5.energy = temporary[Eta + 3][Phi + 5].energy;
215  out.etaStrip3.cr5.eta = 3;
216  out.etaStrip3.cr5.phi = 5;
217  out.etaStrip3.cr6.energy = temporary[Eta + 3][Phi + 6].energy;
218  out.etaStrip3.cr6.eta = 3;
219  out.etaStrip3.cr6.phi = 6;
220  out.etaStrip3.cr7.energy = temporary[Eta + 3][Phi + 7].energy;
221  out.etaStrip3.cr7.eta = 3;
222  out.etaStrip3.cr7.phi = 7;
223  out.etaStrip3.cr8.energy = temporary[Eta + 3][Phi + 8].energy;
224  out.etaStrip3.cr8.eta = 3;
225  out.etaStrip3.cr8.phi = 8;
226  out.etaStrip3.cr9.energy = temporary[Eta + 3][Phi + 9].energy;
227  out.etaStrip3.cr9.eta = 3;
228  out.etaStrip3.cr9.phi = 9;
229  out.etaStrip3.cr10.energy = temporary[Eta + 3][Phi + 10].energy;
230  out.etaStrip3.cr10.eta = 3;
231  out.etaStrip3.cr10.phi = 10;
232  out.etaStrip3.cr11.energy = temporary[Eta + 3][Phi + 11].energy;
233  out.etaStrip3.cr11.eta = 3;
234  out.etaStrip3.cr11.phi = 11;
235  out.etaStrip3.cr12.energy = temporary[Eta + 3][Phi + 12].energy;
236  out.etaStrip3.cr12.eta = 3;
237  out.etaStrip3.cr12.phi = 12;
238  out.etaStrip3.cr13.energy = temporary[Eta + 3][Phi + 13].energy;
239  out.etaStrip3.cr13.eta = 3;
240  out.etaStrip3.cr13.phi = 13;
241  out.etaStrip3.cr14.energy = temporary[Eta + 3][Phi + 14].energy;
242  out.etaStrip3.cr14.eta = 3;
243  out.etaStrip3.cr14.phi = 14;
244  out.etaStrip3.cr15.energy = temporary[Eta + 3][Phi + 15].energy;
245  out.etaStrip3.cr15.eta = 3;
246  out.etaStrip3.cr15.phi = 15;
247  out.etaStrip3.cr16.energy = temporary[Eta + 3][Phi + 16].energy;
248  out.etaStrip3.cr16.eta = 3;
249  out.etaStrip3.cr16.phi = 16;
250  out.etaStrip3.cr17.energy = temporary[Eta + 3][Phi + 17].energy;
251  out.etaStrip3.cr17.eta = 3;
252  out.etaStrip3.cr17.phi = 17;
253  out.etaStrip3.cr18.energy = temporary[Eta + 3][Phi + 18].energy;
254  out.etaStrip3.cr18.eta = 3;
255  out.etaStrip3.cr18.phi = 18;
256  out.etaStrip3.cr19.energy = temporary[Eta + 3][Phi + 19].energy;
257  out.etaStrip3.cr19.eta = 3;
258  out.etaStrip3.cr19.phi = 19;
259 
260  out.etaStrip4.cr0.energy = temporary[Eta + 4][Phi + 0].energy;
261  out.etaStrip4.cr0.eta = 4;
262  out.etaStrip4.cr0.phi = 0;
263  out.etaStrip4.cr1.energy = temporary[Eta + 4][Phi + 1].energy;
264  out.etaStrip4.cr1.eta = 4;
265  out.etaStrip4.cr1.phi = 1;
266  out.etaStrip4.cr2.energy = temporary[Eta + 4][Phi + 2].energy;
267  out.etaStrip4.cr2.eta = 4;
268  out.etaStrip4.cr2.phi = 2;
269  out.etaStrip4.cr3.energy = temporary[Eta + 4][Phi + 3].energy;
270  out.etaStrip4.cr3.eta = 4;
271  out.etaStrip4.cr3.phi = 3;
272  out.etaStrip4.cr4.energy = temporary[Eta + 4][Phi + 4].energy;
273  out.etaStrip4.cr4.eta = 4;
274  out.etaStrip4.cr4.phi = 4;
275  out.etaStrip4.cr5.energy = temporary[Eta + 4][Phi + 5].energy;
276  out.etaStrip4.cr5.eta = 4;
277  out.etaStrip4.cr5.phi = 5;
278  out.etaStrip4.cr6.energy = temporary[Eta + 4][Phi + 6].energy;
279  out.etaStrip4.cr6.eta = 4;
280  out.etaStrip4.cr6.phi = 6;
281  out.etaStrip4.cr7.energy = temporary[Eta + 4][Phi + 7].energy;
282  out.etaStrip4.cr7.eta = 4;
283  out.etaStrip4.cr7.phi = 7;
284  out.etaStrip4.cr8.energy = temporary[Eta + 4][Phi + 8].energy;
285  out.etaStrip4.cr8.eta = 4;
286  out.etaStrip4.cr8.phi = 8;
287  out.etaStrip4.cr9.energy = temporary[Eta + 4][Phi + 9].energy;
288  out.etaStrip4.cr9.eta = 4;
289  out.etaStrip4.cr9.phi = 9;
290  out.etaStrip4.cr10.energy = temporary[Eta + 4][Phi + 10].energy;
291  out.etaStrip4.cr10.eta = 4;
292  out.etaStrip4.cr10.phi = 10;
293  out.etaStrip4.cr11.energy = temporary[Eta + 4][Phi + 11].energy;
294  out.etaStrip4.cr11.eta = 4;
295  out.etaStrip4.cr11.phi = 11;
296  out.etaStrip4.cr12.energy = temporary[Eta + 4][Phi + 12].energy;
297  out.etaStrip4.cr12.eta = 4;
298  out.etaStrip4.cr12.phi = 12;
299  out.etaStrip4.cr13.energy = temporary[Eta + 4][Phi + 13].energy;
300  out.etaStrip4.cr13.eta = 4;
301  out.etaStrip4.cr13.phi = 13;
302  out.etaStrip4.cr14.energy = temporary[Eta + 4][Phi + 14].energy;
303  out.etaStrip4.cr14.eta = 4;
304  out.etaStrip4.cr14.phi = 14;
305  out.etaStrip4.cr15.energy = temporary[Eta + 4][Phi + 15].energy;
306  out.etaStrip4.cr15.eta = 4;
307  out.etaStrip4.cr15.phi = 15;
308  out.etaStrip4.cr16.energy = temporary[Eta + 4][Phi + 16].energy;
309  out.etaStrip4.cr16.eta = 4;
310  out.etaStrip4.cr16.phi = 16;
311  out.etaStrip4.cr17.energy = temporary[Eta + 4][Phi + 17].energy;
312  out.etaStrip4.cr17.eta = 4;
313  out.etaStrip4.cr17.phi = 17;
314  out.etaStrip4.cr18.energy = temporary[Eta + 4][Phi + 18].energy;
315  out.etaStrip4.cr18.eta = 4;
316  out.etaStrip4.cr18.phi = 18;
317  out.etaStrip4.cr19.energy = temporary[Eta + 4][Phi + 19].energy;
318  out.etaStrip4.cr19.eta = 4;
319  out.etaStrip4.cr19.phi = 19;
320 
321  out.etaStrip5.cr0.energy = temporary[Eta + 5][Phi + 0].energy;
322  out.etaStrip5.cr0.eta = 5;
323  out.etaStrip5.cr0.phi = 0;
324  out.etaStrip5.cr1.energy = temporary[Eta + 5][Phi + 1].energy;
325  out.etaStrip5.cr1.eta = 5;
326  out.etaStrip5.cr1.phi = 1;
327  out.etaStrip5.cr2.energy = temporary[Eta + 5][Phi + 2].energy;
328  out.etaStrip5.cr2.eta = 5;
329  out.etaStrip5.cr2.phi = 2;
330  out.etaStrip5.cr3.energy = temporary[Eta + 5][Phi + 3].energy;
331  out.etaStrip5.cr3.eta = 5;
332  out.etaStrip5.cr3.phi = 3;
333  out.etaStrip5.cr4.energy = temporary[Eta + 5][Phi + 4].energy;
334  out.etaStrip5.cr4.eta = 5;
335  out.etaStrip5.cr4.phi = 4;
336  out.etaStrip5.cr5.energy = temporary[Eta + 5][Phi + 5].energy;
337  out.etaStrip5.cr5.eta = 5;
338  out.etaStrip5.cr5.phi = 5;
339  out.etaStrip5.cr6.energy = temporary[Eta + 5][Phi + 6].energy;
340  out.etaStrip5.cr6.eta = 5;
341  out.etaStrip5.cr6.phi = 6;
342  out.etaStrip5.cr7.energy = temporary[Eta + 5][Phi + 7].energy;
343  out.etaStrip5.cr7.eta = 5;
344  out.etaStrip5.cr7.phi = 7;
345  out.etaStrip5.cr8.energy = temporary[Eta + 5][Phi + 8].energy;
346  out.etaStrip5.cr8.eta = 5;
347  out.etaStrip5.cr8.phi = 8;
348  out.etaStrip5.cr9.energy = temporary[Eta + 5][Phi + 9].energy;
349  out.etaStrip5.cr9.eta = 5;
350  out.etaStrip5.cr9.phi = 9;
351  out.etaStrip5.cr10.energy = temporary[Eta + 5][Phi + 10].energy;
352  out.etaStrip5.cr10.eta = 5;
353  out.etaStrip5.cr10.phi = 10;
354  out.etaStrip5.cr11.energy = temporary[Eta + 5][Phi + 11].energy;
355  out.etaStrip5.cr11.eta = 5;
356  out.etaStrip5.cr11.phi = 11;
357  out.etaStrip5.cr12.energy = temporary[Eta + 5][Phi + 12].energy;
358  out.etaStrip5.cr12.eta = 5;
359  out.etaStrip5.cr12.phi = 12;
360  out.etaStrip5.cr13.energy = temporary[Eta + 5][Phi + 13].energy;
361  out.etaStrip5.cr13.eta = 5;
362  out.etaStrip5.cr13.phi = 13;
363  out.etaStrip5.cr14.energy = temporary[Eta + 5][Phi + 14].energy;
364  out.etaStrip5.cr14.eta = 5;
365  out.etaStrip5.cr14.phi = 14;
366  out.etaStrip5.cr15.energy = temporary[Eta + 5][Phi + 15].energy;
367  out.etaStrip5.cr15.eta = 5;
368  out.etaStrip5.cr15.phi = 15;
369  out.etaStrip5.cr16.energy = temporary[Eta + 5][Phi + 16].energy;
370  out.etaStrip5.cr16.eta = 5;
371  out.etaStrip5.cr16.phi = 16;
372  out.etaStrip5.cr17.energy = temporary[Eta + 5][Phi + 17].energy;
373  out.etaStrip5.cr17.eta = 5;
374  out.etaStrip5.cr17.phi = 17;
375  out.etaStrip5.cr18.energy = temporary[Eta + 5][Phi + 18].energy;
376  out.etaStrip5.cr18.eta = 5;
377  out.etaStrip5.cr18.phi = 18;
378  out.etaStrip5.cr19.energy = temporary[Eta + 5][Phi + 19].energy;
379  out.etaStrip5.cr19.eta = 5;
380  out.etaStrip5.cr19.phi = 19;
381 
382  out.etaStrip6.cr0.energy = temporary[Eta + 6][Phi + 0].energy;
383  out.etaStrip6.cr0.eta = 6;
384  out.etaStrip6.cr0.phi = 0;
385  out.etaStrip6.cr1.energy = temporary[Eta + 6][Phi + 1].energy;
386  out.etaStrip6.cr1.eta = 6;
387  out.etaStrip6.cr1.phi = 1;
388  out.etaStrip6.cr2.energy = temporary[Eta + 6][Phi + 2].energy;
389  out.etaStrip6.cr2.eta = 6;
390  out.etaStrip6.cr2.phi = 2;
391  out.etaStrip6.cr2.energy = temporary[Eta + 6][Phi + 2].energy;
392  out.etaStrip6.cr2.eta = 6;
393  out.etaStrip6.cr2.phi = 2;
394  out.etaStrip6.cr3.energy = temporary[Eta + 6][Phi + 3].energy;
395  out.etaStrip6.cr3.eta = 6;
396  out.etaStrip6.cr3.phi = 3;
397  out.etaStrip6.cr4.energy = temporary[Eta + 6][Phi + 4].energy;
398  out.etaStrip6.cr4.eta = 6;
399  out.etaStrip6.cr4.phi = 4;
400  out.etaStrip6.cr5.energy = temporary[Eta + 6][Phi + 5].energy;
401  out.etaStrip6.cr5.eta = 6;
402  out.etaStrip6.cr5.phi = 5;
403  out.etaStrip6.cr6.energy = temporary[Eta + 6][Phi + 6].energy;
404  out.etaStrip6.cr6.eta = 6;
405  out.etaStrip6.cr6.phi = 6;
406  out.etaStrip6.cr7.energy = temporary[Eta + 6][Phi + 7].energy;
407  out.etaStrip6.cr7.eta = 6;
408  out.etaStrip6.cr7.phi = 7;
409  out.etaStrip6.cr8.energy = temporary[Eta + 6][Phi + 8].energy;
410  out.etaStrip6.cr8.eta = 6;
411  out.etaStrip6.cr8.phi = 8;
412  out.etaStrip6.cr9.energy = temporary[Eta + 6][Phi + 9].energy;
413  out.etaStrip6.cr9.eta = 6;
414  out.etaStrip6.cr9.phi = 9;
415  out.etaStrip6.cr10.energy = temporary[Eta + 6][Phi + 10].energy;
416  out.etaStrip6.cr10.eta = 6;
417  out.etaStrip6.cr10.phi = 10;
418  out.etaStrip6.cr11.energy = temporary[Eta + 6][Phi + 11].energy;
419  out.etaStrip6.cr11.eta = 6;
420  out.etaStrip6.cr11.phi = 11;
421  out.etaStrip6.cr12.energy = temporary[Eta + 6][Phi + 12].energy;
422  out.etaStrip6.cr12.eta = 6;
423  out.etaStrip6.cr12.phi = 12;
424  out.etaStrip6.cr13.energy = temporary[Eta + 6][Phi + 13].energy;
425  out.etaStrip6.cr13.eta = 6;
426  out.etaStrip6.cr13.phi = 13;
427  out.etaStrip6.cr14.energy = temporary[Eta + 6][Phi + 14].energy;
428  out.etaStrip6.cr14.eta = 6;
429  out.etaStrip6.cr14.phi = 14;
430  out.etaStrip6.cr15.energy = temporary[Eta + 6][Phi + 15].energy;
431  out.etaStrip6.cr15.eta = 6;
432  out.etaStrip6.cr15.phi = 15;
433  out.etaStrip6.cr16.energy = temporary[Eta + 6][Phi + 16].energy;
434  out.etaStrip6.cr16.eta = 6;
435  out.etaStrip6.cr16.phi = 16;
436  out.etaStrip6.cr17.energy = temporary[Eta + 6][Phi + 17].energy;
437  out.etaStrip6.cr17.eta = 6;
438  out.etaStrip6.cr17.phi = 17;
439  out.etaStrip6.cr18.energy = temporary[Eta + 6][Phi + 18].energy;
440  out.etaStrip6.cr18.eta = 6;
441  out.etaStrip6.cr18.phi = 18;
442  out.etaStrip6.cr19.energy = temporary[Eta + 6][Phi + 19].energy;
443  out.etaStrip6.cr19.eta = 6;
444  out.etaStrip6.cr19.phi = 19;
445 
446  out.etaStrip7.cr0.energy = temporary[Eta + 7][Phi + 0].energy;
447  out.etaStrip7.cr0.eta = 7;
448  out.etaStrip7.cr0.phi = 0;
449  out.etaStrip7.cr1.energy = temporary[Eta + 7][Phi + 1].energy;
450  out.etaStrip7.cr1.eta = 7;
451  out.etaStrip7.cr1.phi = 1;
452  out.etaStrip7.cr2.energy = temporary[Eta + 7][Phi + 2].energy;
453  out.etaStrip7.cr2.eta = 7;
454  out.etaStrip7.cr2.phi = 2;
455  out.etaStrip7.cr3.energy = temporary[Eta + 7][Phi + 3].energy;
456  out.etaStrip7.cr3.eta = 7;
457  out.etaStrip7.cr3.phi = 3;
458  out.etaStrip7.cr4.energy = temporary[Eta + 7][Phi + 4].energy;
459  out.etaStrip7.cr4.eta = 7;
460  out.etaStrip7.cr4.phi = 4;
461  out.etaStrip7.cr5.energy = temporary[Eta + 7][Phi + 5].energy;
462  out.etaStrip7.cr5.eta = 7;
463  out.etaStrip7.cr5.phi = 5;
464  out.etaStrip7.cr6.energy = temporary[Eta + 7][Phi + 6].energy;
465  out.etaStrip7.cr6.eta = 7;
466  out.etaStrip7.cr6.phi = 6;
467  out.etaStrip7.cr7.energy = temporary[Eta + 7][Phi + 7].energy;
468  out.etaStrip7.cr7.eta = 7;
469  out.etaStrip7.cr7.phi = 7;
470  out.etaStrip7.cr8.energy = temporary[Eta + 7][Phi + 8].energy;
471  out.etaStrip7.cr8.eta = 7;
472  out.etaStrip7.cr8.phi = 8;
473  out.etaStrip7.cr9.energy = temporary[Eta + 7][Phi + 9].energy;
474  out.etaStrip7.cr9.eta = 7;
475  out.etaStrip7.cr9.phi = 9;
476  out.etaStrip7.cr10.energy = temporary[Eta + 7][Phi + 10].energy;
477  out.etaStrip7.cr10.eta = 7;
478  out.etaStrip7.cr10.phi = 10;
479  out.etaStrip7.cr11.energy = temporary[Eta + 7][Phi + 11].energy;
480  out.etaStrip7.cr11.eta = 7;
481  out.etaStrip7.cr11.phi = 11;
482  out.etaStrip7.cr12.energy = temporary[Eta + 7][Phi + 12].energy;
483  out.etaStrip7.cr12.eta = 7;
484  out.etaStrip7.cr12.phi = 12;
485  out.etaStrip7.cr13.energy = temporary[Eta + 7][Phi + 13].energy;
486  out.etaStrip7.cr13.eta = 7;
487  out.etaStrip7.cr13.phi = 13;
488  out.etaStrip7.cr14.energy = temporary[Eta + 7][Phi + 14].energy;
489  out.etaStrip7.cr14.eta = 7;
490  out.etaStrip7.cr14.phi = 14;
491  out.etaStrip7.cr15.energy = temporary[Eta + 7][Phi + 15].energy;
492  out.etaStrip7.cr15.eta = 7;
493  out.etaStrip7.cr15.phi = 15;
494  out.etaStrip7.cr16.energy = temporary[Eta + 7][Phi + 16].energy;
495  out.etaStrip7.cr16.eta = 7;
496  out.etaStrip7.cr16.phi = 16;
497  out.etaStrip7.cr17.energy = temporary[Eta + 7][Phi + 17].energy;
498  out.etaStrip7.cr17.eta = 7;
499  out.etaStrip7.cr17.phi = 17;
500  out.etaStrip7.cr18.energy = temporary[Eta + 7][Phi + 18].energy;
501  out.etaStrip7.cr18.eta = 7;
502  out.etaStrip7.cr18.phi = 18;
503  out.etaStrip7.cr19.energy = temporary[Eta + 7][Phi + 19].energy;
504  out.etaStrip7.cr19.eta = 7;
505  out.etaStrip7.cr19.phi = 19;
506 
507  out.etaStrip8.cr0.energy = temporary[Eta + 8][Phi + 0].energy;
508  out.etaStrip8.cr0.eta = 8;
509  out.etaStrip8.cr0.phi = 0;
510  out.etaStrip8.cr1.energy = temporary[Eta + 8][Phi + 1].energy;
511  out.etaStrip8.cr1.eta = 8;
512  out.etaStrip8.cr1.phi = 1;
513  out.etaStrip8.cr2.energy = temporary[Eta + 8][Phi + 2].energy;
514  out.etaStrip8.cr2.eta = 8;
515  out.etaStrip8.cr2.phi = 2;
516  out.etaStrip8.cr3.energy = temporary[Eta + 8][Phi + 3].energy;
517  out.etaStrip8.cr3.eta = 8;
518  out.etaStrip8.cr3.phi = 3;
519  out.etaStrip8.cr4.energy = temporary[Eta + 8][Phi + 4].energy;
520  out.etaStrip8.cr4.eta = 8;
521  out.etaStrip8.cr4.phi = 4;
522  out.etaStrip8.cr5.energy = temporary[Eta + 8][Phi + 5].energy;
523  out.etaStrip8.cr5.eta = 8;
524  out.etaStrip8.cr5.phi = 5;
525  out.etaStrip8.cr6.energy = temporary[Eta + 8][Phi + 6].energy;
526  out.etaStrip8.cr6.eta = 8;
527  out.etaStrip8.cr6.phi = 6;
528  out.etaStrip8.cr7.energy = temporary[Eta + 8][Phi + 7].energy;
529  out.etaStrip8.cr7.eta = 8;
530  out.etaStrip8.cr7.phi = 7;
531  out.etaStrip8.cr8.energy = temporary[Eta + 8][Phi + 8].energy;
532  out.etaStrip8.cr8.eta = 8;
533  out.etaStrip8.cr8.phi = 8;
534  out.etaStrip8.cr9.energy = temporary[Eta + 8][Phi + 9].energy;
535  out.etaStrip8.cr9.eta = 8;
536  out.etaStrip8.cr9.phi = 9;
537  out.etaStrip8.cr10.energy = temporary[Eta + 8][Phi + 10].energy;
538  out.etaStrip8.cr10.eta = 8;
539  out.etaStrip8.cr10.phi = 10;
540  out.etaStrip8.cr11.energy = temporary[Eta + 8][Phi + 11].energy;
541  out.etaStrip8.cr11.eta = 8;
542  out.etaStrip8.cr11.phi = 11;
543  out.etaStrip8.cr12.energy = temporary[Eta + 8][Phi + 12].energy;
544  out.etaStrip8.cr12.eta = 8;
545  out.etaStrip8.cr12.phi = 12;
546  out.etaStrip8.cr13.energy = temporary[Eta + 8][Phi + 13].energy;
547  out.etaStrip8.cr13.eta = 8;
548  out.etaStrip8.cr13.phi = 13;
549  out.etaStrip8.cr14.energy = temporary[Eta + 8][Phi + 14].energy;
550  out.etaStrip8.cr14.eta = 8;
551  out.etaStrip8.cr14.phi = 14;
552  out.etaStrip8.cr15.energy = temporary[Eta + 8][Phi + 15].energy;
553  out.etaStrip8.cr15.eta = 8;
554  out.etaStrip8.cr15.phi = 15;
555  out.etaStrip8.cr16.energy = temporary[Eta + 8][Phi + 16].energy;
556  out.etaStrip8.cr16.eta = 8;
557  out.etaStrip8.cr16.phi = 16;
558  out.etaStrip8.cr17.energy = temporary[Eta + 8][Phi + 17].energy;
559  out.etaStrip8.cr17.eta = 8;
560  out.etaStrip8.cr17.phi = 17;
561  out.etaStrip8.cr18.energy = temporary[Eta + 8][Phi + 18].energy;
562  out.etaStrip8.cr18.eta = 8;
563  out.etaStrip8.cr18.phi = 18;
564  out.etaStrip8.cr19.energy = temporary[Eta + 8][Phi + 19].energy;
565  out.etaStrip8.cr19.eta = 8;
566  out.etaStrip8.cr19.phi = 19;
567 
568  out.etaStrip9.cr0.energy = temporary[Eta + 9][Phi + 0].energy;
569  out.etaStrip9.cr0.eta = 9;
570  out.etaStrip9.cr0.phi = 0;
571  out.etaStrip9.cr1.energy = temporary[Eta + 9][Phi + 1].energy;
572  out.etaStrip9.cr1.eta = 9;
573  out.etaStrip9.cr1.phi = 1;
574  out.etaStrip9.cr2.energy = temporary[Eta + 9][Phi + 2].energy;
575  out.etaStrip9.cr2.eta = 9;
576  out.etaStrip9.cr2.phi = 2;
577  out.etaStrip9.cr3.energy = temporary[Eta + 9][Phi + 3].energy;
578  out.etaStrip9.cr3.eta = 9;
579  out.etaStrip9.cr3.phi = 3;
580  out.etaStrip9.cr4.energy = temporary[Eta + 9][Phi + 4].energy;
581  out.etaStrip9.cr4.eta = 9;
582  out.etaStrip9.cr4.phi = 4;
583  out.etaStrip9.cr5.energy = temporary[Eta + 9][Phi + 5].energy;
584  out.etaStrip9.cr5.eta = 9;
585  out.etaStrip9.cr5.phi = 5;
586  out.etaStrip9.cr6.energy = temporary[Eta + 9][Phi + 6].energy;
587  out.etaStrip9.cr6.eta = 9;
588  out.etaStrip9.cr6.phi = 6;
589  out.etaStrip9.cr7.energy = temporary[Eta + 9][Phi + 7].energy;
590  out.etaStrip9.cr7.eta = 9;
591  out.etaStrip9.cr7.phi = 7;
592  out.etaStrip9.cr8.energy = temporary[Eta + 9][Phi + 8].energy;
593  out.etaStrip9.cr8.eta = 9;
594  out.etaStrip9.cr8.phi = 8;
595  out.etaStrip9.cr9.energy = temporary[Eta + 9][Phi + 9].energy;
596  out.etaStrip9.cr9.eta = 9;
597  out.etaStrip9.cr9.phi = 9;
598  out.etaStrip9.cr10.energy = temporary[Eta + 9][Phi + 10].energy;
599  out.etaStrip9.cr10.eta = 9;
600  out.etaStrip9.cr10.phi = 10;
601  out.etaStrip9.cr11.energy = temporary[Eta + 9][Phi + 11].energy;
602  out.etaStrip9.cr11.eta = 9;
603  out.etaStrip9.cr11.phi = 11;
604  out.etaStrip9.cr12.energy = temporary[Eta + 9][Phi + 12].energy;
605  out.etaStrip9.cr12.eta = 9;
606  out.etaStrip9.cr12.phi = 12;
607  out.etaStrip9.cr13.energy = temporary[Eta + 9][Phi + 13].energy;
608  out.etaStrip9.cr13.eta = 9;
609  out.etaStrip9.cr13.phi = 13;
610  out.etaStrip9.cr14.energy = temporary[Eta + 9][Phi + 14].energy;
611  out.etaStrip9.cr14.eta = 9;
612  out.etaStrip9.cr14.phi = 14;
613  out.etaStrip9.cr15.energy = temporary[Eta + 9][Phi + 15].energy;
614  out.etaStrip9.cr15.eta = 9;
615  out.etaStrip9.cr15.phi = 15;
616  out.etaStrip9.cr16.energy = temporary[Eta + 9][Phi + 16].energy;
617  out.etaStrip9.cr16.eta = 9;
618  out.etaStrip9.cr16.phi = 16;
619  out.etaStrip9.cr17.energy = temporary[Eta + 9][Phi + 17].energy;
620  out.etaStrip9.cr17.eta = 9;
621  out.etaStrip9.cr17.phi = 17;
622  out.etaStrip9.cr18.energy = temporary[Eta + 9][Phi + 18].energy;
623  out.etaStrip9.cr18.eta = 9;
624  out.etaStrip9.cr18.phi = 18;
625  out.etaStrip9.cr19.energy = temporary[Eta + 9][Phi + 19].energy;
626  out.etaStrip9.cr19.eta = 9;
627  out.etaStrip9.cr19.phi = 19;
628 
629  out.etaStrip10.cr0.energy = temporary[Eta + 10][Phi + 0].energy;
630  out.etaStrip10.cr0.eta = 10;
631  out.etaStrip10.cr0.phi = 0;
632  out.etaStrip10.cr1.energy = temporary[Eta + 10][Phi + 1].energy;
633  out.etaStrip10.cr1.eta = 10;
634  out.etaStrip10.cr1.phi = 1;
635  out.etaStrip10.cr2.energy = temporary[Eta + 10][Phi + 2].energy;
636  out.etaStrip10.cr2.eta = 10;
637  out.etaStrip10.cr2.phi = 2;
638  out.etaStrip10.cr3.energy = temporary[Eta + 10][Phi + 3].energy;
639  out.etaStrip10.cr3.eta = 10;
640  out.etaStrip10.cr3.phi = 3;
641  out.etaStrip10.cr4.energy = temporary[Eta + 10][Phi + 4].energy;
642  out.etaStrip10.cr4.eta = 10;
643  out.etaStrip10.cr4.phi = 4;
644  out.etaStrip10.cr5.energy = temporary[Eta + 10][Phi + 5].energy;
645  out.etaStrip10.cr5.eta = 10;
646  out.etaStrip10.cr5.phi = 5;
647  out.etaStrip10.cr6.energy = temporary[Eta + 10][Phi + 6].energy;
648  out.etaStrip10.cr6.eta = 10;
649  out.etaStrip10.cr6.phi = 6;
650  out.etaStrip10.cr7.energy = temporary[Eta + 10][Phi + 7].energy;
651  out.etaStrip10.cr7.eta = 10;
652  out.etaStrip10.cr7.phi = 7;
653  out.etaStrip10.cr8.energy = temporary[Eta + 10][Phi + 8].energy;
654  out.etaStrip10.cr8.eta = 10;
655  out.etaStrip10.cr8.phi = 8;
656  out.etaStrip10.cr9.energy = temporary[Eta + 10][Phi + 9].energy;
657  out.etaStrip10.cr9.eta = 10;
658  out.etaStrip10.cr9.phi = 9;
659  out.etaStrip10.cr10.energy = temporary[Eta + 10][Phi + 10].energy;
660  out.etaStrip10.cr10.eta = 10;
661  out.etaStrip10.cr10.phi = 10;
662  out.etaStrip10.cr11.energy = temporary[Eta + 10][Phi + 11].energy;
663  out.etaStrip10.cr11.eta = 10;
664  out.etaStrip10.cr11.phi = 11;
665  out.etaStrip10.cr12.energy = temporary[Eta + 10][Phi + 12].energy;
666  out.etaStrip10.cr12.eta = 10;
667  out.etaStrip10.cr12.phi = 12;
668  out.etaStrip10.cr13.energy = temporary[Eta + 10][Phi + 13].energy;
669  out.etaStrip10.cr13.eta = 10;
670  out.etaStrip10.cr13.phi = 13;
671  out.etaStrip10.cr14.energy = temporary[Eta + 10][Phi + 14].energy;
672  out.etaStrip10.cr14.eta = 10;
673  out.etaStrip10.cr14.phi = 14;
674  out.etaStrip10.cr15.energy = temporary[Eta + 10][Phi + 15].energy;
675  out.etaStrip10.cr15.eta = 10;
676  out.etaStrip10.cr15.phi = 15;
677  out.etaStrip10.cr16.energy = temporary[Eta + 10][Phi + 16].energy;
678  out.etaStrip10.cr16.eta = 10;
679  out.etaStrip10.cr16.phi = 16;
680  out.etaStrip10.cr17.energy = temporary[Eta + 10][Phi + 17].energy;
681  out.etaStrip10.cr17.eta = 10;
682  out.etaStrip10.cr17.phi = 17;
683  out.etaStrip10.cr18.energy = temporary[Eta + 10][Phi + 18].energy;
684  out.etaStrip10.cr18.eta = 10;
685  out.etaStrip10.cr18.phi = 18;
686  out.etaStrip10.cr19.energy = temporary[Eta + 10][Phi + 19].energy;
687  out.etaStrip10.cr19.eta = 10;
688  out.etaStrip10.cr19.phi = 19;
689 
690  out.etaStrip11.cr0.energy = temporary[Eta + 11][Phi + 0].energy;
691  out.etaStrip11.cr0.eta = 11;
692  out.etaStrip11.cr0.phi = 0;
693  out.etaStrip11.cr1.energy = temporary[Eta + 11][Phi + 1].energy;
694  out.etaStrip11.cr1.eta = 11;
695  out.etaStrip11.cr1.phi = 1;
696  out.etaStrip11.cr2.energy = temporary[Eta + 11][Phi + 2].energy;
697  out.etaStrip11.cr2.eta = 11;
698  out.etaStrip11.cr2.phi = 2;
699  out.etaStrip11.cr3.energy = temporary[Eta + 11][Phi + 3].energy;
700  out.etaStrip11.cr3.eta = 11;
701  out.etaStrip11.cr3.phi = 3;
702  out.etaStrip11.cr4.energy = temporary[Eta + 11][Phi + 4].energy;
703  out.etaStrip11.cr4.eta = 11;
704  out.etaStrip11.cr4.phi = 4;
705  out.etaStrip11.cr5.energy = temporary[Eta + 11][Phi + 5].energy;
706  out.etaStrip11.cr5.eta = 11;
707  out.etaStrip11.cr5.phi = 5;
708  out.etaStrip11.cr6.energy = temporary[Eta + 11][Phi + 6].energy;
709  out.etaStrip11.cr6.eta = 11;
710  out.etaStrip11.cr6.phi = 6;
711  out.etaStrip11.cr7.energy = temporary[Eta + 11][Phi + 7].energy;
712  out.etaStrip11.cr7.eta = 11;
713  out.etaStrip11.cr7.phi = 7;
714  out.etaStrip11.cr8.energy = temporary[Eta + 11][Phi + 8].energy;
715  out.etaStrip11.cr8.eta = 11;
716  out.etaStrip11.cr8.phi = 8;
717  out.etaStrip11.cr9.energy = temporary[Eta + 11][Phi + 9].energy;
718  out.etaStrip11.cr9.eta = 11;
719  out.etaStrip11.cr9.phi = 9;
720  out.etaStrip11.cr10.energy = temporary[Eta + 11][Phi + 10].energy;
721  out.etaStrip11.cr10.eta = 11;
722  out.etaStrip11.cr10.phi = 10;
723  out.etaStrip11.cr11.energy = temporary[Eta + 11][Phi + 11].energy;
724  out.etaStrip11.cr11.eta = 11;
725  out.etaStrip11.cr11.phi = 11;
726  out.etaStrip11.cr12.energy = temporary[Eta + 11][Phi + 12].energy;
727  out.etaStrip11.cr12.eta = 11;
728  out.etaStrip11.cr12.phi = 12;
729  out.etaStrip11.cr13.energy = temporary[Eta + 11][Phi + 13].energy;
730  out.etaStrip11.cr13.eta = 11;
731  out.etaStrip11.cr13.phi = 13;
732  out.etaStrip11.cr14.energy = temporary[Eta + 11][Phi + 14].energy;
733  out.etaStrip11.cr14.eta = 11;
734  out.etaStrip11.cr14.phi = 14;
735  out.etaStrip11.cr15.energy = temporary[Eta + 11][Phi + 15].energy;
736  out.etaStrip11.cr15.eta = 11;
737  out.etaStrip11.cr15.phi = 15;
738  out.etaStrip11.cr16.energy = temporary[Eta + 11][Phi + 16].energy;
739  out.etaStrip11.cr16.eta = 11;
740  out.etaStrip11.cr16.phi = 16;
741  out.etaStrip11.cr17.energy = temporary[Eta + 11][Phi + 17].energy;
742  out.etaStrip11.cr17.eta = 11;
743  out.etaStrip11.cr17.phi = 17;
744  out.etaStrip11.cr18.energy = temporary[Eta + 11][Phi + 18].energy;
745  out.etaStrip11.cr18.eta = 11;
746  out.etaStrip11.cr18.phi = 18;
747  out.etaStrip11.cr19.energy = temporary[Eta + 11][Phi + 19].energy;
748  out.etaStrip11.cr19.eta = 11;
749  out.etaStrip11.cr19.phi = 19;
750 
751  out.etaStrip12.cr0.energy = temporary[Eta + 12][Phi + 0].energy;
752  out.etaStrip12.cr0.eta = 12;
753  out.etaStrip12.cr0.phi = 0;
754  out.etaStrip12.cr1.energy = temporary[Eta + 12][Phi + 1].energy;
755  out.etaStrip12.cr1.eta = 12;
756  out.etaStrip12.cr1.phi = 1;
757  out.etaStrip12.cr2.energy = temporary[Eta + 12][Phi + 2].energy;
758  out.etaStrip12.cr2.eta = 12;
759  out.etaStrip12.cr2.phi = 2;
760  out.etaStrip12.cr3.energy = temporary[Eta + 12][Phi + 3].energy;
761  out.etaStrip12.cr3.eta = 12;
762  out.etaStrip12.cr3.phi = 3;
763  out.etaStrip12.cr4.energy = temporary[Eta + 12][Phi + 4].energy;
764  out.etaStrip12.cr4.eta = 12;
765  out.etaStrip12.cr4.phi = 4;
766  out.etaStrip12.cr5.energy = temporary[Eta + 12][Phi + 5].energy;
767  out.etaStrip12.cr5.eta = 12;
768  out.etaStrip12.cr5.phi = 5;
769  out.etaStrip12.cr6.energy = temporary[Eta + 12][Phi + 6].energy;
770  out.etaStrip12.cr6.eta = 12;
771  out.etaStrip12.cr6.phi = 6;
772  out.etaStrip12.cr7.energy = temporary[Eta + 12][Phi + 7].energy;
773  out.etaStrip12.cr7.eta = 12;
774  out.etaStrip12.cr7.phi = 7;
775  out.etaStrip12.cr8.energy = temporary[Eta + 12][Phi + 8].energy;
776  out.etaStrip12.cr8.eta = 12;
777  out.etaStrip12.cr8.phi = 8;
778  out.etaStrip12.cr9.energy = temporary[Eta + 12][Phi + 9].energy;
779  out.etaStrip12.cr9.eta = 12;
780  out.etaStrip12.cr9.phi = 9;
781  out.etaStrip12.cr10.energy = temporary[Eta + 12][Phi + 10].energy;
782  out.etaStrip12.cr10.eta = 12;
783  out.etaStrip12.cr10.phi = 10;
784  out.etaStrip12.cr11.energy = temporary[Eta + 12][Phi + 11].energy;
785  out.etaStrip12.cr11.eta = 12;
786  out.etaStrip12.cr11.phi = 11;
787  out.etaStrip12.cr12.energy = temporary[Eta + 12][Phi + 12].energy;
788  out.etaStrip12.cr12.eta = 12;
789  out.etaStrip12.cr12.phi = 12;
790  out.etaStrip12.cr13.energy = temporary[Eta + 12][Phi + 13].energy;
791  out.etaStrip12.cr13.eta = 12;
792  out.etaStrip12.cr13.phi = 13;
793  out.etaStrip12.cr14.energy = temporary[Eta + 12][Phi + 14].energy;
794  out.etaStrip12.cr14.eta = 12;
795  out.etaStrip12.cr14.phi = 14;
796  out.etaStrip12.cr15.energy = temporary[Eta + 12][Phi + 15].energy;
797  out.etaStrip12.cr15.eta = 12;
798  out.etaStrip12.cr15.phi = 15;
799  out.etaStrip12.cr16.energy = temporary[Eta + 12][Phi + 16].energy;
800  out.etaStrip12.cr16.eta = 12;
801  out.etaStrip12.cr16.phi = 16;
802  out.etaStrip12.cr17.energy = temporary[Eta + 12][Phi + 17].energy;
803  out.etaStrip12.cr17.eta = 12;
804  out.etaStrip12.cr17.phi = 17;
805  out.etaStrip12.cr18.energy = temporary[Eta + 12][Phi + 18].energy;
806  out.etaStrip12.cr18.eta = 12;
807  out.etaStrip12.cr18.phi = 18;
808  out.etaStrip12.cr19.energy = temporary[Eta + 12][Phi + 19].energy;
809  out.etaStrip12.cr19.eta = 12;
810  out.etaStrip12.cr19.phi = 19;
811 
812  out.etaStrip13.cr0.energy = temporary[Eta + 13][Phi + 0].energy;
813  out.etaStrip13.cr0.eta = 13;
814  out.etaStrip13.cr0.phi = 0;
815  out.etaStrip13.cr1.energy = temporary[Eta + 13][Phi + 1].energy;
816  out.etaStrip13.cr1.eta = 13;
817  out.etaStrip13.cr1.phi = 1;
818  out.etaStrip13.cr2.energy = temporary[Eta + 13][Phi + 2].energy;
819  out.etaStrip13.cr2.eta = 13;
820  out.etaStrip13.cr2.phi = 2;
821  out.etaStrip13.cr3.energy = temporary[Eta + 13][Phi + 3].energy;
822  out.etaStrip13.cr3.eta = 13;
823  out.etaStrip13.cr3.phi = 3;
824  out.etaStrip13.cr4.energy = temporary[Eta + 13][Phi + 4].energy;
825  out.etaStrip13.cr4.eta = 13;
826  out.etaStrip13.cr4.phi = 4;
827  out.etaStrip13.cr5.energy = temporary[Eta + 13][Phi + 5].energy;
828  out.etaStrip13.cr5.eta = 13;
829  out.etaStrip13.cr5.phi = 5;
830  out.etaStrip13.cr6.energy = temporary[Eta + 13][Phi + 6].energy;
831  out.etaStrip13.cr6.eta = 13;
832  out.etaStrip13.cr6.phi = 6;
833  out.etaStrip13.cr7.energy = temporary[Eta + 13][Phi + 7].energy;
834  out.etaStrip13.cr7.eta = 13;
835  out.etaStrip13.cr7.phi = 7;
836  out.etaStrip13.cr8.energy = temporary[Eta + 13][Phi + 8].energy;
837  out.etaStrip13.cr8.eta = 13;
838  out.etaStrip13.cr8.phi = 8;
839  out.etaStrip13.cr9.energy = temporary[Eta + 13][Phi + 9].energy;
840  out.etaStrip13.cr9.eta = 13;
841  out.etaStrip13.cr9.phi = 9;
842  out.etaStrip13.cr10.energy = temporary[Eta + 13][Phi + 10].energy;
843  out.etaStrip13.cr10.eta = 13;
844  out.etaStrip13.cr10.phi = 10;
845  out.etaStrip13.cr11.energy = temporary[Eta + 13][Phi + 11].energy;
846  out.etaStrip13.cr11.eta = 13;
847  out.etaStrip13.cr11.phi = 11;
848  out.etaStrip13.cr12.energy = temporary[Eta + 13][Phi + 12].energy;
849  out.etaStrip13.cr12.eta = 13;
850  out.etaStrip13.cr12.phi = 12;
851  out.etaStrip13.cr13.energy = temporary[Eta + 13][Phi + 13].energy;
852  out.etaStrip13.cr13.eta = 13;
853  out.etaStrip13.cr13.phi = 13;
854  out.etaStrip13.cr14.energy = temporary[Eta + 13][Phi + 14].energy;
855  out.etaStrip13.cr14.eta = 13;
856  out.etaStrip13.cr14.phi = 14;
857  out.etaStrip13.cr15.energy = temporary[Eta + 13][Phi + 15].energy;
858  out.etaStrip13.cr15.eta = 13;
859  out.etaStrip13.cr15.phi = 15;
860  out.etaStrip13.cr16.energy = temporary[Eta + 13][Phi + 16].energy;
861  out.etaStrip13.cr16.eta = 13;
862  out.etaStrip13.cr16.phi = 16;
863  out.etaStrip13.cr17.energy = temporary[Eta + 13][Phi + 17].energy;
864  out.etaStrip13.cr17.eta = 13;
865  out.etaStrip13.cr17.phi = 17;
866  out.etaStrip13.cr18.energy = temporary[Eta + 13][Phi + 18].energy;
867  out.etaStrip13.cr18.eta = 13;
868  out.etaStrip13.cr18.phi = 18;
869  out.etaStrip13.cr19.energy = temporary[Eta + 13][Phi + 19].energy;
870  out.etaStrip13.cr19.eta = 13;
871  out.etaStrip13.cr19.phi = 19;
872 
873  out.etaStrip14.cr0.energy = temporary[Eta + 14][Phi + 0].energy;
874  out.etaStrip14.cr0.eta = 14;
875  out.etaStrip14.cr0.phi = 0;
876  out.etaStrip14.cr1.energy = temporary[Eta + 14][Phi + 1].energy;
877  out.etaStrip14.cr1.eta = 14;
878  out.etaStrip14.cr1.phi = 1;
879  out.etaStrip14.cr2.energy = temporary[Eta + 14][Phi + 2].energy;
880  out.etaStrip14.cr2.eta = 14;
881  out.etaStrip14.cr2.phi = 2;
882  out.etaStrip14.cr3.energy = temporary[Eta + 14][Phi + 3].energy;
883  out.etaStrip14.cr3.eta = 14;
884  out.etaStrip14.cr3.phi = 3;
885  out.etaStrip14.cr4.energy = temporary[Eta + 14][Phi + 4].energy;
886  out.etaStrip14.cr4.eta = 14;
887  out.etaStrip14.cr4.phi = 4;
888  out.etaStrip14.cr5.energy = temporary[Eta + 14][Phi + 5].energy;
889  out.etaStrip14.cr5.eta = 14;
890  out.etaStrip14.cr5.phi = 5;
891  out.etaStrip14.cr6.energy = temporary[Eta + 14][Phi + 6].energy;
892  out.etaStrip14.cr6.eta = 14;
893  out.etaStrip14.cr6.phi = 6;
894  out.etaStrip14.cr7.energy = temporary[Eta + 14][Phi + 7].energy;
895  out.etaStrip14.cr7.eta = 14;
896  out.etaStrip14.cr7.phi = 7;
897  out.etaStrip14.cr8.energy = temporary[Eta + 14][Phi + 8].energy;
898  out.etaStrip14.cr8.eta = 14;
899  out.etaStrip14.cr8.phi = 8;
900  out.etaStrip14.cr9.energy = temporary[Eta + 14][Phi + 9].energy;
901  out.etaStrip14.cr9.eta = 14;
902  out.etaStrip14.cr9.phi = 9;
903  out.etaStrip14.cr10.energy = temporary[Eta + 14][Phi + 10].energy;
904  out.etaStrip14.cr10.eta = 14;
905  out.etaStrip14.cr10.phi = 10;
906  out.etaStrip14.cr11.energy = temporary[Eta + 14][Phi + 11].energy;
907  out.etaStrip14.cr11.eta = 14;
908  out.etaStrip14.cr11.phi = 11;
909  out.etaStrip14.cr12.energy = temporary[Eta + 14][Phi + 12].energy;
910  out.etaStrip14.cr12.eta = 14;
911  out.etaStrip14.cr12.phi = 12;
912  out.etaStrip14.cr13.energy = temporary[Eta + 14][Phi + 13].energy;
913  out.etaStrip14.cr13.eta = 14;
914  out.etaStrip14.cr13.phi = 13;
915  out.etaStrip14.cr14.energy = temporary[Eta + 14][Phi + 14].energy;
916  out.etaStrip14.cr14.eta = 14;
917  out.etaStrip14.cr14.phi = 14;
918  out.etaStrip14.cr15.energy = temporary[Eta + 14][Phi + 15].energy;
919  out.etaStrip14.cr15.eta = 14;
920  out.etaStrip14.cr15.phi = 15;
921  out.etaStrip14.cr16.energy = temporary[Eta + 14][Phi + 16].energy;
922  out.etaStrip14.cr16.eta = 14;
923  out.etaStrip14.cr16.phi = 16;
924  out.etaStrip14.cr17.energy = temporary[Eta + 14][Phi + 17].energy;
925  out.etaStrip14.cr17.eta = 14;
926  out.etaStrip14.cr17.phi = 17;
927  out.etaStrip14.cr18.energy = temporary[Eta + 14][Phi + 18].energy;
928  out.etaStrip14.cr18.eta = 14;
929  out.etaStrip14.cr18.phi = 18;
930  out.etaStrip14.cr19.energy = temporary[Eta + 14][Phi + 19].energy;
931  out.etaStrip14.cr19.eta = 14;
932  out.etaStrip14.cr19.phi = 19;
933 
934  return out;
935 }
936 
937 //--------------------------------------------------------//
938 
939 // Compare two ecaltp_t and return the one with the larger pT.
940 inline p2eg::ecaltp_t p2eg::bestOf2(const p2eg::ecaltp_t ecaltp0, const p2eg::ecaltp_t ecaltp1) {
942  x = (ecaltp0.energy > ecaltp1.energy) ? ecaltp0 : ecaltp1;
943 
944  return x;
945 }
946 
947 //--------------------------------------------------------//
948 
949 // For a given etaStrip_t, find the ecaltp_t (out of 20 of them) with the largest pT, using pairwise comparison
951  p2eg::ecaltp_t best01 = p2eg::bestOf2(etaStrip.cr0, etaStrip.cr1);
952  p2eg::ecaltp_t best23 = p2eg::bestOf2(etaStrip.cr2, etaStrip.cr3);
953  p2eg::ecaltp_t best45 = p2eg::bestOf2(etaStrip.cr4, etaStrip.cr5);
954  p2eg::ecaltp_t best67 = p2eg::bestOf2(etaStrip.cr6, etaStrip.cr7);
955  p2eg::ecaltp_t best89 = p2eg::bestOf2(etaStrip.cr8, etaStrip.cr9);
956  p2eg::ecaltp_t best1011 = p2eg::bestOf2(etaStrip.cr10, etaStrip.cr11);
957  p2eg::ecaltp_t best1213 = p2eg::bestOf2(etaStrip.cr12, etaStrip.cr13);
958  p2eg::ecaltp_t best1415 = p2eg::bestOf2(etaStrip.cr14, etaStrip.cr15);
959  p2eg::ecaltp_t best1617 = p2eg::bestOf2(etaStrip.cr16, etaStrip.cr17);
960  p2eg::ecaltp_t best1819 = p2eg::bestOf2(etaStrip.cr18, etaStrip.cr19);
961 
962  p2eg::ecaltp_t best0123 = p2eg::bestOf2(best01, best23);
963  p2eg::ecaltp_t best4567 = p2eg::bestOf2(best45, best67);
964  p2eg::ecaltp_t best891011 = p2eg::bestOf2(best89, best1011);
965  p2eg::ecaltp_t best12131415 = p2eg::bestOf2(best1213, best1415);
966  p2eg::ecaltp_t best16171819 = p2eg::bestOf2(best1617, best1819);
967 
968  p2eg::ecaltp_t best01234567 = p2eg::bestOf2(best0123, best4567);
969  p2eg::ecaltp_t best89101112131415 = p2eg::bestOf2(best891011, best12131415);
970 
971  p2eg::ecaltp_t best0to15 = p2eg::bestOf2(best01234567, best89101112131415);
972  p2eg::ecaltp_t bestOf20 = p2eg::bestOf2(best0to15, best16171819);
973 
974  return bestOf20;
975 }
976 
977 //--------------------------------------------------------//
978 
979 // For a given etaStripPeak_t (representing the 15 crystals, one per row in eta, not necessarily with the same phi),
980 // return the crystal with the highest pT).
981 
984 
985  p2eg::ecaltp_t best01 = p2eg::bestOf2(etaStrip.pk0, etaStrip.pk1);
986  p2eg::ecaltp_t best23 = p2eg::bestOf2(etaStrip.pk2, etaStrip.pk3);
987  p2eg::ecaltp_t best45 = p2eg::bestOf2(etaStrip.pk4, etaStrip.pk5);
988  p2eg::ecaltp_t best67 = p2eg::bestOf2(etaStrip.pk6, etaStrip.pk7);
989  p2eg::ecaltp_t best89 = p2eg::bestOf2(etaStrip.pk8, etaStrip.pk9);
990  p2eg::ecaltp_t best1011 = p2eg::bestOf2(etaStrip.pk10, etaStrip.pk11);
991  p2eg::ecaltp_t best1213 = p2eg::bestOf2(etaStrip.pk12, etaStrip.pk13);
992 
993  p2eg::ecaltp_t best0123 = p2eg::bestOf2(best01, best23);
994  p2eg::ecaltp_t best4567 = p2eg::bestOf2(best45, best67);
995  p2eg::ecaltp_t best891011 = p2eg::bestOf2(best89, best1011);
996  p2eg::ecaltp_t best121314 = p2eg::bestOf2(best1213, etaStrip.pk14);
997 
998  p2eg::ecaltp_t best01234567 = p2eg::bestOf2(best0123, best4567);
999  p2eg::ecaltp_t best891011121314 = p2eg::bestOf2(best891011, best121314);
1000 
1001  p2eg::ecaltp_t bestOf15 = p2eg::bestOf2(best01234567, best891011121314);
1002 
1003  x.energy = bestOf15.energy;
1004  x.etaMax = bestOf15.eta;
1005  x.phiMax = bestOf15.phi;
1006 
1007  return x;
1008 }
1009 
1010 //--------------------------------------------------------//
1011 
1012 // Take a 3x4 ECAL region (i.e. 15x20 in crystals, add crystal energies in squares of 5x5, giving
1013 // 3x4 = 12 ECAL tower sums.) Store these 12 values in towerEt.
1014 
1016  ap_uint<12> towerEt[12]) {
1018  ap_uint<12> towerEtN[3][4][5];
1019  for (int i = 0; i < p2eg::CRYSTAL_IN_ETA; i++) {
1020  for (int k = 0; k < p2eg::CRYSTAL_IN_PHI; k++) {
1021  temp[i][k] = tempX[i][k].energy;
1022  }
1023  }
1024 
1025  for (int i = 0; i < p2eg::CRYSTAL_IN_ETA; i = i + 5) {
1026  for (int k = 0; k < p2eg::CRYSTAL_IN_PHI; k = k + 5) {
1027  towerEtN[i / 5][k / 5][0] = temp[i][k] + temp[i][k + 1] + temp[i][k + 2] + temp[i][k + 3] + temp[i][k + 4];
1028  towerEtN[i / 5][k / 5][1] =
1029  temp[i + 1][k] + temp[i + 1][k + 1] + temp[i + 1][k + 2] + temp[i + 1][k + 3] + temp[i + 1][k + 4];
1030  towerEtN[i / 5][k / 5][2] =
1031  temp[i + 2][k] + temp[i + 2][k + 1] + temp[i + 2][k + 2] + temp[i + 2][k + 3] + temp[i + 2][k + 4];
1032  towerEtN[i / 5][k / 5][3] =
1033  temp[i + 3][k] + temp[i + 3][k + 1] + temp[i + 3][k + 2] + temp[i + 3][k + 3] + temp[i + 3][k + 4];
1034  towerEtN[i / 5][k / 5][4] =
1035  temp[i + 4][k] + temp[i + 4][k + 1] + temp[i + 4][k + 2] + temp[i + 4][k + 3] + temp[i + 4][k + 4];
1036  }
1037  }
1038 
1039  towerEt[0] = towerEtN[0][0][0] + towerEtN[0][0][1] + towerEtN[0][0][2] + towerEtN[0][0][3] + towerEtN[0][0][4];
1040  towerEt[1] = towerEtN[0][1][0] + towerEtN[0][1][1] + towerEtN[0][1][2] + towerEtN[0][1][3] + towerEtN[0][1][4];
1041  towerEt[2] = towerEtN[0][2][0] + towerEtN[0][2][1] + towerEtN[0][2][2] + towerEtN[0][2][3] + towerEtN[0][2][4];
1042  towerEt[3] = towerEtN[0][3][0] + towerEtN[0][3][1] + towerEtN[0][3][2] + towerEtN[0][3][3] + towerEtN[0][3][4];
1043  towerEt[4] = towerEtN[1][0][0] + towerEtN[1][0][1] + towerEtN[1][0][2] + towerEtN[1][0][3] + towerEtN[1][0][4];
1044  towerEt[5] = towerEtN[1][1][0] + towerEtN[1][1][1] + towerEtN[1][1][2] + towerEtN[1][1][3] + towerEtN[1][1][4];
1045  towerEt[6] = towerEtN[1][2][0] + towerEtN[1][2][1] + towerEtN[1][2][2] + towerEtN[1][2][3] + towerEtN[1][2][4];
1046  towerEt[7] = towerEtN[1][3][0] + towerEtN[1][3][1] + towerEtN[1][3][2] + towerEtN[1][3][3] + towerEtN[1][3][4];
1047  towerEt[8] = towerEtN[2][0][0] + towerEtN[2][0][1] + towerEtN[2][0][2] + towerEtN[2][0][3] + towerEtN[2][0][4];
1048  towerEt[9] = towerEtN[2][1][0] + towerEtN[2][1][1] + towerEtN[2][1][2] + towerEtN[2][1][3] + towerEtN[2][1][4];
1049  towerEt[10] = towerEtN[2][2][0] + towerEtN[2][2][1] + towerEtN[2][2][2] + towerEtN[2][2][3] + towerEtN[2][2][4];
1050  towerEt[11] = towerEtN[2][3][0] + towerEtN[2][3][1] + towerEtN[2][3][2] + towerEtN[2][3][3] + towerEtN[2][3][4];
1051 
1052  ap_uint<12> totalEt;
1053  for (int i = 0; i < 12; i++) {
1054  totalEt += towerEt[i];
1055  }
1056 }
1057 
1058 //--------------------------------------------------------//
1059 
1061  p2eg::etaStripPeak_t etaStripPeak;
1062  p2eg::clusterInfo cluster;
1063 
1064  etaStripPeak.pk0 = p2eg::getPeakBin20N(ecalRegion.etaStrip0);
1065  etaStripPeak.pk1 = p2eg::getPeakBin20N(ecalRegion.etaStrip1);
1066  etaStripPeak.pk2 = p2eg::getPeakBin20N(ecalRegion.etaStrip2);
1067  etaStripPeak.pk3 = p2eg::getPeakBin20N(ecalRegion.etaStrip3);
1068  etaStripPeak.pk4 = p2eg::getPeakBin20N(ecalRegion.etaStrip4);
1069  etaStripPeak.pk5 = p2eg::getPeakBin20N(ecalRegion.etaStrip5);
1070  etaStripPeak.pk6 = p2eg::getPeakBin20N(ecalRegion.etaStrip6);
1071  etaStripPeak.pk7 = p2eg::getPeakBin20N(ecalRegion.etaStrip7);
1072  etaStripPeak.pk8 = p2eg::getPeakBin20N(ecalRegion.etaStrip8);
1073  etaStripPeak.pk9 = p2eg::getPeakBin20N(ecalRegion.etaStrip9);
1074  etaStripPeak.pk10 = p2eg::getPeakBin20N(ecalRegion.etaStrip10);
1075  etaStripPeak.pk11 = p2eg::getPeakBin20N(ecalRegion.etaStrip11);
1076  etaStripPeak.pk12 = p2eg::getPeakBin20N(ecalRegion.etaStrip12);
1077  etaStripPeak.pk13 = p2eg::getPeakBin20N(ecalRegion.etaStrip13);
1078  etaStripPeak.pk14 = p2eg::getPeakBin20N(ecalRegion.etaStrip14);
1079 
1080  p2eg::crystalMax peakIn15;
1081  peakIn15 = p2eg::getPeakBin15N(etaStripPeak);
1082 
1083  cluster.seedEnergy = peakIn15.energy;
1084  cluster.energy = 0;
1085  cluster.etaMax = peakIn15.etaMax;
1086  cluster.phiMax = peakIn15.phiMax;
1087  cluster.brems = 0;
1088  cluster.et5x5 = 0;
1089  cluster.et2x5 = 0;
1090 
1091  return cluster;
1092 }
1093 
1094 //--------------------------------------------------------//
1095 
1096 /*
1097 * Return initialized cluster with specified Et, eta, phi, with all other fields (saturation, Et2x5, Et5x5, brems, flags initialized to 0/ false).
1098 */
1099 inline p2eg::Cluster p2eg::packCluster(ap_uint<15>& clusterEt, ap_uint<5>& etaMax_t, ap_uint<5>& phiMax_t) {
1100  ap_uint<12> peggedEt;
1102 
1103  ap_uint<5> towerEta = (etaMax_t) / 5;
1104  ap_uint<2> towerPhi = (phiMax_t) / 5;
1105  ap_uint<3> clusterEta = etaMax_t - 5 * towerEta;
1106  ap_uint<3> clusterPhi = phiMax_t - 5 * towerPhi;
1107 
1108  peggedEt = (clusterEt > 0xFFF) ? (ap_uint<12>)0xFFF : (ap_uint<12>)clusterEt;
1109 
1110  pack = p2eg::Cluster(peggedEt, towerEta, towerPhi, clusterEta, clusterPhi, 0);
1111 
1112  return pack;
1113 }
1114 
1115 //--------------------------------------------------------//
1116 
1117 // Given the cluster seed_eta, seed_phi, and brems, remove the cluster energy
1118 // from the given crystal array temp. Functionally identical to "RemoveTmp".
1119 
1121  ap_uint<5> seed_eta,
1122  ap_uint<5> seed_phi,
1123  ap_uint<2> brems) {
1124  // Zero out the crystal energies in a 3 (eta) by 5 (phi) window (the clusters are 3x5 in crystals)
1125  for (int i = 0; i < p2eg::CRYSTAL_IN_ETA; i++) {
1126  for (int k = 0; k < p2eg::CRYSTAL_IN_PHI; k++) {
1127  if ((i >= (seed_eta - 1)) && (i <= (seed_eta + 1)) && (k >= (seed_phi - 2)) && (k <= (seed_phi + 2))) {
1128  temp[i][k].energy = 0;
1129  }
1130  }
1131  }
1132 
1133  // If brems flag is 1, *also* zero the energies in the 3x5 window to the "left" of the cluster
1134  // N.B. in the positive eta cards, "left" in the region = towards negative phi,
1135  // but for negative eta cards, everything is flipped, so "left" in the region" = towards positive phi
1136  if (brems == 1) {
1137  for (int i = 0; i < p2eg::CRYSTAL_IN_ETA; i++) {
1138  for (int k = 0; k < p2eg::CRYSTAL_IN_PHI; k++) {
1139  if ((i >= (seed_eta - 1)) && (i <= (seed_eta + 1)) && (k >= (seed_phi - 2 - 5)) && (k <= (seed_phi + 2 - 5))) {
1140  temp[i][k].energy = 0;
1141  }
1142  }
1143  }
1144  }
1145  // If brems flag is 2, *also* zero the energies in the 3x5 window to the "right" of the cluster
1146  // N.B. in the positive eta cards, "right" in the region = towards POSITIVE phi,
1147  // but for negative eta cards, everything is flipped, so "right" in the region = towards NEGATIVE phi
1148  else if (brems == 2) {
1149  for (int i = 0; i < p2eg::CRYSTAL_IN_ETA; i++) {
1150  for (int k = 0; k < p2eg::CRYSTAL_IN_PHI; k++) {
1151  if ((i >= (seed_eta - 1)) && (i <= (seed_eta + 1)) && (k >= (seed_phi - 2 + 5)) && (k <= (seed_phi + 2 + 5))) {
1152  temp[i][k].energy = 0;
1153  }
1154  }
1155  }
1156  }
1157 }
1158 
1159 //--------------------------------------------------------//
1160 
1161 // Given a 15x20 crystal tempX, and a seed with seed_eta and seed_phi, return a clusterInfo containing
1162 // the cluster energy for a positive bremmstrahulung shift
1163 
1165  ap_uint<5> seed_eta,
1166  ap_uint<5> seed_phi) {
1167  ap_uint<12> temp[p2eg::CRYSTAL_IN_ETA + 2][p2eg::CRYSTAL_IN_PHI + 4];
1168  ap_uint<12> phi0eta[3], phi1eta[3], phi2eta[3], phi3eta[3], phi4eta[3];
1169  ap_uint<12> eta_slice[3];
1170  p2eg::clusterInfo cluster_tmp;
1171 
1172  // Set all entries in a new ((15+2)x(20+4)) array to be zero.
1173  for (int i = 0; i < (p2eg::CRYSTAL_IN_ETA + 2); i++) {
1174  for (int j = 0; j < (p2eg::CRYSTAL_IN_PHI + 4); j++) {
1175  temp[i][j] = 0;
1176  }
1177  }
1178 
1179  // Read the energies of the input crystal tempX into the slightly larger array temp, with an offset so temp is tempX
1180  // except shifted +1 in eta, and -3 in phi.
1181  for (int i = 0; i < (p2eg::CRYSTAL_IN_ETA); i++) {
1182  for (int j = 0; j < (p2eg::CRYSTAL_IN_PHI - 3); j++) {
1183  temp[i + 1][j] = tempX[i][j + 3].energy;
1184  }
1185  }
1186 
1187  ap_uint<6> seed_eta1, seed_phi1;
1188  seed_eta1 = seed_eta; //to start from corner
1189  seed_phi1 = seed_phi; //to start from corner
1190 
1191  // now we are in the left bottom corner
1192  // Loop over the shifted array, and at the original location of the seed (seed_eta1/seed_phi1),
1193  // read a 3 (eta) x 5 (phi) rectangle of crystals where the original location of the seed is in the bottom left corner
1194  for (int j = 0; j < p2eg::CRYSTAL_IN_ETA; j++) {
1195  if (j == seed_eta1) {
1196  for (int k = 0; k < p2eg::CRYSTAL_IN_PHI; k++) {
1197  if (k == seed_phi1) {
1198  // Same eta as the seed, read next five crystals in phi
1199  phi0eta[0] = temp[j][k];
1200  phi1eta[0] = temp[j][k + 1];
1201  phi2eta[0] = temp[j][k + 2];
1202  phi3eta[0] = temp[j][k + 3];
1203  phi4eta[0] = temp[j][k + 4];
1204 
1205  // +1 eta from the seed, read next five crystals in phi
1206  phi0eta[1] = temp[j + 1][k];
1207  phi1eta[1] = temp[j + 1][k + 1];
1208  phi2eta[1] = temp[j + 1][k + 2];
1209  phi3eta[1] = temp[j + 1][k + 3];
1210  phi4eta[1] = temp[j + 1][k + 4];
1211 
1212  // +2 eta from the seed, read next five crystals in phi
1213  phi0eta[2] = temp[j + 2][k];
1214  phi1eta[2] = temp[j + 2][k + 1];
1215  phi2eta[2] = temp[j + 2][k + 2];
1216  phi3eta[2] = temp[j + 2][k + 3];
1217  phi4eta[2] = temp[j + 2][k + 4];
1218 
1219  continue;
1220  }
1221  }
1222  }
1223  }
1224 
1225  // Add up the energies in this 3x5 of crystals, initialize a cluster_tmp, and return it
1226  for (int i = 0; i < 3; i++) {
1227  eta_slice[i] = phi0eta[i] + phi1eta[i] + phi2eta[i] + phi3eta[i] + phi4eta[i];
1228  }
1229  cluster_tmp.energy = (eta_slice[0] + eta_slice[1] + eta_slice[2]);
1230 
1231  return cluster_tmp;
1232 }
1233 
1234 //--------------------------------------------------------//
1235 
1236 // Given a 15x20 crystal tempX, and a seed with seed_eta and seed_phi, return a clusterInfo containing
1237 // the cluster energy for a *negative* bremmstrahlung shift
1238 
1240  ap_uint<5> seed_eta,
1241  ap_uint<5> seed_phi) {
1242  ap_uint<12> temp[p2eg::CRYSTAL_IN_ETA + 2][p2eg::CRYSTAL_IN_PHI + 4];
1243  ap_uint<12> phi0eta[3], phi1eta[3], phi2eta[3], phi3eta[3], phi4eta[3];
1244 
1245  ap_uint<12> eta_slice[3];
1246 
1247  p2eg::clusterInfo cluster_tmp;
1248 
1249  // Initialize all entries in a new ((15+2)x(20+4)) array to be zero.
1250  for (int i = 0; i < (p2eg::CRYSTAL_IN_ETA + 2); i++) {
1251  for (int j = 0; j < (p2eg::CRYSTAL_IN_PHI + 4); j++) {
1252  temp[i][j] = 0;
1253  }
1254  }
1255 
1256  // Read the energies of the input crystal tempX into the slightly larger array temp, with an offset so temp is tempX
1257  // except shifted in +1 in eta and +7 in phi
1258  for (int i = 0; i < (p2eg::CRYSTAL_IN_ETA); i++) {
1259  for (int j = 0; j < (p2eg::CRYSTAL_IN_PHI - 1); j++) {
1260  temp[i + 1][j + 7] = tempX[i][j].energy;
1261  }
1262  }
1263 
1264  ap_uint<6> seed_eta1, seed_phi1;
1265  seed_eta1 = seed_eta; //to start from corner
1266  seed_phi1 = seed_phi; //to start from corner
1267 
1268  // Loop over the shifted array, and at the original location of the seed (seed_eta1/seed_phi1),
1269  // read a 3 (eta) x 5 (phi) rectangle of crystals where the original location of the seed is in the bottom left corner
1270  for (int j = 0; j < p2eg::CRYSTAL_IN_ETA; j++) {
1271  if (j == seed_eta1) {
1272  for (int k = 0; k < p2eg::CRYSTAL_IN_PHI; k++) {
1273  if (k == seed_phi1) {
1274  // Same eta as the seed, read next five crystals in phi
1275  phi0eta[0] = temp[j][k];
1276  phi1eta[0] = temp[j][k + 1];
1277  phi2eta[0] = temp[j][k + 2];
1278  phi3eta[0] = temp[j][k + 3];
1279  phi4eta[0] = temp[j][k + 4];
1280 
1281  // +1 eta from the seed, read next five crystals in phi
1282  phi0eta[1] = temp[j + 1][k];
1283  phi1eta[1] = temp[j + 1][k + 1];
1284  phi2eta[1] = temp[j + 1][k + 2];
1285  phi3eta[1] = temp[j + 1][k + 3];
1286  phi4eta[1] = temp[j + 1][k + 4];
1287 
1288  // +2 eta from the seed, read next five crystals in phi
1289  phi0eta[2] = temp[j + 2][k];
1290  phi1eta[2] = temp[j + 2][k + 1];
1291  phi2eta[2] = temp[j + 2][k + 2];
1292  phi3eta[2] = temp[j + 2][k + 3];
1293  phi4eta[2] = temp[j + 2][k + 4];
1294  continue;
1295  }
1296  }
1297  }
1298  }
1299 
1300  // Add up the energies in this 3x5 of crystals, initialize a cluster_tmp, and return it
1301  for (int i = 0; i < 3; i++) {
1302  eta_slice[i] = phi0eta[i] + phi1eta[i] + phi2eta[i] + phi3eta[i] + phi4eta[i];
1303  }
1304  cluster_tmp.energy = (eta_slice[0] + eta_slice[1] + eta_slice[2]);
1305 
1306  return cluster_tmp;
1307 }
1308 
1309 //--------------------------------------------------------//
1310 
1311 // Given a 15x20 crystal tempX, and a seed with seed_eta and seed_phi, return a clusterInfo containing
1312 // the cluster energy (central value)
1313 
1315  ap_uint<5> seed_eta,
1316  ap_uint<5> seed_phi) {
1317  ap_uint<12> temp[p2eg::CRYSTAL_IN_ETA + 4][p2eg::CRYSTAL_IN_PHI + 4];
1318  ap_uint<12> phi0eta[5], phi1eta[5], phi2eta[5], phi3eta[5], phi4eta[5];
1319  ap_uint<12> eta_slice[5];
1320  ap_uint<12> et2x5_1Tot, et2x5_2Tot, etSum2x5;
1321  ap_uint<12> et5x5Tot;
1322 
1323  p2eg::clusterInfo cluster_tmp;
1324  // Initialize empty (15+4)x(20+4) array
1325  for (int i = 0; i < (p2eg::CRYSTAL_IN_ETA + 4); i++) {
1326  for (int k = 0; k < (p2eg::CRYSTAL_IN_PHI + 4); k++) {
1327  temp[i][k] = 0;
1328  }
1329  }
1330 
1331  // Copy input array energies into temp array with +2 eta and +2 phi offset.
1332  for (int i = 0; i < (p2eg::CRYSTAL_IN_ETA); i++) {
1333  for (int k = 0; k < (p2eg::CRYSTAL_IN_PHI); k++) {
1334  temp[i + 2][k + 2] = tempX[i][k].energy;
1335  }
1336  }
1337 
1338  ap_uint<6> seed_eta1, seed_phi1;
1339  seed_eta1 = seed_eta; //to start from corner
1340  seed_phi1 = seed_phi; //to start from corner
1341 
1342  // now we are in the left bottom corner
1343  // Loop over the shifted array, and at the original location of the seed (seed_eta1/seed_phi1),
1344  // read a 5 (eta) x 5 (phi) rectangle of crystals where the original location of the seed is in the bottom left corner
1345  for (int j = 0; j < p2eg::CRYSTAL_IN_ETA; j++) {
1346  if (j == seed_eta1) {
1347  for (int k = 0; k < p2eg::CRYSTAL_IN_PHI; k++) {
1348  if (k == seed_phi1) {
1349  // Same eta as the seed, read next five crystals in phi
1350  phi0eta[0] = temp[j][k];
1351  phi1eta[0] = temp[j][k + 1];
1352  phi2eta[0] = temp[j][k + 2];
1353  phi3eta[0] = temp[j][k + 3];
1354  phi4eta[0] = temp[j][k + 4];
1355 
1356  // +1 eta from the seed, read next five crystals in phi
1357  phi0eta[1] = temp[j + 1][k];
1358  phi1eta[1] = temp[j + 1][k + 1];
1359  phi2eta[1] = temp[j + 1][k + 2];
1360  phi3eta[1] = temp[j + 1][k + 3];
1361  phi4eta[1] = temp[j + 1][k + 4];
1362 
1363  // +2 eta from the seed, read next five crystals in phi
1364  phi0eta[2] = temp[j + 2][k];
1365  phi1eta[2] = temp[j + 2][k + 1];
1366  phi2eta[2] = temp[j + 2][k + 2];
1367  phi3eta[2] = temp[j + 2][k + 3];
1368  phi4eta[2] = temp[j + 2][k + 4];
1369 
1370  // +3 eta from the seed, read next five crystals in phi
1371  phi0eta[3] = temp[j + 3][k];
1372  phi1eta[3] = temp[j + 3][k + 1];
1373  phi2eta[3] = temp[j + 3][k + 2];
1374  phi3eta[3] = temp[j + 3][k + 3];
1375  phi4eta[3] = temp[j + 3][k + 4];
1376 
1377  // +4 eta from the seed, read next five crystals in phi
1378  phi0eta[4] = temp[j + 4][k];
1379  phi1eta[4] = temp[j + 4][k + 1];
1380  phi2eta[4] = temp[j + 4][k + 2];
1381  phi3eta[4] = temp[j + 4][k + 3];
1382  phi4eta[4] = temp[j + 4][k + 4];
1383 
1384  continue;
1385  }
1386  }
1387  }
1388  }
1389 
1390  // Add the first three eta strips into the cluster energy
1391  for (int i = 0; i < 5; i++) {
1392  eta_slice[i] = phi0eta[i] + phi1eta[i] + phi2eta[i] + phi3eta[i] + phi4eta[i];
1393  }
1394 
1395  cluster_tmp.energy = (eta_slice[1] + eta_slice[2] + eta_slice[3]);
1396 
1397  // Get the energy totals in the 5x5 and also in two 2x5
1398  et5x5Tot = (eta_slice[0] + eta_slice[1] + eta_slice[2] + eta_slice[3] + eta_slice[4]);
1399  et2x5_1Tot = (eta_slice[1] + eta_slice[2]);
1400  et2x5_2Tot = (eta_slice[2] + eta_slice[3]);
1401 
1402  if (et2x5_1Tot >= et2x5_2Tot)
1403  etSum2x5 = et2x5_1Tot;
1404  else
1405  etSum2x5 = et2x5_2Tot;
1406 
1407  cluster_tmp.et5x5 = et5x5Tot;
1408  cluster_tmp.et2x5 = etSum2x5;
1409 
1410  return cluster_tmp;
1411 }
1412 
1413 //--------------------------------------------------------//
1414 
1415 // In 15x20 crystal array temp, return the next cluster, and remove the cluster's energy
1416 // from the crystal array.
1417 
1419  p2eg::Cluster returnCluster;
1420  p2eg::clusterInfo cluster_tmp;
1421  p2eg::clusterInfo cluster_tmpCenter;
1422  p2eg::clusterInfo cluster_tmpBneg;
1423  p2eg::clusterInfo cluster_tmpBpos;
1424 
1425  p2eg::ecalRegion_t ecalRegion;
1426  ecalRegion = p2eg::initStructure(temp);
1427 
1428  cluster_tmp = p2eg::getClusterPosition(ecalRegion);
1429 
1430  float seedEnergyFloat = cluster_tmp.seedEnergy / 8.0;
1431 
1432  // Do not make cluster if seed is less than 1.0 GeV
1433  if (seedEnergyFloat < 1.0) {
1434  cluster_tmp.energy = 0;
1435  cluster_tmp.phiMax = 0;
1436  cluster_tmp.etaMax = 0;
1437  return p2eg::packCluster(cluster_tmp.energy, cluster_tmp.phiMax, cluster_tmp.etaMax);
1438  }
1439 
1440  ap_uint<5> seed_phi = cluster_tmp.phiMax;
1441  ap_uint<5> seed_eta = cluster_tmp.etaMax;
1442 
1443  cluster_tmpCenter = p2eg::getClusterValues(temp, seed_eta, seed_phi);
1444  cluster_tmpBneg = p2eg::getBremsValuesNeg(temp, seed_eta, seed_phi);
1445  cluster_tmpBpos = p2eg::getBremsValuesPos(temp, seed_eta, seed_phi);
1446 
1447  cluster_tmp.energy = cluster_tmpCenter.energy;
1448  cluster_tmp.brems = 0;
1449 
1450  // Create a cluster
1451  if ((cluster_tmpBneg.energy > cluster_tmpCenter.energy / 8) && (cluster_tmpBneg.energy > cluster_tmpBpos.energy)) {
1452  cluster_tmp.energy = (cluster_tmpCenter.energy + cluster_tmpBneg.energy);
1453  cluster_tmp.brems = 1;
1454  } else if (cluster_tmpBpos.energy > cluster_tmpCenter.energy / 8) {
1455  cluster_tmp.energy = (cluster_tmpCenter.energy + cluster_tmpBpos.energy);
1456  cluster_tmp.brems = 2;
1457  }
1458 
1459  returnCluster = p2eg::packCluster(cluster_tmp.energy, cluster_tmp.etaMax, cluster_tmp.phiMax);
1460  p2eg::removeClusterFromCrystal(temp, seed_eta, seed_phi, cluster_tmp.brems);
1461 
1462  // Add clusterInfo members to the output cluster members
1463  returnCluster.brems = cluster_tmp.brems;
1464  returnCluster.et5x5 = cluster_tmpCenter.et5x5; // get et5x5 from the center value
1465  returnCluster.et2x5 = cluster_tmpCenter.et2x5; // get et2x5 from the center value
1466 
1467  return returnCluster;
1468 }
1469 
1470 //--------------------------------------------------------//
1471 
1472 // Stitch clusters in cluster_list across the boundary specified by
1473 // towerEtaUpper and towerEtaLower (using RCT card notation). Modifies the input vector
1474 // (passed by reference). If two clusters are combined, modify the higher-energy cluster and
1475 // zero out the energy of the smaller-energy cluster.
1476 // cc is the RCT card number (for print-out statements only).
1477 
1478 inline void p2eg::stitchClusterOverRegionBoundary(std::vector<Cluster>& cluster_list,
1479  int towerEtaUpper,
1480  int towerEtaLower,
1481  int cc) {
1482  (void)cc; // for printout statements
1483 
1484  int crystalEtaUpper = 0;
1485  int crystalEtaLower = 4;
1486 
1487  for (size_t i = 0; i < cluster_list.size(); i++) {
1488  for (size_t j = 0; j < cluster_list.size(); j++) {
1489  // Do not double-count
1490  if (i == j)
1491  continue;
1492 
1493  p2eg::Cluster c1 = cluster_list[i];
1494  p2eg::Cluster c2 = cluster_list[j];
1495 
1496  p2eg::Cluster newc1;
1497  p2eg::Cluster newc2;
1498 
1499  // Use the .towerEtaInCard() method to get the tower eta in the entire RCT card
1500  if ((c1.clusterEnergy() > 0) && (c1.towerEtaInCard() == towerEtaUpper) && (c1.clusterEta() == crystalEtaUpper)) {
1501  if ((c2.clusterEnergy() > 0) && (c2.towerEtaInCard() == towerEtaLower) &&
1502  (c2.clusterEta() == crystalEtaLower)) {
1503  ap_uint<5> phi1 = c1.towerPhi() * 5 + c1.clusterPhi();
1504  ap_uint<5> phi2 = c2.towerPhi() * 5 + c2.clusterPhi();
1505  ap_uint<5> dPhi;
1506  dPhi = (phi1 > phi2) ? (phi1 - phi2) : (phi2 - phi1);
1507 
1508  if (dPhi < 2) {
1509  ap_uint<15> totalEnergy = c1.clusterEnergy() + c2.clusterEnergy();
1510  ap_uint<15> totalEt2x5 = c1.uint_et2x5() + c2.uint_et2x5();
1511  ap_uint<15> totalEt5x5 = c1.uint_et5x5() + c2.uint_et5x5();
1512 
1513  bool rct_is_iso = false; // RCT has no isolation information
1514  bool rct_is_looseTkiso = false; // RCT has no isolation information
1515 
1516  // Initialize a cluster with the larger cluster's position and total energy
1517  if (c1.clusterEnergy() > c2.clusterEnergy()) {
1518  newc1 = p2eg::Cluster(totalEnergy,
1519  c1.towerEta(),
1520  c1.towerPhi(),
1521  c1.clusterEta(),
1522  c1.clusterPhi(),
1523  c1.satur(),
1524  totalEt5x5,
1525  totalEt2x5,
1526  c1.getBrems(),
1527  c1.getIsSS(),
1528  c1.getIsLooseTkss(),
1529  rct_is_iso,
1530  rct_is_looseTkiso,
1531  c1.region());
1532  newc2 = p2eg::Cluster(0,
1533  c2.towerEta(),
1534  c2.towerPhi(),
1535  c2.clusterEta(),
1536  c2.clusterPhi(),
1537  c2.satur(),
1538  0,
1539  0,
1540  0,
1541  false,
1542  false,
1543  rct_is_iso,
1544  rct_is_looseTkiso,
1545  c2.region());
1546  cluster_list[i] = newc1;
1547  cluster_list[j] = newc2;
1548  } else {
1549  // Analogous to above portion
1550  newc1 = p2eg::Cluster(0,
1551  c1.towerEta(),
1552  c1.towerPhi(),
1553  c1.clusterEta(),
1554  c1.clusterPhi(),
1555  c1.satur(),
1556  0,
1557  0,
1558  0,
1559  false,
1560  false,
1561  rct_is_iso,
1562  rct_is_looseTkiso,
1563  c1.region());
1564  newc2 = p2eg::Cluster(totalEnergy,
1565  c2.towerEta(),
1566  c2.towerPhi(),
1567  c2.clusterEta(),
1568  c2.clusterPhi(),
1569  c2.satur(),
1570  totalEt5x5,
1571  totalEt2x5,
1572  c2.getBrems(),
1573  c2.getIsSS(),
1574  c2.getIsLooseTkss(),
1575  rct_is_iso,
1576  rct_is_looseTkiso,
1577  c2.region());
1578  cluster_list[i] = newc1;
1579  cluster_list[j] = newc2;
1580  }
1581  }
1582  }
1583  }
1584  }
1585  }
1586 }
1587 
1588 //--------------------------------------------------------//
1589 
1590 #endif
ap_uint< 3 > clusterEta() const
def pack(high, low)
void getECALTowersEt(crystal tempX[CRYSTAL_IN_ETA][CRYSTAL_IN_PHI], ap_uint< 12 > towerEt[12])
ap_uint< 15 > uint_et2x5() const
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
clusterInfo getClusterValues(crystal tempX[CRYSTAL_IN_ETA][CRYSTAL_IN_PHI], ap_uint< 5 > seed_eta, ap_uint< 5 > seed_phi)
clusterInfo getClusterPosition(const ecalRegion_t ecalRegion)
Definition: Phase2L1RCT.h:1060
ap_uint< 15 > uint_et5x5() const
void removeClusterFromCrystal(crystal temp[CRYSTAL_IN_ETA][CRYSTAL_IN_PHI], ap_uint< 5 > seed_eta, ap_uint< 5 > seed_phi, ap_uint< 2 > brems)
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
static constexpr int CRYSTAL_IN_ETA
Cluster getClusterFromRegion3x4(crystal temp[CRYSTAL_IN_ETA][CRYSTAL_IN_PHI])
ecalRegion_t initStructure(crystal temporary[CRYSTAL_IN_ETA][CRYSTAL_IN_PHI])
ecaltp_t getPeakBin20N(const etaStrip_t etaStrip)
Definition: Phase2L1RCT.h:950
ap_uint< 5 > towerEta() const
ap_uint< 3 > satur() const
void stitchClusterOverRegionBoundary(std::vector< Cluster > &cluster_list, int towerEtaUpper, int towerEtaLower, int cc)
Definition: Phase2L1RCT.h:1478
ap_uint< 3 > clusterPhi() const
ap_uint< 2 > towerPhi() const
clusterInfo getBremsValuesPos(crystal tempX[CRYSTAL_IN_ETA][CRYSTAL_IN_PHI], ap_uint< 5 > seed_eta, ap_uint< 5 > seed_phi)
ap_uint< 12 > clusterEnergy() const
float x
crystalMax getPeakBin15N(const etaStripPeak_t etaStrip)
Definition: Phase2L1RCT.h:982
Cluster packCluster(ap_uint< 15 > &clusterEt, ap_uint< 5 > &etaMax_t, ap_uint< 5 > &phiMax_t)
Definition: Phase2L1RCT.h:1099
clusterInfo getBremsValuesNeg(crystal tempX[CRYSTAL_IN_ETA][CRYSTAL_IN_PHI], ap_uint< 5 > seed_eta, ap_uint< 5 > seed_phi)
static constexpr int CRYSTAL_IN_PHI
ecaltp_t bestOf2(const ecaltp_t ecaltp0, const ecaltp_t ecaltp1)
Definition: Phase2L1RCT.h:940