ATLAS Offline Software
Loading...
Searching...
No Matches
eFakeTower.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
15
16#ifndef EFAKETOWER_H
17#define EFAKETOWER_H
18#include <string>
19#include <unordered_map>
20#include <vector>
22#include "L1CaloFEXSim/eTower.h"
26
27
28namespace LVL1 {
49 static const InterfaceID IID_IeFakeTower("LVL1::eFakeTower", 1 , 0);
50
51 class eFakeTower: public AthAlgTool
52 {
53 public:
55 eFakeTower(const std::string& type,const std::string& name,const IInterface* parent);
56 static const InterfaceID& interfaceID() { return IID_IeFakeTower; };
58 virtual StatusCode init(const std::string&);
59
62
75 virtual int getET(int FPGAid, int eta, int phi, int layer, int cell) const;
76
78 virtual StatusCode loadnext();
79
81 virtual StatusCode execute(const EventContext& ctx);
82
84 virtual StatusCode seteTowers(eTowerContainer*);
85
86 private:
97 StatusCode changeFPGAET(int tmp_eTowersIDs_subset[][6], int FPGAnumber, int eFEXnumber);
98
100 StatusCode loadFPGA(int);
101
103 StatusCode loaddic(int);
104
116 StatusCode changeTowerET(LVL1::eTower* inputtower, int eta, int phi, int FPGAid) const;
117
127 int getFPGAnumber(int iefex, int ifpga) const;
128
129 eTowerContainer* m_eTowerContainer{}; //the eTowerContainer object for which the Et will be replaced
130
132 std::vector<int>* loadBlock(const std::string&, int) const;
133
135
137 ToolHandle<eFEXFPGATowerIdProvider> m_eFEXFPGATowerIdProviderTool {this, "eFEXFPGATowerIdProviderTool", "LVL1::eFEXFPGATowerIdProvider", "Tool that provides tower-FPGA mapping"};
138
139 std::string m_inputfile;
140
146 std::unordered_map<int, std::unordered_map<int, unsigned int>*> m_alltowers;
147
149 std::unordered_map<int, std::vector<int>*> m_dict;
150 };
151}
152
153#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
std::string m_inputfile
path to the input directory
Definition eFakeTower.h:139
ToolHandle< eFEXFPGATowerIdProvider > m_eFEXFPGATowerIdProviderTool
tool needed for tower-FPGA mapping
Definition eFakeTower.h:137
std::unordered_map< int, std::unordered_map< int, unsigned int > * > m_alltowers
map of all supercell ETs of FPGAs m_alltowers[FPGAid] = (supercell id,ET) supercell id = eta * 1000 +...
Definition eFakeTower.h:146
~eFakeTower()
Destructor.
virtual StatusCode loadnext()
Load the test vector of the next event.
StatusCode changeFPGAET(int tmp_eTowersIDs_subset[][6], int FPGAnumber, int eFEXnumber)
Replace the Et in an FOGA by the ones in the test vector.
virtual StatusCode execute(const EventContext &ctx)
replace the Tower Et with the ones stored in the test vector.
StatusCode changeTowerET(LVL1::eTower *inputtower, int eta, int phi, int FPGAid) const
Replace the Et in a tower by the ones in the test vector.
virtual StatusCode seteTowers(eTowerContainer *)
Define the eTowerContainer object for which the Et will be replaced.
eTowerContainer * m_eTowerContainer
Definition eFakeTower.h:129
StatusCode loaddic(int)
load index of Et
std::unordered_map< int, std::vector< int > * > m_dict
map for mapping infomation. m_dict[FPGAid] = [ list of supercell id in order ]
Definition eFakeTower.h:149
static const InterfaceID & interfaceID()
Definition eFakeTower.h:56
eFakeTower(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
int getFPGAnumber(int iefex, int ifpga) const
determine the index of an FPGA
std::vector< int > * loadBlock(const std::string &, int) const
Load the Et or index in a block.
virtual StatusCode init(const std::string &)
initiate with the path to the test vector directory
int m_numberofevents
number of events
Definition eFakeTower.h:134
StatusCode loadFPGA(int)
load the Et in an FPGA
virtual int getET(int FPGAid, int eta, int phi, int layer, int cell) const
obtain the Et of a tower slot
The eTower class is an interface object for eFEX trigger algorithms The purposes are twofold:
Definition eTower.h:38
Provide tower-FPGA mapping.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
static const InterfaceID IID_IeFakeTower("LVL1::eFakeTower", 1, 0)