ATLAS Offline Software
Loading...
Searching...
No Matches
jFexTower2SCellDecorator.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//***************************************************************************
6// jFexTower2SCellDecorator - description:
7// This reentrant algorithm is meant to decorate the FEX Towers (input data and simulation) with the corresponding matching set of SuperCell from LAr
8// -------------------
9// begin : 01 09 2022
10// email : sergi.rodriguez@cern.ch
11//***************************************************************************/
12// EXAMPLE https://gitlab.cern.ch/atlas/athena/-/blob/release/22.0.91/Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h
13
14#ifndef L1CALO2SCELLDECORATORTOOL_H
15#define L1CALO2SCELLDECORATORTOOL_H
16
18#include "AsgTools/ToolHandle.h"
22
25
28
29
30
31namespace LVL1 {
32
34 public:
35 jFexTower2SCellDecorator(const std::string& name, ISvcLocator* svc);
36
38 virtual StatusCode initialize() override;
40 virtual StatusCode execute( const EventContext& ) const override;
41
42 private:
43 // ------------------------- Properties --------------------------------------
44 //Readhandle for Scell container
45 SG::ReadHandleKey<CaloCellContainer> m_SCellKey {this, "SCell", "SCell", "SCell container"};
46
47 //Readhandle for TriggerTower container
48 SG::ReadHandleKey<xAOD::TriggerTowerContainer> m_triggerTowerKey {this, "xODTriggerTowers", "xAODTriggerTowers", "xAODTriggerTowers container"};
49
50 //Readhandle for Scell container
51 SG::ReadHandleKey < xAOD::jFexTowerContainer > m_jTowersReadKey {this,"jTowersReadKey" ,"L1_jFexDataTowers", "Read jFexEDM Trigger Tower container"};
52
53 //WriteDecorHandle
54 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_SCellEtdecorKey { this, "SCellEtdecorKey" , m_jTowersReadKey, "SCellEt" , "SCell Et information of the jTower in MEV"};
55 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_SCellEtadecorKey { this, "SCellEtadecorKey" , m_jTowersReadKey, "SCellEta" , "SCell Eta information of the jTower"};
56 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_SCellPhidecorKey { this, "SCellPhidecorKey" , m_jTowersReadKey, "SCellPhi" , "SCell Phi information of the jTower"};
57 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_SCellIDdecorKey { this, "SCellIDdecorKey" , m_jTowersReadKey, "SCellID" , "SCell IDs information of the jTower"};
58 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_SCellMaskdecorKey { this, "SCellMaskdecorKey" , m_jTowersReadKey, "SCellMask" , "SCell masking information of the jTower"};
59 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_TileEtdecorKey { this, "TileEtdecorKey" , m_jTowersReadKey, "TileEt" , "Tile Tower Et information in Encoded from cpET"};
60 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_TileEtadecorKey { this, "TileEtadecorKey" , m_jTowersReadKey, "TileEta" , "Tile Tower Eta information of the jTower"};
61 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_TilePhidecorKey { this, "TilePhidecorKey" , m_jTowersReadKey, "TilePhi" , "Tile Tower Phi information of the jTower"};
62
63 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_jtowerEtMeVdecorKey{ this, "jtowerEtMeVdecorKey", m_jTowersReadKey, "jtower2SCellEtMeV" , "jFex Tower Et information in MeV"};
64 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_SCellEtMeVdecorKey { this, "SCellEtMeVdecorKey" , m_jTowersReadKey, "SCellEtMeV" , "SCell Et sum information in MeV"};
65 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_TileEtMeVdecorKey { this, "TileEtMeVdecorKey" , m_jTowersReadKey, "TileEtMeV" , "Tile Et information in MeV"};
66 SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> m_jTowerEtdecorKey { this, "jTowerEtdecorKey" , m_jTowersReadKey, "emulated_jtowerEt" , "jFex Tower Et information. ENCODED!"};
67
68
69 //property for Masking
70 Gaudi::Property<bool> m_apply_masking {this, "SCellMasking", true , "Applies masking. Only use for data"};
71 Gaudi::Property<bool> m_save_extras {this, "ExtraInfo" , false, "Saves additional decorated information "};
72
73 //property for jFEX mapping
74 Gaudi::Property<std::string> m_jFEX2Scellmapping {this, "jFEX2SCmapping" , PathResolver::find_calib_file("L1CaloFEXByteStream/2022-10-19/jfex_SCID.txt") , "Text file to convert from simulation ID to SuperCell Identifier"};
75 Gaudi::Property<std::string> m_jFEX2Tilemapping {this, "jFEX2Tilemapping", PathResolver::find_calib_file("L1CaloFEXByteStream/2022-10-19/jfex_TileID.txt"), "Text file to convert from simulation ID to Tile Identifier"};
76
77 StatusCode ReadSCfromFile(const std::string& );
78 StatusCode ReadTilefromFile(const std::string& );
79 bool isBadSCellID(const std::string&) const;
80
82
83 std::unordered_map< uint32_t, std::vector<uint64_t> > m_map_TTower2SCellsEM;
84 std::unordered_map< uint32_t, std::vector<uint64_t> > m_map_TTower2SCellsHAD;
85 std::unordered_map< uint32_t, std::tuple<uint32_t,float,float> > m_map_TTower2Tile;
86
87};
88}
89#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Handle class for adding a decoration to an object.
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_TileEtadecorKey
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_SCellEtdecorKey
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_SCellEtadecorKey
std::unordered_map< uint32_t, std::tuple< uint32_t, float, float > > m_map_TTower2Tile
StatusCode ReadTilefromFile(const std::string &)
StatusCode ReadSCfromFile(const std::string &)
jFexTower2SCellDecorator(const std::string &name, ISvcLocator *svc)
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_SCellEtMeVdecorKey
SG::ReadHandleKey< CaloCellContainer > m_SCellKey
std::unordered_map< uint32_t, std::vector< uint64_t > > m_map_TTower2SCellsHAD
Gaudi::Property< std::string > m_jFEX2Scellmapping
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_jtowerEtMeVdecorKey
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_SCellPhidecorKey
Gaudi::Property< std::string > m_jFEX2Tilemapping
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_TileEtMeVdecorKey
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_TilePhidecorKey
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_jTowerEtdecorKey
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_SCellMaskdecorKey
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerKey
virtual StatusCode execute(const EventContext &) const override
Function executing the algorithm.
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_SCellIDdecorKey
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_TileEtdecorKey
std::unordered_map< uint32_t, std::vector< uint64_t > > m_map_TTower2SCellsEM
bool isBadSCellID(const std::string &) const
virtual StatusCode initialize() override
Function initialising the algorithm.
SG::ReadHandleKey< xAOD::jFexTowerContainer > m_jTowersReadKey
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/attr name from which a WriteDecorHandle is made.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...