ATLAS Offline Software
Loading...
Searching...
No Matches
gTowerContainer.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// gTowerContainer - Container for the gFEX towers
8// -------------------
9// begin : 01 04 2021
10// email : cecilia.tosciri@cern.ch
11//***************************************************************************
12
13#ifndef GTOWERCONTAINER_H
14#define GTOWERCONTAINER_H
17#include "L1CaloFEXSim/gTower.h"
18#include <map>
19#include <vector>
20
21
22namespace LVL1 {
23
24class gTowerContainer : public DataVector<LVL1::gTower>
25{
26
27 public:
28
29
31 typedef std::vector<const LVL1::gTower> gTowerVector;
32
34 typedef std::vector<LVL1::gTower> MutablegTowerVector;
35
38 //gTowerContainer() ;
39
42
44 virtual ~gTowerContainer() { };
45
47 void push_back(int eta, int phi, int nphi, int keybase, int posneg);
48
50 bool fillContainerMap();
51
53 int getIDfromFWID(int fwID) const;
54
56 void print() const;
57
59 const LVL1::gTower * findTower(int towerID) const;
60
62 LVL1::gTower * findTower(int towerID);
63
65 void clearContainerMap();
66
67 private:
69 IMessageSvc* msgSvc() const;
70
71 //* @brief Keeps track of the towerID of each gTower associated to each MAP index *.
72 std::unordered_map<int,int> m_map_towerID_containerIndex;
73
74 //* @brief A map to go from firmware ID to simulated towerID *.
75 std::unordered_map<int,int> m_map_fwID_towerID;
76};
77
78}
79CLASS_DEF( LVL1::gTowerContainer , 1009563874 , 1 )
80SG_BASE(LVL1::gTowerContainer, DataVector<LVL1::gTower> );
81
82#endif
83
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
std::vector< const LVL1::gTower > gTowerVector
type to be used for the internal lookup table, and to return list of towers
virtual ~gTowerContainer()
destructor
gTowerContainer(size_t n, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Sized constructor.
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
std::vector< LVL1::gTower > MutablegTowerVector
Return from non-const findTowerVector.
IMessageSvc * msgSvc() const
get message service
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:
Definition gTower.h:38
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
OwnershipPolicy
@ OWN_ELEMENTS
this data object owns its elements