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"
31
32namespace LVL1 {
33
35 public:
36 gFexTowerBuilder(const std::string& name, ISvcLocator* svc);
37
39 virtual StatusCode initialize() override;
41 virtual StatusCode execute(const EventContext&) const override;
42
43 private:
44 // ------------------------- Properties --------------------------------------
45 // Readhandle for Scell container
46 SG::ReadHandleKey<CaloCellContainer> m_SCellKey{this, "SCell", "SCell", "SCell container"};
47
48 // Readhandle for TriggerTower container
50 this, "xODTriggerTowers", "xAODTriggerTowers", "xAODTriggerTowers container"};
51
52 // Writehandle for EmulatedTowers container
54 this, "gTowersWriteKey", "L1_gFexDataTowers", "Write gFexEDM Trigger Tower container"};
55
56 // FiberMapping property required by the interface
57 Gaudi::Property<std::string> m_FiberMapping{
58 this, "gFexFiberTowerMapping",
59 // PathResolver::find_calib_file("L1CaloFEXAlgos/gFexFibrTowerMap.txt"),
60 PathResolver::find_calib_file("Run3L1CaloSimulation/L1CaloFEXAlgos/gFEX/gFex_gCaloTowerMap_weighted_v1.txt"),
61 "Text file to convert from hardware fiber to eta-phi location"};
62
63 // property for gFEX mapping
64 Gaudi::Property<bool> m_apply_masking{this, "SCellMasking", true, "Applies masking. Only use for data"};
65
66 Gaudi::Property<bool> m_applyTimingCut{this,"ApplyTimingCut", false,
67 "If true, will apply a timing cut to supercells in MC (but not in HEC). In data this property has no effect"};
68
69 Gaudi::Property<bool> m_applyTimingCutAll{this,"ApplyTimingCutAll", false,
70 "If true, will apply a timing cut to supercells in MC. In data this property has no effect"};
71
72 Gaudi::Property<bool> m_isDATA{ this, "isDATA", true, "Tells the algorithm if it is data."};
73
74 Gaudi::Property<std::string> m_gFEX2Scellmapping{
75 this, "gFEX2SCmapping",
76 "Run3L1CaloSimulation/L1CaloFEXAlgos/gFEX/gCaloTowers_to_scells_v1.txt",
77 "Text file to convert from simulation ID to SuperCell Identifier"};
78
79 Gaudi::Property<std::string> m_gFEX2Tilemapping{
80 this, "gFEX2Tilemapping",
81 "Run3L1CaloSimulation/L1CaloFEXAlgos/gFEX/gCaloTowers_to_tile_v1.txt",
82 "Text file to convert from simulation ID to Tile Identifier"};
83
84 // Read mapping functions
85 StatusCode ReadFibersfromFile(const std::string&);
86 StatusCode ReadTilefromFile(const std::string&);
87 StatusCode ReadSCfromFile(const std::string&);
88
89 bool isBadSCellID(const std::string&) const;
90
91 std::unordered_map<uint32_t, std::vector<uint64_t> > m_map_TTower2SCells;
92 std::unordered_map<uint32_t, std::vector<uint32_t> > m_map_TTower2Tile;
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_applyTimingCut
Gaudi::Property< bool > m_applyTimingCutAll
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...