24 declareInterface<IeFEXTOBEtTool>(
this);
42 return StatusCode::SUCCESS;
47 std::vector<unsigned int> &ClusterCellETs,
48 std::vector<unsigned int> &RetaSums,
49 std::vector<unsigned int> &RhadSums,
50 std::vector<unsigned int> &WstotSums)
56 for (
int iphi = -1; iphi <= 1; ++iphi) {
58 if (phiTable >
M_PI) phiTable -= 2*
M_PI;
59 if (phiTable < -
M_PI) phiTable += 2*
M_PI;
61 for (
int ieta = -1; ieta <= 1; ++ieta) {
65 if (std::abs(etaTable)<2.5) tobtable[iphi+1][ieta+1] =
eTowerID(etaTable, phiTable);
66 else tobtable[iphi+1][ieta+1] = 0;
87 return StatusCode::SUCCESS;
96 for (
int iphi = -1; iphi <= 1; ++iphi) {
98 if (phiTable >
M_PI) phiTable -= 2*
M_PI;
99 if (phiTable < -
M_PI) phiTable += 2*
M_PI;
101 for (
int ieta = -1; ieta <= 1; ++ieta) {
105 if (std::abs(etaTable)<2.5) tobtable[iphi+1][ieta+1] =
eTowerID(etaTable, phiTable);
106 else tobtable[iphi+1][ieta+1] = 0;
112 ClusterCellETs.reserve(99);
114 for (
unsigned int il = 0;
il < 5;
il++) {
116 for (
unsigned int iphi = 0; iphi < 3; iphi++) {
117 for (
unsigned int ieta = 0; ieta < 3; ieta++) {
118 if (tobtable[iphi][ieta]==0){
120 ClusterCellETs.push_back(0);
124 if (tower==
nullptr) {
126 return StatusCode::FAILURE;
129 ClusterCellETs.push_back( tower->
getET(
il,
c) );
153 return StatusCode::SUCCESS;
158 std::vector<unsigned int> &RcoreSums,
159 std::vector<unsigned int> &RemSums)
165 for (
int iphi = -1; iphi <= 1; ++iphi) {
167 if (phiTable >
M_PI) phiTable -= 2*
M_PI;
168 if (phiTable < -
M_PI) phiTable += 2*
M_PI;
170 for (
int ieta = -1; ieta <= 1; ++ieta) {
174 if (std::abs(etaTable)<2.5) tobtable[iphi+1][ieta+1] =
eTowerID(etaTable, phiTable);
175 else tobtable[iphi+1][ieta+1] = 0;
193 return StatusCode::SUCCESS;
202 int posneg = (eta >= 0 ? 1 : -1);
203 int towereta = std::abs(eta)/0.1;
204 if (phi < 0) phi += 2*
M_PI;
205 int towerphi =
int(32*phi/
M_PI);
206 unsigned int tower_id = towerphi + 64*towereta;
209 tower_id += (posneg > 0 ? 200000 : 100000);
211 else if (towereta == 14) {
212 tower_id += (posneg > 0 ? 400000 : 300000);
215 tower_id += (posneg > 0 ? 600000 : 500000);
231 int eFEXPhi = iphi/8;
233 if (ieta > 16) eFEXeta = 1;
234 if (ieta > 32) eFEXeta = 2;
237 eFEX = eFEXeta + 3*eFEXPhi;
251 eFEXIndex = ieta -16;
255 eFEXIndex = ieta -32;
261 if (eFEXIndex <= 4)
FPGA = 0;
262 else if (eFEXIndex <= 8)
FPGA = 1;
263 else if (eFEXIndex <= 12)
FPGA = 2;
268 etaIndex = eFEXIndex - 4*
FPGA;