ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
LArCellContHVCorrTool Class Reference

#include <LArCellContHVCorrTool.h>

Inheritance diagram for LArCellContHVCorrTool:
Collaboration diagram for LArCellContHVCorrTool:

Public Member Functions

 ~LArCellContHVCorrTool ()=default
 
virtual StatusCode initialize () override final
 
virtual StatusCode process (CaloCellContainer *cellCollection, const EventContext &ctx) const override final
 

Private Attributes

SG::ReadCondHandleKey< LArHVCorrm_offlineHVScaleCorrKey {this, "keyOfflineHVCorr", "LArHVScaleCorrRecomputed","Key for LArHVScaleCorr"}
 

Detailed Description

Definition at line 18 of file LArCellContHVCorrTool.h.

Constructor & Destructor Documentation

◆ ~LArCellContHVCorrTool()

LArCellContHVCorrTool::~LArCellContHVCorrTool ( )
default

Member Function Documentation

◆ initialize()

StatusCode LArCellContHVCorrTool::initialize ( )
finaloverridevirtual

Definition at line 12 of file LArCellContHVCorrTool.cxx.

12  {
13 
15 
16  return StatusCode::SUCCESS;
17 }

◆ process()

StatusCode LArCellContHVCorrTool::process ( CaloCellContainer cellCollection,
const EventContext &  ctx 
) const
finaloverridevirtual

Definition at line 19 of file LArCellContHVCorrTool.cxx.

19  {
20 
21  // get offline HVScaleCorr
23  const LArHVCorr *oflHVCorr = *oflHVCorrHdl;
24  if(!oflHVCorr) {
25  ATH_MSG_ERROR("Do not have ofline HV corr. conditions object !!!!");
26  return StatusCode::FAILURE;
27  }
28 
29  if (!cellCollection) {
30  ATH_MSG_ERROR( "Cell Correction tool receives invalid cell Collection" );
31  return StatusCode::FAILURE;
32  }
33 
34 
35  for (CaloCell* theCell : *cellCollection) {
36  const float hvcorr = oflHVCorr->HVScaleCorr(theCell->ID());
37  theCell->setEnergy(theCell->energy()*hvcorr);
38  }// End loop over cell-container
39  return StatusCode::SUCCESS;
40 }

Member Data Documentation

◆ m_offlineHVScaleCorrKey

SG::ReadCondHandleKey<LArHVCorr> LArCellContHVCorrTool::m_offlineHVScaleCorrKey {this, "keyOfflineHVCorr", "LArHVScaleCorrRecomputed","Key for LArHVScaleCorr"}
private

Definition at line 31 of file LArCellContHVCorrTool.h.


The documentation for this class was generated from the following files:
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LArHVCorr
Definition: LArHVCorr.h:16
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
LArCellContHVCorrTool::m_offlineHVScaleCorrKey
SG::ReadCondHandleKey< LArHVCorr > m_offlineHVScaleCorrKey
Definition: LArCellContHVCorrTool.h:31
LArHVCorr::HVScaleCorr
virtual const float & HVScaleCorr(const HWIdentifier &chid) const override final
Definition: LArHVCorr.cxx:19