ATLAS Offline Software
eFexTowerBuilder.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 // eFexTowerBuilder - description:
7 // Builds an eFexTowerContainer from a CaloCellContainer (for supercells) and TriggerTowerContainer (for ppm tile towers)
8 // -------------------
9 // begin : 06 12 2022
10 // email : will@cern.ch
11 //***************************************************************************/
12 
13 #ifndef eFexTowerBuilder_H
14 #define eFexTowerBuilder_H
15 
16 // STL
17 #include <string>
18 
19 // Athena/Gaudi
26 
29 //#include "LArCabling/LArOnOffIdMapping.h"
30 
32 
34 
35 class CaloIdManager;
36 
37 
46 namespace LVL1 {
47 
49 {
50  public:
51 
52  eFexTowerBuilder(const std::string& name, ISvcLocator* pSvcLocator);
53  ~eFexTowerBuilder() = default;
54 
55  virtual StatusCode initialize();
56  virtual StatusCode execute(const EventContext& ctx) const;
57 
58  private:
59  mutable std::mutex m_fillMapMutex ATLAS_THREAD_SAFE;
60  mutable std::map<unsigned long long, std::pair<std::pair<int,int>,std::pair<int,int>>> m_scMap ATLAS_THREAD_SAFE; // maps from scid -> (efex eta/phi index pair, slot pair)
61 
62  StatusCode fillTowers(const EventContext& ctx) const;
63  StatusCode fillMap(const EventContext& ctx) const;
64 
65  SG::ReadHandleKey<xAOD::EventInfo> m_eiKey{this,"EventInfoKey","EventInfo",""};
66 
67  SG::ReadCondHandleKey<CaloSuperCellDetDescrManager> m_ddmKey{this,"CaloSuperCellDetDescrManager","CaloSuperCellDetDescrManager",""};
68 
69  SG::ReadHandleKey<CaloCellContainer> m_scellKey { this, "CaloCellContainerReadKey", "SCell", "Read handle key for the supercells"};
70  SG::ReadHandleKey<xAOD::TriggerTowerContainer> m_ttKey { this, "TriggerTowerContainerReadKey", "xAODTriggerTowers", "Read handle key for the triggerTowers"};
71  SG::WriteHandleKey<xAOD::eFexTowerContainer> m_outKey {this, "eFexContainerWriteKey", "L1_eFexEmulatedTowers", "Name of the output container"};
72 
73  Gaudi::Property<std::string> m_mappingFile {this, "MappingFile", "L1CaloFEXByteStream/2023-02-13/scToEfexTowers.root", "PathResolver location to mapping file"};
74  ToolHandle<IeFEXSuperCellTowerIdProvider> m_eFEXSuperCellTowerIdProviderTool {this, "eFEXSuperCellTowerIdProviderTool", "LVL1::eFEXSuperCellTowerIdProvider", "Tool that provides tower-FOGA mapping"};
75 
76  Gaudi::Property<bool> m_applyMasking{this,"ApplyMasking",true,"Apply masking of supercells based on provenance bits. Should be set to False for MC"};
77 
78 
79 };
80 
81 } // end of LVL1 namespace
82 #endif
LVL1::eFexTowerBuilder::ATLAS_THREAD_SAFE
std::mutex m_fillMapMutex ATLAS_THREAD_SAFE
Definition: eFexTowerBuilder.h:59
LVL1::eFexTowerBuilder::fillTowers
StatusCode fillTowers(const EventContext &ctx) const
Definition: eFexTowerBuilder.cxx:71
LVL1::eFexTowerBuilder::execute
virtual StatusCode execute(const EventContext &ctx) const
Definition: eFexTowerBuilder.cxx:341
eFexTowerContainer.h
LVL1::eFexTowerBuilder::eFexTowerBuilder
eFexTowerBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Definition: eFexTowerBuilder.cxx:28
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
TriggerTowerContainer.h
LVL1::eFexTowerBuilder::initialize
virtual StatusCode initialize()
Definition: eFexTowerBuilder.cxx:33
LVL1::eFexTowerBuilder::m_eFEXSuperCellTowerIdProviderTool
ToolHandle< IeFEXSuperCellTowerIdProvider > m_eFEXSuperCellTowerIdProviderTool
Definition: eFexTowerBuilder.h:74
SG::ReadHandleKey< xAOD::EventInfo >
LVL1::eFexTowerBuilder::m_ddmKey
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_ddmKey
Definition: eFexTowerBuilder.h:67
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::eFexTowerBuilder::fillMap
StatusCode fillMap(const EventContext &ctx) const
Definition: eFexTowerBuilder.cxx:197
LVL1::eFexTowerBuilder::m_eiKey
SG::ReadHandleKey< xAOD::EventInfo > m_eiKey
Definition: eFexTowerBuilder.h:65
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
LVL1::eFexTowerBuilder::m_scellKey
SG::ReadHandleKey< CaloCellContainer > m_scellKey
Definition: eFexTowerBuilder.h:69
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
AthAlgorithm.h
LArBadChannelCont.h
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::eFexTowerBuilder::m_applyMasking
Gaudi::Property< bool > m_applyMasking
Definition: eFexTowerBuilder.h:76
TrigConf::name
Definition: HLTChainList.h:35
LVL1::eFexTowerBuilder::m_outKey
SG::WriteHandleKey< xAOD::eFexTowerContainer > m_outKey
Definition: eFexTowerBuilder.h:71
AthReentrantAlgorithm.h
LVL1::eFexTowerBuilder::ATLAS_THREAD_SAFE
std::map< unsigned long long, std::pair< std::pair< int, int >, std::pair< int, int > > > m_scMap ATLAS_THREAD_SAFE
Definition: eFexTowerBuilder.h:60
CaloCellContainer.h
EventInfo.h
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager >
LVL1::eFexTowerBuilder
Definition: eFexTowerBuilder.h:49
LVL1::eFexTowerBuilder::m_ttKey
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_ttKey
Definition: eFexTowerBuilder.h:70
LVL1::eFexTowerBuilder::m_mappingFile
Gaudi::Property< std::string > m_mappingFile
Definition: eFexTowerBuilder.h:73
eFEXSuperCellTowerIdProvider.h
Provide Supercell-tower mapping.
LArBadChannelMask.h
LVL1::eFexTowerBuilder::~eFexTowerBuilder
~eFexTowerBuilder()=default