ATLAS Offline Software
gFexTower2SCellDecorator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 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 
20 
21 
22 namespace LVL1 {
23 
25  public:
26  gFexTower2SCellDecorator(const std::string& name, ISvcLocator* svc);
27 
29  virtual StatusCode initialize() override;
31  virtual StatusCode execute( const EventContext& ) const override;
32 
33  private:
34  // ------------------------- Properties --------------------------------------
35  //Readhandle for Scell container
36  SG::ReadHandleKey<CaloCellContainer> m_SCellKey {this, "SCell", "SCell", "SCell container"};
37 
38  //Readhandle for TriggerTower container
39  SG::ReadHandleKey<xAOD::TriggerTowerContainer> m_triggerTowerKey {this, "xODTriggerTowers", "xAODTriggerTowers", "xAODTriggerTowers container"};
40 
41  const std::string m_ReadKey_name = "L1_gFexDataTowers";
42 
43  //Readhandle for Scell container
44  SG::ReadHandleKey < xAOD::gFexTowerContainer > m_gTowersReadKey {this,"gTowersReadKey" ,"L1_gFexDataTowers", "Read gFex EDM Trigger Tower container"};
45 
46  //WriteDecorHandle
47  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gSCellEtdecorKey { this, "gSCellEtdecorKey" , "L1_gFexDataTowers.SCellEt" , "SCell Et information of the gTower"};
48  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gSCellEtadecorKey { this, "gSCellEtadecorKey" , "L1_gFexDataTowers.SCellEta" , "SCell Eta information of the gTower"};
49  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gSCellPhidecorKey { this, "gSCellPhidecorKey" , "L1_gFexDataTowers.SCellPhi" , "SCell Phi information of the gTower"};
50  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gSCellIDdecorKey { this, "gSCellIDdecorKey" , "L1_gFexDataTowers.SCellID" , "SCell IDs information of the gTower"};
51  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gSCellSampledecorKey{ this, "gSCellSampledecorKey", "L1_gFexDataTowers.SCellSample" , "SCell Samples information of the gTower"};
52  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gtowerEtMeVdecorKey { this, "gtowerEtMeVdecorKey" , "L1_gFexDataTowers.gtowerEtMeV" , "gFex Tower Et information in MeV"};
53  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gTowerEtdecorKey { this, "gTowerEtdecorKey" , "L1_gFexDataTowers.SCSumEncoded" , "SCell sum Et. ENCODED!"};
54  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gTileEtMeVdecorKey { this, "gTileEtMeVdecorKey" , "L1_gFexDataTowers.TileEt" , "Tile Tower Et information in Encoded from jepET"};
55  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gTileEtadecorKey { this, "gTileEtadecorKey" , "L1_gFexDataTowers.TileEta" , "Tile Tower Eta information in MeV"};
56  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gTilePhidecorKey { this, "gTilePhidecorKey" , "L1_gFexDataTowers.TilePhi" , "Tile Tower Phi information in MeV"};
57  SG::WriteDecorHandleKey<xAOD::gFexTowerContainer> m_gTileIDdecorKey { this, "gTileIDdecorKey" , "L1_gFexDataTowers.TileID" , "Tile Tower ID information"};
58 
59 
60  //property for gFEX mapping
61  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"};
62  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"};
63 
64  StatusCode ReadSCfromFile(const std::string& );
65  StatusCode ReadTilefromFile(const std::string& );
66  bool isBadSCellID(const std::string&) const;
67 
68  std::unordered_map< uint32_t, std::vector<uint64_t> > m_map_TTower2SCells;
69  std::unordered_map< uint32_t, std::vector<uint32_t> > m_map_TTower2Tile;
70 
71 };
72 }
73 #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:243
gFexTowerContainer.h
LVL1::gFexTower2SCellDecorator::m_ReadKey_name
const std::string m_ReadKey_name
Definition: gFexTower2SCellDecorator.h:41
LVL1::gFexTower2SCellDecorator::m_gSCellIDdecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gSCellIDdecorKey
Definition: gFexTower2SCellDecorator.h:50
LVL1::gFexTower2SCellDecorator::m_gFEX2Tilemapping
Gaudi::Property< std::string > m_gFEX2Tilemapping
Definition: gFexTower2SCellDecorator.h:62
TriggerTowerContainer.h
LVL1::gFexTower2SCellDecorator::m_gTileIDdecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gTileIDdecorKey
Definition: gFexTower2SCellDecorator.h:57
LVL1::gFexTower2SCellDecorator::m_gSCellEtdecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gSCellEtdecorKey
Definition: gFexTower2SCellDecorator.h:47
LVL1::gFexTower2SCellDecorator
Definition: gFexTower2SCellDecorator.h:24
SG::ReadHandleKey< CaloCellContainer >
LVL1::gFexTower2SCellDecorator::m_gTowersReadKey
SG::ReadHandleKey< xAOD::gFexTowerContainer > m_gTowersReadKey
Definition: gFexTower2SCellDecorator.h:44
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:31
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:49
LVL1::gFexTower2SCellDecorator::m_gtowerEtMeVdecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gtowerEtMeVdecorKey
Definition: gFexTower2SCellDecorator.h:52
LVL1::gFexTower2SCellDecorator::m_gTileEtMeVdecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gTileEtMeVdecorKey
Definition: gFexTower2SCellDecorator.h:54
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:53
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:55
TrigConf::name
Definition: HLTChainList.h:35
AthReentrantAlgorithm.h
LVL1::gFexTower2SCellDecorator::isBadSCellID
bool isBadSCellID(const std::string &) const
Definition: gFexTower2SCellDecorator.cxx:303
PathResolver.h
gFexTowerAuxContainer.h
CaloCellContainer.h
LVL1::gFexTower2SCellDecorator::m_gSCellSampledecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gSCellSampledecorKey
Definition: gFexTower2SCellDecorator.h:51
LVL1::gFexTower2SCellDecorator::execute
virtual StatusCode execute(const EventContext &) const override
Function executing the algorithm.
Definition: gFexTower2SCellDecorator.cxx:56
LVL1::gFexTower2SCellDecorator::m_map_TTower2Tile
std::unordered_map< uint32_t, std::vector< uint32_t > > m_map_TTower2Tile
Definition: gFexTower2SCellDecorator.h:69
LVL1::gFexTower2SCellDecorator::m_gSCellEtadecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gSCellEtadecorKey
Definition: gFexTower2SCellDecorator.h:48
LVL1::gFexTower2SCellDecorator::ReadTilefromFile
StatusCode ReadTilefromFile(const std::string &)
Definition: gFexTower2SCellDecorator.cxx:314
LVL1::gFexTower2SCellDecorator::m_triggerTowerKey
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerKey
Definition: gFexTower2SCellDecorator.h:39
ToolHandle.h
LVL1::gFexTower2SCellDecorator::m_map_TTower2SCells
std::unordered_map< uint32_t, std::vector< uint64_t > > m_map_TTower2SCells
Definition: gFexTower2SCellDecorator.h:68
LVL1::gFexTower2SCellDecorator::m_gTilePhidecorKey
SG::WriteDecorHandleKey< xAOD::gFexTowerContainer > m_gTilePhidecorKey
Definition: gFexTower2SCellDecorator.h:56
LVL1::gFexTower2SCellDecorator::m_gFEX2Scellmapping
Gaudi::Property< std::string > m_gFEX2Scellmapping
Definition: gFexTower2SCellDecorator.h:61
LVL1::gFexTower2SCellDecorator::m_SCellKey
SG::ReadHandleKey< CaloCellContainer > m_SCellKey
Definition: gFexTower2SCellDecorator.h:36
LVL1::gFexTower2SCellDecorator::gFexTower2SCellDecorator
gFexTower2SCellDecorator(const std::string &name, ISvcLocator *svc)
Definition: gFexTower2SCellDecorator.cxx:29