ATLAS Offline Software
Loading...
Searching...
No Matches
LArHITtoCell.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LARROD_LARHITTOCELL_H
6#define LARROD_LARHITTOCELL_H
7// +======================================================================+
8// + +
9// + Author ........: Denis Oliveira Damazio +
10// + Institute ......: BNL +
11// + Creation date .: 29/04/2021 +
12// + +
13// +======================================================================+
14//
15// ....... include
16//
17
19#include "GaudiKernel/ToolHandle.h"
32
33
37class CaloCell;
38class CaloIdManager;
40
46{
47public:
49 LArHITtoCell(const std::string& name, ISvcLocator* pSvcLocator);
51
52
54 StatusCode initialize();
55
57 StatusCode execute(const EventContext& context) const;
58
59private:
60
61 SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"ScCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"};
62
65 {this, "FracSKey", "LArfSamplSC", "SG Key of fSamplS conditions object"};
66
68 {this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" };
69
71 {this, "CaloSuperCellDetDescrManager", "CaloSuperCellDetDescrManager", "SG key of the resulting CaloSuperCellDetDescrManager" };
72
74 ToolHandle<ICaloSuperCellIDTool> m_scidtool
75 { this, "SCIDTool", "CaloSuperCellIDTool" ,
76 "Offline / supercell mapping tool."};
77
79 SG::ReadHandleKey<LArHitEMap> m_hitMapKey{this,"LArHitEMapKey","LArHitEMap"};
80
82 SG::WriteHandleKey<CaloCellContainer> m_cellKey{this,"CaloCellKey","SCellHITs",
83 "SG key of the output CaloCellContainer"};
84
86 Gaudi::Property<bool> m_isSC { this, "IsSuperCell",true,
87 "Is Super Cell" };
88
91
95 const CaloCell_ID* m_OflHelper = nullptr;
96
97
98 template <class T>
99 const T* retrieve(const EventContext& context, const SG::ReadCondHandleKey<T>& handleKey) const {
100 SG::ReadCondHandle<T> handle( handleKey, context);
101 if ( not handle.isValid() ) {
102 ATH_MSG_ERROR("could not retrieve : " << handle.key() );
103 return nullptr;
104 } else return handle.cptr();
105 }
106
107
108};
109
110
111#endif // not LARROD_LARHITTOCELL_H
#define ATH_MSG_ERROR(x)
Definition of CaloDetDescrManager.
defines and typedefs for IOVSvc
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
Helper class for offline supercell identifiers.
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
This class groups all DetDescr information related to a CaloCell.
This class initializes the Calo (LAr and Tile) offline identifiers.
Interface for tool to map between calorimeter cells and supercells.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Gaudi::Property< bool > m_isSC
if is SuperCell
LArHITtoCell(const std::string &name, ISvcLocator *pSvcLocator)
Standard Gaudi algorithm constructor.
const CaloIdManager * m_calo_id_manager
Entry point for calorimeter ID helpers.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
SG::WriteHandleKey< CaloCellContainer > m_cellKey
Property Output Container.
ToolHandle< ICaloSuperCellIDTool > m_scidtool
Property: Offline / supercell mapping tool.
const CaloCell_SuperCell_ID * m_scHelper
pointer to the offline TT helper
SG::ReadCondHandleKey< ILArfSampl > m_fracSKey
Property: Fraction of Energy Sampled (conditions input).
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
SG::ReadHandleKey< LArHitEMap > m_hitMapKey
hit map
const T * retrieve(const EventContext &context, const SG::ReadCondHandleKey< T > &handleKey) const
const CaloCell_ID * m_OflHelper
pointer to the offline id helper
StatusCode initialize()
Standard Gaudi initialize method.
StatusCode execute(const EventContext &context) const
Algorithm execute method.
const std::string & key() const
const_pointer_type cptr()
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.