21#include "GaudiKernel/MsgStream.h"
22#include "CaloGeoHelpers/CaloSampling.h"
28 CHECK (base_class::initialize());
32 return StatusCode::SUCCESS;
41 return StatusCode::SUCCESS;
52 float the_aeta=(clus->
eta());
53 if (the_aeta<0) the_aeta=-the_aeta;
59 float a = interpolate(correction, the_aeta, degree,1);
60 float alpha = interpolate(correction, the_aeta, degree,2);
61 float offset = interpolate(correction, the_aeta, degree,3);
62 float eh_scint = clus->
energy(CaloSampling::TileGap3);
64 clus->
setEnergy(
a*(ec+alpha*eh_scint + offset));
#define CHECK(...)
Evaluate an expression and check for errors.
Read-only multidimensional array.
virtual StatusCode finalize() override
Finalization of the tool.
Constant< float > m_eta_start_crack
Constant< float > m_eta_end_crack
virtual void makeCorrection(xAOD::TrigEMCluster *, const void *v=nullptr) const override
method to perform the correction.
virtual StatusCode initialize() override
Initialization of the tool.
Constant< CxxUtils::Array< 2 > > m_correction
void setEt(float)
set Et (calibrated)
float eta() const
get Eta (calibrated)
void setEnergy(float energy)
set Energy (calibrated)
float energy() const
get Energy (calibrated)
float interpolate(const CaloRec::Array< 2 > &a, float x, unsigned int degree, unsigned int ycol=1, const CaloRec::Array< 1 > ®ions=CaloRec::Array< 1 >(), int n_points=-1, bool fixZero=false)
Polynomial interpolation in a table.
TrigEMCluster_v1 TrigEMCluster
Define the latest version of the trigger EM cluster class.