ATLAS Offline Software
Loading...
Searching...
No Matches
CaloSwPhioff_v2::Builder Class Reference

Helper class for calculating the energy interpolation table. More...

Inheritance diagram for CaloSwPhioff_v2::Builder:
Collaboration diagram for CaloSwPhioff_v2::Builder:

Public Member Functions

 Builder (const CxxUtils::Array< 3 > &correction, const CxxUtils::Array< 1 > &interp_barriers, int degree, float aeta)
 Constructor.
virtual float calculate (int energy_ndx, bool &good) const
 Calculate the correction for tabulated energy ENERGY_NDX.

Private Attributes

const CxxUtils::Array< 3 > m_correction
 Tabulated arrays of function parameters.
const CxxUtils::Array< 1 > m_interp_barriers
 Allow breaking up the interpolation into independent regions.
int m_degree
 Degree of the polynomial interpolation.
float m_aeta
 The abs(eta) at which the correction is being evaluated (in cal-local coordinates).

Detailed Description

Helper class for calculating the energy interpolation table.

Definition at line 97 of file CaloSwPhioff_v2.h.

Constructor & Destructor Documentation

◆ Builder()

CaloSwPhioff_v2::Builder::Builder ( const CxxUtils::Array< 3 > & correction,
const CxxUtils::Array< 1 > & interp_barriers,
int degree,
float aeta )

Constructor.

Constructor for energy interpolation table helper class.

Gets the correction information, and the abs(eta) at which the correction is being evaluated (in cal-local coordinates).

Parameters
correctionTabulated arrays of function parameters.
interp_barriersAllow breaking up the interpolation into independent regions.
degreeDegree of the polynomial interpolation.
aetaThe absolute value of \(\eta\) at which the correction is being evaluated (in cal-local coordinates).

Definition at line 108 of file CaloSwPhioff_v2.cxx.

112 : m_correction (correction),
113 m_interp_barriers (interp_barriers),
114 m_degree (degree),
115 m_aeta (aeta)
116{
117}
const CxxUtils::Array< 3 > m_correction
Tabulated arrays of function parameters.
const CxxUtils::Array< 1 > m_interp_barriers
Allow breaking up the interpolation into independent regions.
int m_degree
Degree of the polynomial interpolation.
float m_aeta
The abs(eta) at which the correction is being evaluated (in cal-local coordinates).

Member Function Documentation

◆ calculate()

float CaloSwPhioff_v2::Builder::calculate ( int energy_ndx,
bool & good ) const
virtual

Calculate the correction for tabulated energy ENERGY_NDX.

Calculate the correction for one tabulated energy index.

Parameters
energy_ndxThe tabulated energy index for which the correction should be calculated.
good[out]Set to true if the calculation succeeds.

Definition at line 126 of file CaloSwPhioff_v2.cxx.

127{
128 good = true;
129 return interpolate (m_correction[energy_ndx],
130 m_aeta,
131 m_degree,
132 1,
134}
float interpolate(const CaloRec::Array< 2 > &a, float x, unsigned int degree, unsigned int ycol=1, const CaloRec::Array< 1 > &regions=CaloRec::Array< 1 >(), int n_points=-1, bool fixZero=false)
Polynomial interpolation in a table.

Member Data Documentation

◆ m_aeta

float CaloSwPhioff_v2::Builder::m_aeta
private

The abs(eta) at which the correction is being evaluated (in cal-local coordinates).

Definition at line 124 of file CaloSwPhioff_v2.h.

◆ m_correction

const CxxUtils::Array<3> CaloSwPhioff_v2::Builder::m_correction
private

Tabulated arrays of function parameters.

Definition at line 114 of file CaloSwPhioff_v2.h.

◆ m_degree

int CaloSwPhioff_v2::Builder::m_degree
private

Degree of the polynomial interpolation.

Definition at line 120 of file CaloSwPhioff_v2.h.

◆ m_interp_barriers

const CxxUtils::Array<1> CaloSwPhioff_v2::Builder::m_interp_barriers
private

Allow breaking up the interpolation into independent regions.

Definition at line 117 of file CaloSwPhioff_v2.h.


The documentation for this class was generated from the following files: