ATLAS Offline Software
Loading...
Searching...
No Matches
eFEXSuperCellTowerIdProvider.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 EFEXSUPERCELLTOWERIDPROVIDER
17#define EFEXSUPERCELLTOWERIDPROVIDER
20#include <string>
21#include <unordered_map>
22
23namespace LVL1 {
30 static const InterfaceID IID_IIeFEXSuperCellTowerIdProvider("LVL1::eFEXSuperCellTowerIdProvider", 1 , 0);
31
33
37 struct towerinfo {
39 int slot;
40 bool isSplit;
41 };
42
43 public:
44 static const InterfaceID& interfaceID() { return IID_IIeFEXSuperCellTowerIdProvider; };
46 eFEXSuperCellTowerIdProvider(const std::string& type,const std::string& name,const IInterface* parent);
47
50
52 virtual StatusCode initialize() override;
53
55 StatusCode setAddress(const std::string&);
56
68 StatusCode geteTowerIDandslot(uint64_t scid, int &eTowerID, int &slot, bool &issplit) const;
69
71 bool ifhaveinputfile() const;
72
73 private:
74 bool m_hascsvfile{false};
75
76 std::string m_csvaddress;
77
79 bool hasSuperCell(uint64_t) const;
80
82 StatusCode loadcsv();
83
85 std::unordered_map<uint64_t, towerinfo> m_SuperCelltoTowerIdmap;
86 };
87}
88#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
eFEXSuperCellTowerIdProvider(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
std::unordered_map< uint64_t, towerinfo > m_SuperCelltoTowerIdmap
map to store information about SuperCells with SuperCell ID as the key.
bool hasSuperCell(uint64_t) const
Check if the SuperCell id exists in the csv file.
StatusCode setAddress(const std::string &)
set the address to the csv file and load
virtual StatusCode initialize() override
initialize the tool
bool ifhaveinputfile() const
Check if the csv file is valid.
StatusCode geteTowerIDandslot(uint64_t scid, int &eTowerID, int &slot, bool &issplit) const
obtain ordered tower IDs in an eFEX
std::string m_csvaddress
path to the csv file
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
static const InterfaceID IID_IIeFEXSuperCellTowerIdProvider("LVL1::eFEXSuperCellTowerIdProvider", 1, 0)
Sturcture stores mapping information of a SuperCell.
bool isSplit
if the SuperCell Et needs to be splited
int slot
slot of the tower in which the SuperCell belongs to