24 declareInterface<IgFEXFPGA>(
this);
41 return StatusCode::SUCCESS;
48 return StatusCode::SUCCESS;
84 if (!gFEXFPGA_gTower50Container.
isValid())
89 int rows = gTowersIDs_central.size();
90 int cols = gTowersIDs_central[0].size();
92 for (
int myrow = 0; myrow <
rows; myrow++)
94 for (
int mycol = 0; mycol <
cols; mycol++)
97 output_gTower_energies[myrow][mycol] = 0;
98 output_gTower50_energies[myrow][mycol] = 0;
99 output_saturation[myrow][mycol] = 0;
101 int towerID = gTowersIDs_central[myrow][mycol];
105 const LVL1::gTower *tmpTower = gFEXFPGA_gTowerContainer->findTower(towerID);
109 tmpTower50 = gFEXFPGA_gTower50Container->findTower(towerID);
112 if (tmpTower ==
nullptr)
115 TowerEt = tmpTower->
getET();
125 gTowersContainer->
push_back(std::move(gTowerEDM));
126 gTowersContainer->
back()->initialize(iEtaFW, iPhiFW,
Eta,
Phi, TowerEt, Fpga, IsSaturated, gFEXtowerID);
128 output_gTower_energies[myrow][mycol] = tmpTower->
getET();
129 output_gTower50_energies[myrow][mycol] = is_mc ? tmpTower50->
getET() * 4. : tmpTower50->
getET();
130 output_saturation[myrow][mycol] = tmpTower->
isSaturated();
165 char IsSaturated = 0;
171 if (!gFEXFPGA_gTower50Container.
isValid())
179 int rows = gTowersIDs_forward_n.size();
180 int cols = gTowersIDs_forward_n[0].size();
182 for (
int myrow = 0; myrow <
rows; myrow++)
184 for (
int mycol = 0; mycol <
cols; mycol++)
187 int towerID = gTowersIDs_forward_n[myrow][mycol];
191 const LVL1::gTower *tmpTower = gFEXFPGA_gTowerContainer->findTower(towerID);
195 tmpTower50 = gFEXFPGA_gTower50Container->findTower(towerID);
198 if (tmpTower ==
nullptr)
201 int TowerEt = tmpTower->
getET();
202 float Eta = tmpTower->
eta();
203 float Phi = tmpTower->
phi();
209 gTowersContainer->
push_back(std::move(gTowerEDM));
210 gTowersContainer->
back()->initialize(iEtaFW, iPhiFW,
Eta,
Phi, TowerEt, Fpga, IsSaturated, gFEXtowerID);
212 output_gTower_energies[iPhiFW][iEtaFW - 2] = tmpTower->
getET();
213 output_gTower50_energies[iPhiFW][iEtaFW - 2] = is_mc ? tmpTower50->
getET() * 4. : tmpTower50->
getET();
214 output_saturation[iPhiFW][iEtaFW - 2] = tmpTower->
isSaturated();
221 rows = gTowersIDs_forward_p.size();
222 cols = gTowersIDs_forward_p[0].size();
224 for (
int myrow = 0; myrow <
rows; myrow++)
226 for (
int mycol = 0; mycol <
cols; mycol++)
229 int towerID = gTowersIDs_forward_p[myrow][mycol];
233 const LVL1::gTower *tmpTower = gFEXFPGA_gTowerContainer->findTower(towerID);
237 tmpTower50 = gFEXFPGA_gTower50Container->findTower(towerID);
240 if (tmpTower ==
nullptr)
243 int TowerEt = tmpTower->
getET();
244 float Eta = tmpTower->
eta();
245 float Phi = tmpTower->
phi();
251 gTowersContainer->
push_back(std::move(gTowerEDM));
252 gTowersContainer->
back()->initialize(iEtaFW, iPhiFW,
Eta,
Phi, TowerEt, Fpga, IsSaturated, gFEXtowerID);
254 output_gTower_energies[iPhiFW][iEtaFW - 32 + 6] = tmpTower->
getET();
255 output_gTower50_energies[iPhiFW][iEtaFW - 32 + 6] = is_mc ? tmpTower50->
getET() * 4. : tmpTower50->
getET();
256 output_saturation[iPhiFW][iEtaFW - 32 + 6] = tmpTower->
isSaturated();
268 int rows = twrs.size();
269 int cols = twrs[0].size();
270 for (
int irow = 0; irow <
rows; irow++)
272 for (
int jcolumn = 0; jcolumn <
cols; jcolumn++)
274 twrs[irow][jcolumn] = twrs[irow][jcolumn] + offsets[irow][jcolumn];
275 calLookup(&twrs[irow][jcolumn], offsets[irow][jcolumn], noiseCuts[irow][jcolumn], slopes[irow][jcolumn]);
301 if (calTower < -2048)
312 int rows = offsets.size();
313 int cols = offsets[0].size();
314 for (
int irow = 0; irow <
rows; irow++)
316 for (
int jcolumn = 0; jcolumn <
cols; jcolumn++)
318 offsets[irow][jcolumn] =
offset;
319 noiseCuts[irow][jcolumn] = columnNoiseCuts[jcolumn];
320 slopes[irow][jcolumn] = columnSlopes[jcolumn];