ATLAS Offline Software
ChebychevPoly.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONCALIBMATH_POLYNOMIALS_H
5 #define MUONCALIBMATH_POLYNOMIALS_H
6 
7 #include <cmath>
8 namespace MuonCalib{
13  constexpr double chebyshevPoly1st(const unsigned int order, const double x) {
14  double value{0.};
15  switch(order) {
16  case 0:
17  value=1.;
18  break;
19  case 1:
20  value = x;
21  break;
22  default:
24  break;
25  }
26  return value;
27  }
32  constexpr double chebyshevPoly2nd(const unsigned int order, const double x) {
33  double value{0.};
34  switch (order) {
35  case 0:
36  value = 1.;
37  break;
38  case 1:
39  value = 2.*x;
40  break;
41  default:
43  }
44  return value;
45  }
49  constexpr double chebyshevPoly1stPrime(const unsigned int order, const double x) {
50  double value{0.};
51  switch (order) {
52  case 0:
53  break;
54  case 1:
55  value = 1.;
56  break;
57  default:
59  }
60  return value;
61  }
65  constexpr double chebyshevPoly2ndPrime(const unsigned int order, const double x) {
66  double value{0.};
67  switch (order) {
68  case 0:
69  break;
70  case 1:
71  value = 2.;
72  break;
73  default:
75  }
76  return value;
77  }
81  constexpr double chebyshevPoly1st2Prime(const unsigned int order, const double x) {
82  double value{0.};
83  switch (order) {
84  case 0:
85  case 1:
86  break;
87  default:
89  }
90  return value;
91  }
95  constexpr double chebyshevPoly2nd2Prime(const unsigned int order, const double x) {
96  double value{0.};
97  switch (order) {
98  case 0:
99  case 1:
100  break;
101  default:
103  }
104  return value;
105  }
106 }
107 #endif
athena.value
value
Definition: athena.py:124
MuonCalib::chebyshevPoly2nd2Prime
constexpr double chebyshevPoly2nd2Prime(const unsigned int order, const double x)
Returns the second derivative of the n-th Chebycheb polynomial of the first second kind.
Definition: ChebychevPoly.h:95
x
#define x
MuonCalib::chebyshevPoly1st2Prime
constexpr double chebyshevPoly1st2Prime(const unsigned int order, const double x)
Returns the second derivative of the n-th Chebycheb polynomial of the first kind.
Definition: ChebychevPoly.h:81
mc.order
order
Configure Herwig7.
Definition: mc.Herwig7_Dijet.py:12
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::chebyshevPoly2ndPrime
constexpr double chebyshevPoly2ndPrime(const unsigned int order, const double x)
Returns the first derivative of the n-th Chebycheb polynomial of the first second kind.
Definition: ChebychevPoly.h:65
MuonCalib::chebyshevPoly1st
constexpr double chebyshevPoly1st(const unsigned int order, const double x)
Returns the n-th Chebyshev polynomial of first kind evaluated at x (c.f.
Definition: ChebychevPoly.h:13
MuonCalib::chebyshevPoly2nd
constexpr double chebyshevPoly2nd(const unsigned int order, const double x)
Returns the n-th Chebyshev polynomial of second kind evaluated at x (c.f.
Definition: ChebychevPoly.h:32
MuonCalib::chebyshevPoly1stPrime
constexpr double chebyshevPoly1stPrime(const unsigned int order, const double x)
Returns the first derivative of the n-th Chebycheb polynomial of the first kind.
Definition: ChebychevPoly.h:49