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;
132 ClusterCellETs.push_back( tower->
getET(
il,
c) );
156 return StatusCode::SUCCESS;
161 std::vector<unsigned int> &RcoreSums,
162 std::vector<unsigned int> &RemSums)
168 for (
int iphi = -1; iphi <= 1; ++iphi) {
170 if (phiTable >
M_PI) phiTable -= 2*
M_PI;
171 if (phiTable < -
M_PI) phiTable += 2*
M_PI;
173 for (
int ieta = -1; ieta <= 1; ++ieta) {
177 if (std::abs(etaTable)<2.5) tobtable[iphi+1][ieta+1] =
eTowerID(etaTable, phiTable);
178 else tobtable[iphi+1][ieta+1] = 0;
196 return StatusCode::SUCCESS;
205 int posneg = (eta >= 0 ? 1 : -1);
206 int towereta = std::abs(eta)/0.1;
207 if (phi < 0) phi += 2*
M_PI;
208 int towerphi =
int(32*phi/
M_PI);
209 unsigned int tower_id = towerphi + 64*towereta;
212 tower_id += (posneg > 0 ? 200000 : 100000);
214 else if (towereta == 14) {
215 tower_id += (posneg > 0 ? 400000 : 300000);
218 tower_id += (posneg > 0 ? 600000 : 500000);
234 int eFEXPhi = iphi/8;
236 if (ieta > 16) eFEXeta = 1;
237 if (ieta > 32) eFEXeta = 2;
240 eFEX = eFEXeta + 3*eFEXPhi;
254 eFEXIndex = ieta -16;
258 eFEXIndex = ieta -32;
264 if (eFEXIndex <= 4)
FPGA = 0;
265 else if (eFEXIndex <= 8)
FPGA = 1;
266 else if (eFEXIndex <= 12)
FPGA = 2;
271 etaIndex = eFEXIndex - 4*
FPGA;