ATLAS Offline Software
Loading...
Searching...
No Matches
LegendrePoly.h File Reference
#include <cmath>
Include dependency graph for LegendrePoly.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  MuonCalib
 CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
namespace  MuonCalib::Legendre

Macros

#define POLYSWITCH(order, x)
#define DERIVPOLYSWITICH(l, d, x)
#define DERIVORDERSWITCH(l, d, x)

Functions

constexpr unsigned long MuonCalib::factorial (const int n)
 Evaluated the n-th factorial at compile time.
constexpr unsigned long MuonCalib::binomial (const unsigned n, const unsigned k)
 Calculates the binomial coefficient at compile time.
template<int k>
constexpr double MuonCalib::pow (const double x)
 Calculate the power of a variable x at compile time.
constexpr double MuonCalib::pow (double x, int power)
 Calculate the power of a variable at run time.
constexpr double MuonCalib::Legendre::coeff (const unsigned l, const unsigned k)
 Calculates the n-th coefficient of the legendre polynomial series.
template<unsigned l, unsigned k>
constexpr double MuonCalib::Legendre::polySum (const double x)
 Assembles the sum of the legendre monomials.
template<unsigned l, unsigned k, unsigned d>
constexpr double MuonCalib::Legendre::derivativeSum (const double x)
 Assembles the n-th derivative of the legendre polynomial.
constexpr double MuonCalib::Legendre::derivativeSum (const unsigned l, const unsigned d, const double x)
 Assembles the n-th derivative of a legendre polynomial at run time.
constexpr double MuonCalib::Legendre::polySum (const unsigned l, const double x)
 Assembles the legendre polynomial at run-time.
template<unsigned l>
constexpr double MuonCalib::Legendre::poly (const double x)
 Evaluates the n-th Legendre polynomial at x.
template<unsigned l, unsigned d>
constexpr double MuonCalib::Legendre::derivative (const double x)
 Evaluates the d-th derivative of the n-th Legendre polynomial at x.
constexpr double MuonCalib::legendrePoly (const unsigned l, const double x)
 Calculates the legendre polynomial of rank l at x.
constexpr double MuonCalib::legendreDeriv (const unsigned l, const unsigned d, const double x)
 Evaluates the n-th derivative of the l-th Legendre polynomial.

Macro Definition Documentation

◆ DERIVORDERSWITCH

#define DERIVORDERSWITCH ( l,
d,
x )
Value:
case d: { \
switch (l) { \
DERIVPOLYSWITICH(0, d, x) \
DERIVPOLYSWITICH(1, d, x) \
DERIVPOLYSWITICH(2, d, x) \
DERIVPOLYSWITICH(3, d, x) \
DERIVPOLYSWITICH(4, d, x) \
DERIVPOLYSWITICH(5, d, x) \
DERIVPOLYSWITICH(6, d, x) \
DERIVPOLYSWITICH(7, d, x) \
DERIVPOLYSWITICH(8, d, x) \
DERIVPOLYSWITICH(9, d, x) \
DERIVPOLYSWITICH(10, d, x) \
DERIVPOLYSWITICH(11, d, x) \
DERIVPOLYSWITICH(12, d, x) \
DERIVPOLYSWITICH(13, d, x) \
DERIVPOLYSWITICH(14, d, x) \
DERIVPOLYSWITICH(15, d, x) \
DERIVPOLYSWITICH(16, d, x) \
default: \
break; \
} \
break; \
}
#define x

Definition at line 21 of file LegendrePoly.h.

21#define DERIVORDERSWITCH(l, d, x) \
22 case d: { \
23 switch (l) { \
24 DERIVPOLYSWITICH(0, d, x) \
25 DERIVPOLYSWITICH(1, d, x) \
26 DERIVPOLYSWITICH(2, d, x) \
27 DERIVPOLYSWITICH(3, d, x) \
28 DERIVPOLYSWITICH(4, d, x) \
29 DERIVPOLYSWITICH(5, d, x) \
30 DERIVPOLYSWITICH(6, d, x) \
31 DERIVPOLYSWITICH(7, d, x) \
32 DERIVPOLYSWITICH(8, d, x) \
33 DERIVPOLYSWITICH(9, d, x) \
34 DERIVPOLYSWITICH(10, d, x) \
35 DERIVPOLYSWITICH(11, d, x) \
36 DERIVPOLYSWITICH(12, d, x) \
37 DERIVPOLYSWITICH(13, d, x) \
38 DERIVPOLYSWITICH(14, d, x) \
39 DERIVPOLYSWITICH(15, d, x) \
40 DERIVPOLYSWITICH(16, d, x) \
41 default: \
42 break; \
43 } \
44 break; \
45 }

◆ DERIVPOLYSWITICH

#define DERIVPOLYSWITICH ( l,
d,
x )
Value:
case l: { \
return Legendre::derivative<l,d>(x); \
break; \
} \

Definition at line 14 of file LegendrePoly.h.

14#define DERIVPOLYSWITICH(l, d, x) \
15 case l: { \
16 return Legendre::derivative<l,d>(x); \
17 break; \
18 } \
19

◆ POLYSWITCH

#define POLYSWITCH ( order,
x )
Value:
case order: { \
return Legendre::poly<order>(x); \
break; \
}

Definition at line 9 of file LegendrePoly.h.

9#define POLYSWITCH(order , x) \
10 case order: { \
11 return Legendre::poly<order>(x); \
12 break; \
13 }