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 
33 class CaloIdManager;
34 
35 
44 namespace LVL1 {
45 
47 {
48  public:
49 
50  eFexTowerBuilder(const std::string& name, ISvcLocator* pSvcLocator);
51  ~eFexTowerBuilder() = default;
52 
53  virtual StatusCode initialize();
54  virtual StatusCode execute(const EventContext& ctx) const;
55 
56  private:
57  mutable std::mutex m_fillMapMutex ATLAS_THREAD_SAFE;
58  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)
59 
60  StatusCode fillTowers(const EventContext& ctx) const;
61  StatusCode fillMap(const EventContext& ctx) const;
62 
63  SG::ReadCondHandleKey<CaloSuperCellDetDescrManager> m_ddmKey{this,"CaloSuperCellDetDescrManager","CaloSuperCellDetDescrManager",""};
64 
65  SG::ReadHandleKey<CaloCellContainer> m_scellKey { this, "CaloCellContainerReadKey", "SCell", "Read handle key for the supercells"};
66  SG::ReadHandleKey<xAOD::TriggerTowerContainer> m_ttKey { this, "TriggerTowerContainerReadKey", "xAODTriggerTowers", "Read handle key for the triggerTowers"};
67  SG::WriteHandleKey<xAOD::eFexTowerContainer> m_outKey {this, "eFexContainerWriteKey", "L1_eFexEmulatedTowers", "Name of the output container"};
68 
69  Gaudi::Property<std::string> m_mappingFile {this, "MappingFile", "L1CaloFEXByteStream/2023-02-13/scToEfexTowers.root", "PathResolver location to mapping file"};
70  ToolHandle<IeFEXSuperCellTowerIdProvider> m_eFEXSuperCellTowerIdProviderTool {this, "eFEXSuperCellTowerIdProviderTool", "LVL1::eFEXSuperCellTowerIdProvider", "Tool that provides tower-FOGA mapping"};
71 
72  Gaudi::Property<bool> m_applyMasking{this,"ApplyMasking",true,"Apply masking of supercells based on provenance bits. Should be set to False for MC"};
73 
75 
76 };
77 
78 } // end of LVL1 namespace
79 #endif
LVL1::eFexTowerBuilder::ATLAS_THREAD_SAFE
std::mutex m_fillMapMutex ATLAS_THREAD_SAFE
Definition: eFexTowerBuilder.h:57
LVL1::eFexTowerBuilder::fillTowers
StatusCode fillTowers(const EventContext &ctx) const
Definition: eFexTowerBuilder.cxx:77
LVL1::eFexTowerBuilder::execute
virtual StatusCode execute(const EventContext &ctx) const
Definition: eFexTowerBuilder.cxx:388
eFexTowerContainer.h
LVL1::eFexTowerBuilder::eFexTowerBuilder
eFexTowerBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Definition: eFexTowerBuilder.cxx:34
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
TriggerTowerContainer.h
LVL1::eFexTowerBuilder::initialize
virtual StatusCode initialize()
Definition: eFexTowerBuilder.cxx:39
LVL1::eFexTowerBuilder::m_eFEXSuperCellTowerIdProviderTool
ToolHandle< IeFEXSuperCellTowerIdProvider > m_eFEXSuperCellTowerIdProviderTool
Definition: eFexTowerBuilder.h:70
SG::ReadHandleKey< CaloCellContainer >
LVL1::eFexTowerBuilder::m_ddmKey
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_ddmKey
Definition: eFexTowerBuilder.h:63
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:244
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
LVL1::eFexTowerBuilder::m_scellKey
SG::ReadHandleKey< CaloCellContainer > m_scellKey
Definition: eFexTowerBuilder.h:65
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
LVL1::eFexTowerBuilder::m_debugMutex
std::mutex m_debugMutex
Definition: eFexTowerBuilder.h:74
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:72
TrigConf::name
Definition: HLTChainList.h:35
LVL1::eFexTowerBuilder::m_outKey
SG::WriteHandleKey< xAOD::eFexTowerContainer > m_outKey
Definition: eFexTowerBuilder.h:67
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:58
CaloCellContainer.h
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager >
LVL1::eFexTowerBuilder
Definition: eFexTowerBuilder.h:47
LVL1::eFexTowerBuilder::m_ttKey
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_ttKey
Definition: eFexTowerBuilder.h:66
LVL1::eFexTowerBuilder::m_mappingFile
Gaudi::Property< std::string > m_mappingFile
Definition: eFexTowerBuilder.h:69
eFEXSuperCellTowerIdProvider.h
Provide Supercell-tower mapping.
LArBadChannelMask.h
LVL1::eFexTowerBuilder::~eFexTowerBuilder
~eFexTowerBuilder()=default