ATLAS Offline Software
Loading...
Searching...
No Matches
eTowerContainer.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5*/
6
7// Stolen shamelessly from CaloCellContainer.h and modified as required
8
9#ifndef ETOWERCONTAINER_H
10#define ETOWERCONTAINER_H
11
20
23#include "L1CaloFEXSim/eTower.h"
24#include "GaudiKernel/MsgStream.h"
25
26#include <unordered_map>
27
28namespace LVL1 {
29
30class eTowerContainer : public DataVector<LVL1::eTower>
31{
32
33 public:
34
35
37 typedef std::vector<const LVL1::eTower> eTowerVector;
38
40 typedef std::vector<LVL1::eTower> MutableeTowerVector;
41
44 //eTowerContainer() ;
45
48
50 virtual ~eTowerContainer() { };
51
53 void push_back(float eta, float phi, float keybase, int posneg);
54
56 bool fillContainerMap();
57
59 void print() const;
60
62 const LVL1::eTower * findTower(int towerID) const;
63
65 LVL1::eTower * findTower(int towerID);
66
68 void clearContainerMap();
69
70 private:
72 IMessageSvc* msgSvc() const;
73
74 //* @brief Keeps track of the towerID of each eTower associated to each MAP index *.
75 std::unordered_map<int,int> m_map_towerID_containerIndex;
76};
77
78}
79CLASS_DEF( LVL1::eTowerContainer , 1143075806 , 1 )
81
82#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define SG_BASE(D, B)
Declare that class D derives from class B.
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
An STL vector of pointers that by default owns its pointed-to elements.
Derived DataVector<T>.
Definition DataVector.h:795
DataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
SG::OwnershipPolicy ownPolicy() const
void print() const
dump (obsolete)
virtual ~eTowerContainer()
destructor
eTowerContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Main constructor.
void clearContainerMap()
clear map
IMessageSvc * msgSvc() const
get message service
std::unordered_map< int, int > m_map_towerID_containerIndex
std::vector< LVL1::eTower > MutableeTowerVector
Return from non-const findTowerVector.
std::vector< const LVL1::eTower > eTowerVector
type to be used for the internal lookup table, and to return list of towers
bool fillContainerMap()
utility function to help speed up accessing towers
eTowerContainer(size_t n, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Sized constructor.
const LVL1::eTower * findTower(int towerID) const
fast find method given identifier.
void push_back(float eta, float phi, float keybase, int posneg)
reimplementation of const push_back
The eTower class is an interface object for eFEX trigger algorithms The purposes are twofold:
Definition eTower.h:38
Container class for eTower.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
OwnershipPolicy
@ OWN_ELEMENTS
this data object owns its elements