ATLAS Offline Software
ChebyshevPolynomial.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6 // 07.04.2005, AUTHOR: OLIVER KORTNER
7 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8 
10 // IMPLEMENTATION OF THE CLASS ChebyshevPolynomial //
12 
14 
15 namespace MuonCalib {
16 
17 //*****************************************************************************
18 
20 // METHOD value //
22 
23  double ChebyshevPolynomial::value(const int & order, const double & x) const {
24 
25  switch(order) {
26  case 0:
27  return 1;
28  break;
29  case 1:
30  return x;
31  break;
32  case 2:
33  default:
34  return 2.0*x*value(order-1, x) - value(order-2, x);
35  break;
36  }
37 
38  }
39 
40 }
x
#define x
mc.order
order
Configure Herwig7.
Definition: mc.Herwig7_Dijet.py:12
MuonCalib::ChebyshevPolynomial::value
double value(const int &k, const double &x) const
get the value of the Chebyshev polynomial of k-th order at x, (-1 <= x <= 1)
Definition: ChebyshevPolynomial.cxx:23
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
ChebyshevPolynomial.h