24 declareInterface<eFEXTOBEtTool>(
this);
42 return StatusCode::SUCCESS;
47 float etaTOB,
float phiTOB,
int seed,
int UnD,
48 std::vector<unsigned int> &ClusterCellETs,
49 std::vector<unsigned int> &RetaSums,
50 std::vector<unsigned int> &RhadSums,
51 std::vector<unsigned int> &WstotSums)
57 for (
int iphi = -1; iphi <= 1; ++iphi) {
59 if (phiTable >
M_PI) phiTable -= 2*
M_PI;
60 if (phiTable < -
M_PI) phiTable += 2*
M_PI;
62 for (
int ieta = -1; ieta <= 1; ++ieta) {
66 if (std::abs(etaTable)<2.5) tobtable[iphi+1][ieta+1] =
eTowerID(etaTable, phiTable);
67 else tobtable[iphi+1][ieta+1] = 0;
73 int eFEX, FPGA, fpgaEta;
74 location(etaTOB,phiTOB, eFEX, FPGA, fpgaEta);
88 return StatusCode::SUCCESS;
97 for (
int iphi = -1; iphi <= 1; ++iphi) {
99 if (phiTable >
M_PI) phiTable -= 2*
M_PI;
100 if (phiTable < -
M_PI) phiTable += 2*
M_PI;
102 for (
int ieta = -1; ieta <= 1; ++ieta) {
106 if (std::abs(etaTable)<2.5) tobtable[iphi+1][ieta+1] =
eTowerID(etaTable, phiTable);
107 else tobtable[iphi+1][ieta+1] = 0;
113 ClusterCellETs.reserve(99);
115 for (
unsigned int il = 0; il < 5; il++) {
116 size_t nCells = (il==1 || il==2) ? 4 : 1;
117 for (
unsigned int iphi = 0; iphi < 3; iphi++) {
118 for (
unsigned int ieta = 0; ieta < 3; ieta++) {
119 if (tobtable[iphi][ieta]==0){
120 for(
size_t c=0;c<nCells;c++) {
121 ClusterCellETs.push_back(0);
125 if (tower==
nullptr) {
127 return StatusCode::FAILURE;
129 for(
size_t c=0;c<nCells;c++) {
133 ClusterCellETs.push_back( tower->
getET(il,c) );
157 return StatusCode::SUCCESS;
162 float etaTOB,
float phiTOB,
int seed,
int UnD,
163 std::vector<unsigned int> &RcoreSums,
164 std::vector<unsigned int> &RemSums)
170 for (
int iphi = -1; iphi <= 1; ++iphi) {
172 if (phiTable >
M_PI) phiTable -= 2*
M_PI;
173 if (phiTable < -
M_PI) phiTable += 2*
M_PI;
175 for (
int ieta = -1; ieta <= 1; ++ieta) {
179 if (std::abs(etaTable)<2.5) tobtable[iphi+1][ieta+1] =
eTowerID(etaTable, phiTable);
180 else tobtable[iphi+1][ieta+1] = 0;
186 int eFEX, FPGA, fpgaEta;
187 location(etaTOB,phiTOB, eFEX, FPGA, fpgaEta);
198 return StatusCode::SUCCESS;
207 int posneg = (
eta >= 0 ? 1 : -1);
208 int towereta = std::abs(
eta)/0.1;
210 int towerphi = int(32*
phi/
M_PI);
211 unsigned int tower_id = towerphi + 64*towereta;
214 tower_id += (posneg > 0 ? 200000 : 100000);
216 else if (towereta == 14) {
217 tower_id += (posneg > 0 ? 400000 : 300000);
220 tower_id += (posneg > 0 ? 600000 : 500000);
236 int eFEXPhi = iphi/8;
238 if (ieta > 16) eFEXeta = 1;
239 if (ieta > 32) eFEXeta = 2;
242 eFEX = eFEXeta + 3*eFEXPhi;
256 eFEXIndex = ieta -16;
260 eFEXIndex = ieta -32;
266 if (eFEXIndex <= 4) FPGA = 0;
267 else if (eFEXIndex <= 8) FPGA = 1;
268 else if (eFEXIndex <= 12) FPGA = 2;
273 etaIndex = eFEXIndex - 4*FPGA;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
const LVL1::eTower * findTower(int towerID) const
fast find method given identifier.
The eTower class is an interface object for eFEX trigger algorithms The purposes are twofold:
int getET(unsigned int layer, int cell=0) const
Get ET of a specified cell in MeV.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...