CMS 3D CMS Logo

Public Member Functions | Private Attributes

GCC11_FINAL< T, TOPO >::Polynomial Class Reference

List of all members.

Public Member Functions

float operator() (float x) const
 Evaluation of the polynomial.
 Polynomial ()
 Default constructor (needed for construction of a vector)
 Polynomial (float coefficients[], int is)

Private Attributes

int m_size = 0
float theCoeffs [MaxOrder] = {0}

Detailed Description

template<class T, class TOPO = CaloSubdetectorTopology>
class GCC11_FINAL< T, TOPO >::Polynomial

Helper class for construction & evaluation of a polynomial

Definition at line 34 of file GsfBetheHeitlerUpdator.h.


Constructor & Destructor Documentation

template<class T , class TOPO = CaloSubdetectorTopology>
GCC11_FINAL< T, TOPO >::Polynomial::Polynomial ( ) [inline]

Default constructor (needed for construction of a vector)

Definition at line 37 of file GsfBetheHeitlerUpdator.h.

{}
template<class T , class TOPO = CaloSubdetectorTopology>
GCC11_FINAL< T, TOPO >::Polynomial::Polynomial ( float  coefficients[],
int  is 
) [inline]

Constructor from a vector of coefficients (in decreasing order of powers of x)

Definition at line 41 of file GsfBetheHeitlerUpdator.h.

References i.

                                              :
      m_size(is) {
      for (int i=0; i!=m_size; ++i)
        theCoeffs[i]=coefficients[i];
    }

Member Function Documentation

template<class T , class TOPO = CaloSubdetectorTopology>
float GCC11_FINAL< T, TOPO >::Polynomial::operator() ( float  x) const [inline]

Evaluation of the polynomial.

Definition at line 47 of file GsfBetheHeitlerUpdator.h.

References i.

                                     {
      float sum=theCoeffs[0];
      for (int i=1; i!=m_size; ++i)
        sum = x*sum + theCoeffs[i];
      return sum;
    }

Member Data Documentation

template<class T , class TOPO = CaloSubdetectorTopology>
int GCC11_FINAL< T, TOPO >::Polynomial::m_size = 0 [private]

Definition at line 55 of file GsfBetheHeitlerUpdator.h.

template<class T , class TOPO = CaloSubdetectorTopology>
float GCC11_FINAL< T, TOPO >::Polynomial::theCoeffs[MaxOrder] = {0} [private]

Definition at line 54 of file GsfBetheHeitlerUpdator.h.