ATLAS Offline Software
Loading...
Searching...
No Matches
gFexTowerBuilder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5//***************************************************************************
6// gFexTowerBuilder - description
7// -------------------
8// Builds a gFexTowerContainer from CaloCellContainer (for supercells)
9// TriggerTowerContainer (for ppm tile towers)
10// Information about SCellContainer objects are in:
11// - https://gitlab.cern.ch/atlas/athena/-/blob/22.0/Calorimeter/CaloEvent/CaloEvent/CaloCell.h
12//
13// begin : 22 04 2025
14// email : jared.little@cern.ch
15//***************************************************************************/
16
17#ifndef gFexTowerBuilder_H
18#define gFexTowerBuilder_H
19
20#include "AsgTools/ToolHandle.h"
29
30namespace LVL1 {
31
33 public:
34 gFexTowerBuilder(const std::string& name, ISvcLocator* svc);
35
37 virtual StatusCode initialize() override;
39 virtual StatusCode execute(const EventContext&) const override;
40
41 private:
42 // ------------------------- Properties --------------------------------------
43 // Readhandle for Scell container
45 "SCell container"};
46
47 // Readhandle for TriggerTower container
49 this, "xODTriggerTowers", "xAODTriggerTowers",
50 "xAODTriggerTowers container"};
51
52 // Writehandle for EmulatedTowers container
54 this, "gTowersWriteKey", "L1_gFexDataTowers",
55 "Write gFexEDM Trigger Tower container"};
56
57 // FiberMapping property required by the interface
58 Gaudi::Property<std::string> m_FiberMapping{
59 this, "gFexFiberTowerMapping",
60 // PathResolver::find_calib_file("L1CaloFEXAlgos/gFexFibrTowerMap.txt"),
61 PathResolver::find_calib_file("Run3L1CaloSimulation/L1CaloFEXAlgos/gFEX/gFex_gCaloTowerMap_weighted_v1.txt"),
62 "Text file to convert from hardware fiber to eta-phi location"};
63
64 // property for gFEX mapping
65 Gaudi::Property<bool> m_apply_masking{this, "SCellMasking", true,
66 "Applies masking. Only use for data"};
67 Gaudi::Property<bool> m_isDATA{
68 this, "isDATA", true,
69 "Tells the algorithm if it is data. Used for xAOD::TriggerTower WARNING "
70 "due to the 0 supression"};
71
72 Gaudi::Property<std::string> m_gFEX2Scellmapping{
73 this, "gFEX2SCmapping",
74 "Run3L1CaloSimulation/L1CaloFEXAlgos/gFEX/gCaloTowers_to_scells_v1.txt",
75 "Text file to convert from simulation ID to SuperCell Identifier"};
76
77 Gaudi::Property<std::string> m_gFEX2Tilemapping{
78 this, "gFEX2Tilemapping",
79 "Run3L1CaloSimulation/L1CaloFEXAlgos/gFEX/gCaloTowers_to_tile_v1.txt",
80 "Text file to convert from simulation ID to Tile Identifier"};
81
82
83 // Read mapping functions
84 StatusCode ReadFibersfromFile(const std::string&);
85 StatusCode ReadTilefromFile(const std::string&);
86 StatusCode ReadSCfromFile(const std::string&);
87
88 bool isBadSCellID(const std::string&) const;
89
90 std::unordered_map<uint32_t, std::vector<uint64_t> > m_map_TTower2SCells;
91 std::unordered_map<uint32_t, std::vector<uint32_t> > m_map_TTower2Tile;
92
93 std::unordered_map<unsigned int, std::array<float, 4> > m_Firm2Tower_map;
94
95 };
96} // namespace LVL1
97#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
std::unordered_map< uint32_t, std::vector< uint64_t > > m_map_TTower2SCells
Gaudi::Property< bool > m_apply_masking
StatusCode ReadFibersfromFile(const std::string &)
gFexTowerBuilder(const std::string &name, ISvcLocator *svc)
Gaudi::Property< std::string > m_FiberMapping
virtual StatusCode initialize() override
Function initialising the algorithm.
Gaudi::Property< std::string > m_gFEX2Scellmapping
StatusCode ReadTilefromFile(const std::string &)
bool isBadSCellID(const std::string &) const
Gaudi::Property< std::string > m_gFEX2Tilemapping
StatusCode ReadSCfromFile(const std::string &)
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerKey
SG::WriteHandleKey< xAOD::gFexTowerContainer > m_gTowersWriteKey
SG::ReadHandleKey< CaloCellContainer > m_SCellKey
std::unordered_map< unsigned int, std::array< float, 4 > > m_Firm2Tower_map
virtual StatusCode execute(const EventContext &) const override
Function executing the algorithm.
Gaudi::Property< bool > m_isDATA
std::unordered_map< uint32_t, std::vector< uint32_t > > m_map_TTower2Tile
static std::string find_calib_file(const std::string &logical_file_name)
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...