52 if (correction.size() == 0) {
57 float adj_aeta = std::abs (adj_eta);
59 if (std::abs (adj_eta) >
m_etamax (myctx)) {
60 fac = correction[correction.size()-1][1];
68 fac = interpolate (correction, adj_aeta,
m_degree (myctx),
72 cluster->
setE (cluster->
e() / fac);
Scale cluster energy by an eta-dependent factor.
Principal data class for CaloCell clusters.
virtual double e() const
Retrieve energy independent of signal state.
virtual void setE(double e)
Set energy.
This class groups all DetDescr information related to a CaloCell.
Constant< CxxUtils::Array< 2 > > m_correction
Calibration constant: tabulated arrays of function parameters.
Constant< float > m_etamax
Calibration constant: maximum eta for which this correction is defined.
Constant< int > m_degree
Calibration constant: degree of the polynomial interpolation.
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
Virtual function for the correction-specific code.
Read-only multidimensional array.
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.