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 
36 
37 class CaloIdManager;
38 
39 
48 namespace LVL1 {
49 
51 {
52  public:
53 
54  eFexTowerBuilder(const std::string& name, ISvcLocator* pSvcLocator);
55  ~eFexTowerBuilder() = default;
56 
57  virtual StatusCode initialize();
58  virtual StatusCode execute(const EventContext& ctx) const;
59 
60  private:
61  mutable std::mutex m_fillMapMutex ATLAS_THREAD_SAFE;
62  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)
63 
64  StatusCode fillTowers(const EventContext& ctx) const;
65  StatusCode fillMap(const EventContext& ctx) const;
66 
67  SG::ReadHandleKey<xAOD::EventInfo> m_eiKey{this,"EventInfoKey","EventInfo",""};
68 
69  SG::ReadCondHandleKey<CaloSuperCellDetDescrManager> m_ddmKey{this,"CaloSuperCellDetDescrManager","CaloSuperCellDetDescrManager",""};
70 
71  SG::ReadHandleKey<CaloCellContainer> m_scellKey { this, "CaloCellContainerReadKey", "SCell", "Read handle key for the supercells"};
72  SG::ReadHandleKey<xAOD::TriggerTowerContainer> m_ttKey { this, "TriggerTowerContainerReadKey", "xAODTriggerTowers", "Read handle key for the triggerTowers"};
73  SG::WriteHandleKey<xAOD::eFexTowerContainer> m_outKey {this, "eFexContainerWriteKey", "L1_eFexEmulatedTowers", "Name of the output container"};
74 
75  Gaudi::Property<std::string> m_mappingFile {this, "MappingFile", "L1CaloFEXByteStream/2023-02-13/scToEfexTowers.root", "PathResolver location to mapping file"};
76  ToolHandle<eFEXSuperCellTowerIdProvider> m_eFEXSuperCellTowerIdProviderTool {this, "eFEXSuperCellTowerIdProviderTool", "LVL1::eFEXSuperCellTowerIdProvider", "Tool that provides tower-FOGA mapping"};
77 
78  Gaudi::Property<bool> m_applyMasking{this,"ApplyMasking",true,"Apply masking of supercells based on provenance bits. Should be set to False for MC"};
79 
80  Gaudi::Property<bool> m_v6Mapping{this,"UseLATOMEv6Mapping",false,"If true, will use the LATOME v6 mapping if cannot determine from latome header"};
81  SG::ReadHandleKey<LArLATOMEHeaderContainer> m_LArLatomeHeaderContainerKey { this, "LArLatomeHeaderKey", "SC_LATOME_HEADER" };
82 
83 };
84 
85 } // end of LVL1 namespace
86 #endif
LVL1::eFexTowerBuilder::ATLAS_THREAD_SAFE
std::mutex m_fillMapMutex ATLAS_THREAD_SAFE
Definition: eFexTowerBuilder.h:61
LVL1::eFexTowerBuilder::fillTowers
StatusCode fillTowers(const EventContext &ctx) const
Definition: eFexTowerBuilder.cxx:74
LVL1::eFexTowerBuilder::execute
virtual StatusCode execute(const EventContext &ctx) const
Definition: eFexTowerBuilder.cxx:379
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
LArLATOMEHeaderContainer.h
LVL1::eFexTowerBuilder::initialize
virtual StatusCode initialize()
Definition: eFexTowerBuilder.cxx:33
SG::ReadHandleKey< xAOD::EventInfo >
LVL1::eFexTowerBuilder::m_ddmKey
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_ddmKey
Definition: eFexTowerBuilder.h:69
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:216
LVL1::eFexTowerBuilder::m_eiKey
SG::ReadHandleKey< xAOD::EventInfo > m_eiKey
Definition: eFexTowerBuilder.h:67
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
LVL1::eFexTowerBuilder::m_scellKey
SG::ReadHandleKey< CaloCellContainer > m_scellKey
Definition: eFexTowerBuilder.h:71
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
AthAlgorithm.h
LVL1::eFexTowerBuilder::m_LArLatomeHeaderContainerKey
SG::ReadHandleKey< LArLATOMEHeaderContainer > m_LArLatomeHeaderContainerKey
Definition: eFexTowerBuilder.h:81
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:78
LVL1::eFexTowerBuilder::m_v6Mapping
Gaudi::Property< bool > m_v6Mapping
Definition: eFexTowerBuilder.h:80
TrigConf::name
Definition: HLTChainList.h:35
LVL1::eFexTowerBuilder::m_outKey
SG::WriteHandleKey< xAOD::eFexTowerContainer > m_outKey
Definition: eFexTowerBuilder.h:73
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:62
CaloCellContainer.h
LVL1::eFexTowerBuilder::m_eFEXSuperCellTowerIdProviderTool
ToolHandle< eFEXSuperCellTowerIdProvider > m_eFEXSuperCellTowerIdProviderTool
Definition: eFexTowerBuilder.h:76
EventInfo.h
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager >
LVL1::eFexTowerBuilder
Definition: eFexTowerBuilder.h:51
LVL1::eFexTowerBuilder::m_ttKey
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_ttKey
Definition: eFexTowerBuilder.h:72
LVL1::eFexTowerBuilder::m_mappingFile
Gaudi::Property< std::string > m_mappingFile
Definition: eFexTowerBuilder.h:75
eFEXSuperCellTowerIdProvider.h
Provide Supercell-tower mapping.
LArBadChannelMask.h
LVL1::eFexTowerBuilder::~eFexTowerBuilder
~eFexTowerBuilder()=default