19#include "CLHEP/Units/PhysicalConstants.h"
43 unsigned int n_samples = energies.
size();
49 unsigned int shape[] = {n_samples, 4};
53 for(
unsigned int i=0;i<n_samples;i++)
55 pol2Parm[i][0] = energies[i];
56 for(
unsigned int j=0;j<3;j++)
58 pol2Parm[i][j+1] = correction[i][j];
63 float energy = cluster->
e();
64 for(
unsigned int k=0; k<3;k++)
66 if(energy < energies[0])
67 coefs[k] = pol2Parm[0][k+1];
68 else if(energy > energies[n_samples-1])
69 coefs[k] = pol2Parm[n_samples-1][k+1];
71 coefs[k] = interpolate (pol2Parm, energy, degree, k+1);
75 float phi2 = cluster->
phiBE(2);
77 float mod = coefs[0]+coefs[1]*phi2+coefs[2]*phi2*phi2;
Definition of CaloDetDescrManager.
virtual void setenergy(xAOD::CaloCluster *cluster, float energy) const
Principal data class for CaloCell clusters.
virtual double e() const
Retrieve energy independent of signal state.
double phiBE(int sampling) const
EMB/EMEC combined barycenter .
This class groups all DetDescr information related to a CaloCell.
Constant< CxxUtils::Array< 2 > > m_correction
virtual void makeTheCorrection(const Context &myctx, xAOD::CaloCluster *cluster, const CaloDetDescrElement *elt, float eta, float adj_eta, float phi, float adj_phi, CaloSampling::CaloSample samp) const override
Constant< CxxUtils::Array< 1 > > m_energies
Read-only multidimensional array.
unsigned int size(unsigned int dim=0) const
Return the size of the array along one dimension.
Polynomial interpolation in a table.
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.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.