65 assert (residuals.
size(1)-1 == residual_bins.
size());
69 if (
eta == -999.)
return;
70 float aeta = fabs(
eta);
76 float deta = correction_coef * interpolate (correction,
85 unsigned int shape[] = {residual_bins.
size(), 2};
88 for (
unsigned int i=0; i < residual_bins.
size(); i++) {
89 w[i][0] = residual_bins[i];
90 w[i][1] = interpolate (residuals,
98 deta += residual_coef * interpolate (w,
105 cluster->
setEta(CaloSampling::EMB2,
eta - deta);
111 static const std::string typeName =
"CaloSwEta_g3";
Scalar eta() const
pseudorapidity method
Principal data class for CaloCell clusters.
virtual void setEta(double eta)
Set eta.
double etaSample(sampling_type sampling) const
Retrieve barycenter in a given sample.
bool inBarrel() const
Returns true if at least one clustered cell in EMB.
Constant< float > m_residual_coef
Constant< int > m_residual_eval_degree
Constant< CxxUtils::Array< 2 > > m_correction
Constant< int > m_residual_degree
Constant< CxxUtils::Array< 1 > > m_residual_bins
virtual const std::string & toolType() const override
Return the name of the type of this tool.
static const float s_middle_layer_granularity
Constant< int > m_correction_degree
Constant< float > m_correction_coef
Constant< CxxUtils::Array< 2 > > m_residuals
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *cluster) const override
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.