62 float u = (
eta - elt->
eta()) / elt->
deta() * 2;
77 unsigned int n_energies = energies.
size();
78 unsigned int shape[] = {n_energies, 4};
80 if (n_energies == 0) {
90 float energy = cluster->
e();
91 if (energy <= energies[0])
93 else if (energy >= energies[n_energies-1])
96 for (
int i=beg; i<end; i++) {
97 partab[i][0] = energies[i];
98 for (
int j=0; j < 3; j++)
99 partab[i][j+1] = interpolate (correction[i],
110 for (
int i=0; i < 3; i++) {
112 par[i] = interpolate (partab, energy, energy_degree, i+1);
114 par[i] = partab[beg][i+1];
120 double b = std::max ((
double)par[1], 1e-5);
121 double atanb = std::atan(b);
122 double sq = std::sqrt (b/atanb - 1);
123 double den = (
sq/b*atanb - std::atan(
sq));
124 float offs = par[0]* ((- std::atan (b*u) + u*atanb) / den +
125 par[2]*(1-std::abs(u)));
Scalar eta() const
pseudorapidity method
Definition of CaloDetDescrManager.
CaloPhiRange class declaration.
EM calorimeter eta offset (S-shape) corrections.
Principal data class for CaloCell clusters.
virtual double e() const
Retrieve energy independent of signal state.
virtual void setEta(double eta)
Set eta.
This class groups all DetDescr information related to a CaloCell.
float eta_raw() const
cell eta_raw
float eta() const
cell eta
float deta() const
cell deta
Constant< CxxUtils::Array< 1 > > m_interp_barriers
Calibration constant: allow breaking up the interpolation into independent regions.
Constant< CxxUtils::Array< 3 > > m_correction
Calibration constant: tabulated arrays of function parameters.
Constant< int > m_degree
Calibration constant: degree of the polynomial interpolation.
Constant< int > m_energy_degree
Calibration constant: degree of the polynomial interpolation in energy.
Constant< CxxUtils::Array< 1 > > m_energies
Calibration constant: table of energies at which the correction was tabulated.
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.
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.