ATLAS Offline Software
eFEXSuperCellTowerIdProvider.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
16 #ifndef EFEXSUPERCELLTOWERIDPROVIDER
17 #define EFEXSUPERCELLTOWERIDPROVIDER
21 #include <string>
22 #include <unordered_map>
23 
24 namespace LVL1 {
32 
36  struct towerinfo {
37  int eTowerID;
38  int slot;
39  bool isSplit;
40  };
41 
42  public:
44  eFEXSuperCellTowerIdProvider(const std::string& type,const std::string& name,const IInterface* parent);
45 
48 
50  StatusCode initialize() override;
51 
53  StatusCode setAddress(std::string) override;
54 
66  StatusCode geteTowerIDandslot(uint64_t scid, int &eTowerID, int &slot, bool &issplit) const override;
67 
69  bool ifhaveinputfile() const override;
70 
71  private:
72  bool m_hascsvfile;
73 
74  std::string m_csvaddress;
75 
77  bool hasSuperCell(uint64_t) const override;
78 
80  StatusCode loadcsv() override;
81 
83  std::unordered_map<uint64_t, towerinfo> m_SuperCelltoTowerIdmap;
84  };
85 }
86 #endif
LVL1::eFEXSuperCellTowerIdProvider::towerinfo::isSplit
bool isSplit
if the SuperCell Et needs to be splited
Definition: eFEXSuperCellTowerIdProvider.h:39
LVL1::eFEXSuperCellTowerIdProvider::~eFEXSuperCellTowerIdProvider
~eFEXSuperCellTowerIdProvider()
Destructor.
Definition: eFEXSuperCellTowerIdProvider.cxx:17
IeFEXSuperCellTowerIdProvider.h
LVL1::eFEXSuperCellTowerIdProvider::ifhaveinputfile
bool ifhaveinputfile() const override
Check if the csv file is valid.
Definition: eFEXSuperCellTowerIdProvider.cxx:76
LVL1::eFEXSuperCellTowerIdProvider::eFEXSuperCellTowerIdProvider
eFEXSuperCellTowerIdProvider(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: eFEXSuperCellTowerIdProvider.cxx:11
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::eFEXSuperCellTowerIdProvider::setAddress
StatusCode setAddress(std::string) override
set the address to the csv file and load
Definition: eFEXSuperCellTowerIdProvider.cxx:31
AthAlgorithm.h
LVL1::eFEXSuperCellTowerIdProvider::hasSuperCell
bool hasSuperCell(uint64_t) const override
Check if the SuperCell id exists in the csv file.
Definition: eFEXSuperCellTowerIdProvider.cxx:67
LVL1::eFEXSuperCellTowerIdProvider::towerinfo
Sturcture stores mapping information of a SuperCell.
Definition: eFEXSuperCellTowerIdProvider.h:36
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
LVL1::eFEXSuperCellTowerIdProvider::towerinfo::slot
int slot
slot of the tower in which the SuperCell belongs to
Definition: eFEXSuperCellTowerIdProvider.h:38
LVL1::eFEXSuperCellTowerIdProvider::towerinfo::eTowerID
int eTowerID
tower ID
Definition: eFEXSuperCellTowerIdProvider.h:37
TrigConf::name
Definition: HLTChainList.h:35
LVL1::eFEXSuperCellTowerIdProvider
Provide Supercell-tower mapping Load information stored in a .csv file and provide information needed...
Definition: eFEXSuperCellTowerIdProvider.h:31
LVL1::eFEXSuperCellTowerIdProvider::m_hascsvfile
bool m_hascsvfile
if the csv file is valid
Definition: eFEXSuperCellTowerIdProvider.h:72
LVL1::eFEXSuperCellTowerIdProvider::m_SuperCelltoTowerIdmap
std::unordered_map< uint64_t, towerinfo > m_SuperCelltoTowerIdmap
map to store information about SuperCells with SuperCell ID as the key.
Definition: eFEXSuperCellTowerIdProvider.h:83
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::eFEXSuperCellTowerIdProvider::geteTowerIDandslot
StatusCode geteTowerIDandslot(uint64_t scid, int &eTowerID, int &slot, bool &issplit) const override
obtain ordered tower IDs in an eFEX
Definition: eFEXSuperCellTowerIdProvider.cxx:47
LVL1::IeFEXSuperCellTowerIdProvider
Definition: IeFEXSuperCellTowerIdProvider.h:14
LVL1::eFEXSuperCellTowerIdProvider::loadcsv
StatusCode loadcsv() override
load the csv file
Definition: eFEXSuperCellTowerIdProvider.cxx:80
AthAlgTool
Definition: AthAlgTool.h:26
LVL1::eFEXSuperCellTowerIdProvider::initialize
StatusCode initialize() override
initialize the tool
Definition: eFEXSuperCellTowerIdProvider.cxx:21
LVL1::eFEXSuperCellTowerIdProvider::m_csvaddress
std::string m_csvaddress
path to the csv file
Definition: eFEXSuperCellTowerIdProvider.h:74