ATLAS Offline Software
gFexTower2SCellDecorator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GFEXL1CALO2SCELLDECORATORTOOL_H
6 #define GFEXL1CALO2SCELLDECORATORTOOL_H
7 
9 #include "AsgTools/ToolHandle.h"
13 
16 
19 #include <vector>
20 #include <unordered_map>
21 #include <string>
22 
23 
24 namespace LVL1 {
25 
27  public:
28  gFexTower2SCellDecorator(const std::string& name, ISvcLocator* svc);
29 
31  virtual StatusCode initialize() override;
33  virtual StatusCode execute( const EventContext& ) const override;
34 
35  private:
36  // ------------------------- Properties --------------------------------------
37  //Readhandle for Scell container
38  SG::ReadHandleKey<CaloCellContainer> m_SCellKey {this, "SCell", "SCell", "SCell container"};
39 
40  //Readhandle for TriggerTower container
41  SG::ReadHandleKey<xAOD::TriggerTowerContainer> m_triggerTowerKey {this, "xODTriggerTowers", "xAODTriggerTowers", "xAODTriggerTowers container"};
42 
43  const std::string m_ReadKey_name = "L1_gFexDataTowers";
44 
45  //Readhandle for Scell container
46  SG::ReadHandleKey < xAOD::gFexTowerContainer > m_gTowersReadKey {this,"gTowersReadKey" ,"L1_gFexDataTowers", "Read gFex EDM Trigger Tower container"};
47 
48  //WriteDecorHandle
49  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gSCellEtdecorKey { this, "gSCellEtdecorKey" , "L1_gFexDataTowers.SCellEt" , "SCell Et information of the gTower"};
50  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gSCellEtadecorKey { this, "gSCellEtadecorKey" , "L1_gFexDataTowers.SCellEta" , "SCell Eta information of the gTower"};
51  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gSCellPhidecorKey { this, "gSCellPhidecorKey" , "L1_gFexDataTowers.SCellPhi" , "SCell Phi information of the gTower"};
52  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gSCellIDdecorKey { this, "gSCellIDdecorKey" , "L1_gFexDataTowers.SCellID" , "SCell IDs information of the gTower"};
53  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gSCellSampledecorKey{ this, "gSCellSampledecorKey", "L1_gFexDataTowers.SCellSample" , "SCell Samples information of the gTower"};
54  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gtowerEtMeVdecorKey { this, "gtowerEtMeVdecorKey" , "L1_gFexDataTowers.gtowerEtMeV" , "gFex Tower Et information in MeV"};
55  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gTowerEtdecorKey { this, "gTowerEtdecorKey" , "L1_gFexDataTowers.SCSumEncoded" , "SCell sum Et. ENCODED!"};
56  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gTileEtMeVdecorKey { this, "gTileEtMeVdecorKey" , "L1_gFexDataTowers.TileEt" , "Tile Tower Et information in Encoded from jepET"};
57  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gTileEtadecorKey { this, "gTileEtadecorKey" , "L1_gFexDataTowers.TileEta" , "Tile Tower Eta information in MeV"};
58  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gTilePhidecorKey { this, "gTilePhidecorKey" , "L1_gFexDataTowers.TilePhi" , "Tile Tower Phi information in MeV"};
59  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gTileIDdecorKey { this, "gTileIDdecorKey" , "L1_gFexDataTowers.TileID" , "Tile Tower ID information"};
60 
61 
62  //property for gFEX mapping
63  Gaudi::Property<std::string> m_gFEX2Scellmapping {this, "gFEX2SCmapping" , "L1CaloFEXByteStream/gFEX_maps/2023_02_23/gfexSuperCellMap.txt" , "Text file to convert from simulation ID to SuperCell Identifier"};
64  Gaudi::Property<std::string> m_gFEX2Tilemapping {this, "gFEX2Tilemapping", "L1CaloFEXByteStream/gFEX_maps/2023_02_23/gfexTileMap.txt", "Text file to convert from simulation ID to Tile Identifier"};
65 
66  StatusCode ReadSCfromFile(const std::string& );
67  StatusCode ReadTilefromFile(const std::string& );
68  bool isBadSCellID(const std::string&) const;
69 
70  std::unordered_map< uint32_t, std::vector<uint64_t> > m_map_TTower2SCells;
71  std::unordered_map< uint32_t, std::vector<uint32_t> > m_map_TTower2Tile;
72 
73 };
74 }
75 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
LVL1::gFexTower2SCellDecorator::ReadSCfromFile
StatusCode ReadSCfromFile(const std::string &)
Definition: gFexTower2SCellDecorator.cxx:242
gFexTowerContainer.h
LVL1::gFexTower2SCellDecorator::m_ReadKey_name
const std::string m_ReadKey_name
Definition: gFexTower2SCellDecorator.h:43
LVL1::gFexTower2SCellDecorator::m_gSCellIDdecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gSCellIDdecorKey
Definition: gFexTower2SCellDecorator.h:52
LVL1::gFexTower2SCellDecorator::m_gFEX2Tilemapping
Gaudi::Property< std::string > m_gFEX2Tilemapping
Definition: gFexTower2SCellDecorator.h:64
TriggerTowerContainer.h
LVL1::gFexTower2SCellDecorator::m_gTileIDdecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gTileIDdecorKey
Definition: gFexTower2SCellDecorator.h:59
LVL1::gFexTower2SCellDecorator::m_gSCellEtdecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gSCellEtdecorKey
Definition: gFexTower2SCellDecorator.h:49
LVL1::gFexTower2SCellDecorator
Definition: gFexTower2SCellDecorator.h:26
SG::ReadHandleKey< CaloCellContainer >
LVL1::gFexTower2SCellDecorator::m_gTowersReadKey
SG::ReadHandleKey< xAOD::gFexTowerContainer > m_gTowersReadKey
Definition: gFexTower2SCellDecorator.h:46
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::gFexTower2SCellDecorator::initialize
virtual StatusCode initialize() override
Function initialising the algorithm.
Definition: gFexTower2SCellDecorator.cxx:30
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
LVL1::gFexTower2SCellDecorator::m_gSCellPhidecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gSCellPhidecorKey
Definition: gFexTower2SCellDecorator.h:51
LVL1::gFexTower2SCellDecorator::m_gtowerEtMeVdecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gtowerEtMeVdecorKey
Definition: gFexTower2SCellDecorator.h:54
LVL1::gFexTower2SCellDecorator::m_gTileEtMeVdecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gTileEtMeVdecorKey
Definition: gFexTower2SCellDecorator.h:56
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::gFexTower2SCellDecorator::m_gTowerEtdecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gTowerEtdecorKey
Definition: gFexTower2SCellDecorator.h:55
WriteDecorHandle.h
Handle class for adding a decoration to an object.
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
LVL1::gFexTower2SCellDecorator::m_gTileEtadecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gTileEtadecorKey
Definition: gFexTower2SCellDecorator.h:57
TrigConf::name
Definition: HLTChainList.h:35
AthReentrantAlgorithm.h
LVL1::gFexTower2SCellDecorator::isBadSCellID
bool isBadSCellID(const std::string &) const
Definition: gFexTower2SCellDecorator.cxx:302
PathResolver.h
gFexTowerAuxContainer.h
CaloCellContainer.h
LVL1::gFexTower2SCellDecorator::m_gSCellSampledecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gSCellSampledecorKey
Definition: gFexTower2SCellDecorator.h:53
LVL1::gFexTower2SCellDecorator::execute
virtual StatusCode execute(const EventContext &) const override
Function executing the algorithm.
Definition: gFexTower2SCellDecorator.cxx:55
LVL1::gFexTower2SCellDecorator::m_map_TTower2Tile
std::unordered_map< uint32_t, std::vector< uint32_t > > m_map_TTower2Tile
Definition: gFexTower2SCellDecorator.h:71
LVL1::gFexTower2SCellDecorator::m_gSCellEtadecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gSCellEtadecorKey
Definition: gFexTower2SCellDecorator.h:50
LVL1::gFexTower2SCellDecorator::ReadTilefromFile
StatusCode ReadTilefromFile(const std::string &)
Definition: gFexTower2SCellDecorator.cxx:313
LVL1::gFexTower2SCellDecorator::m_triggerTowerKey
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerKey
Definition: gFexTower2SCellDecorator.h:41
ToolHandle.h
LVL1::gFexTower2SCellDecorator::m_map_TTower2SCells
std::unordered_map< uint32_t, std::vector< uint64_t > > m_map_TTower2SCells
Definition: gFexTower2SCellDecorator.h:70
LVL1::gFexTower2SCellDecorator::m_gTilePhidecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gTilePhidecorKey
Definition: gFexTower2SCellDecorator.h:58
LVL1::gFexTower2SCellDecorator::m_gFEX2Scellmapping
Gaudi::Property< std::string > m_gFEX2Scellmapping
Definition: gFexTower2SCellDecorator.h:63
LVL1::gFexTower2SCellDecorator::m_SCellKey
SG::ReadHandleKey< CaloCellContainer > m_SCellKey
Definition: gFexTower2SCellDecorator.h:38
LVL1::gFexTower2SCellDecorator::gFexTower2SCellDecorator
gFexTower2SCellDecorator(const std::string &name, ISvcLocator *svc)
Definition: gFexTower2SCellDecorator.cxx:28