ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCellCorrection.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5/********************************************************************
6
7NAME: CaloCellCorrection.h used to be LArCellCorrection.h
8PACKAGE: offline/Calorimeter/CaloUtils
9
10AUTHORS: H. Ma, S. Rajagopalan
11CREATED: Dec. 15, 1999
12
13PURPOSE: Performs cell corrections for CaloCell objects
14 This is the base class for individual cell correction classes.
15
16
17Updated: May 10, 2000 (SR, HM)
18 Migrated to Athena Framework from PASO
19
20Updated: Jan. 2, 2001 (SR)
21 Adhere to QC standards (based on comments from S. Albrand)
22
23Updated: Jan 2003
24 Made to an AlgTool,
25 Moved to LArCalorimeter/LArRecUtils
26
27Update : June 2004 David Rousseau
28 Change name
29 Work off CaloCell, not LArCell anymore, without friend mechanism
30
31********************************************************************/
32
33// Calo Header files:
34
37#include "CaloEvent/CaloCell.h"
38
40
41// DESTRUCTOR:
42
44= default;
45
47// EXECUTE method: Correct cells in input cell container
49
51 const EventContext& ctx) const
52{
53
54 ATH_MSG_DEBUG("Executing CaloCellCorrection");
55
56 if (!cellCollection) {
57 ATH_MSG_ERROR( "Cell Correction tool receives invalid cell Collection" );
58 return StatusCode::FAILURE;
59 }
60
61 // Loop over all the CaloCell Objects and call Make Correction.
62 // Note that this is the base class of all the concrete correction
63 // classes which implement a Make Correction method.
64
65 for (CaloCell* cell : *cellCollection) {
66 MakeCorrection ( cell, ctx );
67 }
68
69 // Done, Return success
70
71 return StatusCode::SUCCESS;
72
73}
74
76// Other methods:
77// The following methods "correct" the CaloCell data members.
79
80
81void CaloCellCorrection::setenergy(CaloCell* theCell, float energy)
82{
83 theCell->setEnergy( energy );
84}
85
86void CaloCellCorrection::addenergy(CaloCell* theCell, float energy)
87{
88 theCell->addEnergy( energy );
89}
90
91void CaloCellCorrection::scaleenergy(CaloCell* theCell, float scale)
92{
93 theCell->scaleEnergy( scale );
94}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
Container class for CaloCell.
static void addenergy(CaloCell *lar_cell, float energy)
virtual StatusCode execute(CaloCellContainer *cellCollection, const EventContext &ctx) const
static void setenergy(CaloCell *lar_cell, float energy)
virtual ~CaloCellCorrection()
static void scaleenergy(CaloCell *lar_cell, float scale)
virtual void MakeCorrection(CaloCell *cellCollection, const EventContext &ctx) const =0
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
void addEnergy(float energy)
add energy
Definition CaloCell.h:449
virtual void setEnergy(float energy)
set energy
Definition CaloCell.h:472
virtual void scaleEnergy(float scale)
scale energy
Definition CaloCell.h:478