ATLAS Offline Software
Loading...
Searching...
No Matches
eTowerContainer.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2021 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
29
30#include <unordered_map>
31
32namespace LVL1 {
33
34class eTowerContainer : public DataVector<LVL1::eTower>
35{
36
37 public:
38
39
41 typedef std::vector<const LVL1::eTower> eTowerVector;
42
44 typedef std::vector<LVL1::eTower> MutableeTowerVector;
45
48 //eTowerContainer() ;
49
52
54 virtual ~eTowerContainer() { };
55
57 void push_back(float eta, float phi, float keybase, int posneg);
58
60 bool fillContainerMap();
61
63 void print() const;
64
66 const LVL1::eTower * findTower(int towerID) const;
67
69 LVL1::eTower * findTower(int towerID);
70
72 void clearContainerMap();
73
74 private:
76 IMessageSvc* msgSvc() const;
77
78 //* @brief Keeps track of the towerID of each eTower associated to each MAP index *.
79 std::unordered_map<int,int> m_map_towerID_containerIndex;
80};
81
82}
83CLASS_DEF( LVL1::eTowerContainer , 1143075806 , 1 )
85
86#endif
87
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Cached value with atomic update.
#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.
An array of unsigned values of some bit size, packed tightly.
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.
Define a specializable method for finding the index of an object within a container.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
OwnershipPolicy
@ OWN_ELEMENTS
this data object owns its elements