ATLAS Offline Software
LArHITtoCell.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 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"
20 #include "AthAllocators/DataPool.h"
32 
33 
37 class CaloCell;
38 class CaloIdManager;
40 
46 {
47 public:
49  LArHITtoCell(const std::string& name, ISvcLocator* pSvcLocator);
51 
52 
55 
57  StatusCode execute(const EventContext& context) const;
58 
59 private:
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, 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
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
LArHITtoCell::LArHITtoCell
LArHITtoCell(const std::string &name, ISvcLocator *pSvcLocator)
Standard Gaudi algorithm constructor.
Definition: LArHITtoCell.cxx:31
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
ICaloSuperCellIDTool
Interface for tool to map between calorimeter cells and supercells.
Definition: ICaloSuperCellIDTool.h:31
LArHITtoCell::m_caloSuperCellMgrKey
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
Definition: LArHITtoCell.h:71
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:206
LArHITtoCell::m_calo_id_manager
const CaloIdManager * m_calo_id_manager
Entry point for calorimeter ID helpers.
Definition: LArHITtoCell.h:90
LArHITtoCell::m_scidtool
ToolHandle< ICaloSuperCellIDTool > m_scidtool
Property: Offline / supercell mapping tool.
Definition: LArHITtoCell.h:75
SG::ReadHandleKey< LArHitEMap >
LArHITtoCell::m_cellKey
SG::WriteHandleKey< CaloCellContainer > m_cellKey
Property Output Container.
Definition: LArHITtoCell.h:82
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
CaloSuperCellDetDescrManager
Definition: CaloDetDescrManager.h:490
LArHITtoCell::~LArHITtoCell
~LArHITtoCell()
Definition: LArHITtoCell.h:50
LArHITtoCell::retrieve
const T * retrieve(const EventContext &context, SG::ReadCondHandleKey< T > handleKey) const
Definition: LArHITtoCell.h:99
LArOnOffIdMapping.h
LArHITtoCell::m_OflHelper
const CaloCell_ID * m_OflHelper
pointer to the offline id helper
Definition: LArHITtoCell.h:95
LArHitEMap.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::WriteHandleKey< CaloCellContainer >
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
CaloCell_SuperCell_ID
Helper class for offline supercell identifiers.
Definition: CaloCell_SuperCell_ID.h:48
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArHITtoCell::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArHITtoCell.h:61
LArHITtoCell::m_hitMapKey
SG::ReadHandleKey< LArHitEMap > m_hitMapKey
hit map
Definition: LArHITtoCell.h:79
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
CaloNoiseSigmaDiff.h
DataPool.h
ReadCondHandleKey.h
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloCellContainer.h
LArOnline_SuperCellID
Definition: LArOnline_SuperCellID.h:20
CaloBCIDAverage.h
SG::ReadCondHandleKey< LArOnOffIdMapping >
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
LArHITtoCell
Make a dummy supercell LArRawChannelContainer from a CaloCallContainer.
Definition: LArHITtoCell.h:46
LArHITtoCell::initialize
StatusCode initialize()
Standard Gaudi initialize method.
Definition: LArHITtoCell.cxx:38
LArHITtoCell::m_scHelper
const CaloCell_SuperCell_ID * m_scHelper
pointer to the offline TT helper
Definition: LArHITtoCell.h:93
IOVSvcDefs.h
defines and typedefs for IOVSvc
LArHITtoCell::m_isSC
Gaudi::Property< bool > m_isSC
if is SuperCell
Definition: LArHITtoCell.h:86
LArHITtoCell::m_fracSKey
SG::ReadCondHandleKey< ILArfSampl > m_fracSKey
Property: Fraction of Energy Sampled (conditions input).
Definition: LArHITtoCell.h:65
SG::ReadCondHandle::key
const std::string & key() const
Definition: ReadCondHandle.h:59
LArHITtoCell::execute
StatusCode execute(const EventContext &context) const
Algorithm execute method.
Definition: LArHITtoCell.cxx:72
ILArfSampl.h
LArHITtoCell::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: LArHITtoCell.h:68
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
SG::ReadCondHandle::cptr
const_pointer_type cptr()
Definition: ReadCondHandle.h:67