14#include "CLHEP/Geometry/Vector3D.h"
44 <<
" not found in container.";
48 const int container_index = it->second;
50 if (container_index < 0) {
54 return (*
this)[container_index];
66 <<
" not found in container.";
70 const int container_index = it->second;
72 if (container_index < 0) {
76 return (*
this)[container_index];
87 size_t ntowers =
size();
88 for (
size_t itower = 0; itower < ntowers; itower++) {
89 const gTower * theTower = (*this)[itower];
90 int towerID = theTower->
getID();
91 int container_index = itower;
103 <<
" not found in container.";
107 const int towerID = it->second;
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
SG::OwnershipPolicy ownPolicy() const
size_type size() const noexcept
std::unordered_map< int, int > m_map_towerID_containerIndex
void print() const
dump (obsolete)
void push_back(int eta, int phi, int nphi, int keybase, int posneg)
reimplementation of const push_back
const LVL1::gTower * findTower(int towerID) const
fast find method given identifier.
bool fillContainerMap()
utility function to help speed up accessing towers
gTowerContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Main constructor.
std::unordered_map< int, int > m_map_fwID_towerID
int getIDfromFWID(int fwID) const
given a firmware ID, it returns the simulation ID, it can be used to then find towers
void clearContainerMap()
clear map
The gTower class is an interface object for gFEX trigger algorithms The purposes are twofold:
int getFWID(int &iPhiFW, int &iEtaFW) const
Calculates and returns the firmware ID, as well as iPhi and iEta in FT/global scheme.
int getID() const
Add to ET.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...