ATLAS Offline Software
Loading...
Searching...
No Matches
jTowerContainer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Stolen shamelessly from CaloCellContainer.h and modified as required
6
7#ifndef JTOWERCONTAINER_H
8#define JTOWERCONTAINER_H
9
18
21#include "L1CaloFEXSim/jTower.h"
22
27
28#include <unordered_map>
29
30namespace LVL1 {
31
32class jTowerContainer : public DataVector<LVL1::jTower>
33{
34
35 public:
36
37
39 typedef std::vector<const LVL1::jTower> jTowerVector;
40
42 typedef std::vector<LVL1::jTower> MutablejTowerVector;
43
46 //jTowerContainer() ;
47
50
52 virtual ~jTowerContainer() { };
53
55 void push_back(float eta, float phi, int towerid, int posneg, float centre_et = 0.0, float centre_phi = 0.0, int fcal_layer = -1);
56
58 bool fillContainerMap();
59
61 void print() const;
62
64 const LVL1::jTower * findTower(int towerID) const;
65
67 LVL1::jTower * findTower(int towerID);
68
70 void clearContainerMap();
71
72 private:
74 IMessageSvc* msgSvc() const;
75
76 //* @brief Keeps track of the towerID of each jTower associated to each MAP index *.
77 std::unordered_map<int,int> m_map_towerID_containerIndex;
78};
79
80}
81CLASS_DEF( LVL1::jTowerContainer , 1141097037 , 1 )
83
84#endif
85
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
jTowerContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Main constructor.
bool fillContainerMap()
utility function to help speed up accessing towers
void print() const
dump (obsolete)
virtual ~jTowerContainer()
destructor
IMessageSvc * msgSvc() const
get message service
void push_back(float eta, float phi, int towerid, int posneg, float centre_et=0.0, float centre_phi=0.0, int fcal_layer=-1)
reimplementation of const push_back
void clearContainerMap()
clear map
std::vector< LVL1::jTower > MutablejTowerVector
Return from non-const findTowerVector.
std::vector< const LVL1::jTower > jTowerVector
type to be used for the internal lookup table, and to return list of towers
const LVL1::jTower * findTower(int towerID) const
fast find method given identifier.
std::unordered_map< int, int > m_map_towerID_containerIndex
jTowerContainer(size_t n, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Sized constructor.
The jTower class is an interface object for jFEX trigger algorithms The purposes are twofold:
Definition jTower.h:36
Container class for jTower.
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