3 @brief Declaration of Bessel functions */
9 /** @defgroup z_bessel Bessel utility functions.
10 @brief This group contains a number of functions to calculate
11 the modified Bessel function of the first kind @f$
12 I_{\nu}(x)@f$ for integer and half-integer values of @f$
13 \nu@f$, of any real number @f$ x@f$.
15 The main entry of these functions is the function Inu, which
16 in turn call I01, Iwhole, or Ihalf. Inu always returns a list
17 of the function values for the specified values of @f$ \nu@f$.
19 The convinience functions I and DiffI returns a single value
20 of @f$ I_{\nu}(x)@f$ or @f$ dI_{\nu}(x)/dx@f$ for a specified
23 @example test_bessel.cxx */
25 /** Namespace for Bessel functions
27 namespace AliFMDFlowBessel
31 /** Compute the modified Bessel functions
33 I_0(x) = \sum_{k=1}^\infty\frac{\left(\frac{x^2}{4}\right)^k}{(k!)^2}
35 and @f$ I_1(x)@f$, and their first derivatives
36 @param x Argument @f$ x@f$
37 @param bi0 On return, @f$ I_0(x)@f$
38 @param di0 On return, @f$ I_0'(x)@f$
39 @param bi1 On return, @f$ I_1(x)@f$
40 @param di1 On return, @f$ I_1'(x)@f$
43 Double_t& bi0, Double_t& di0, Double_t& bi1, Double_t& di1);
45 /** Compute the modified Bessel functions @f$ I_{n/2}(x)@f$ and their
49 @param bi On output, @f$ I_{1/2}(x), \ldots, I_{n/2}(x)@f$ for
50 @f$ n > 0@f$ and @f$ I_{-n/2}(x), \ldots, I_{-1/2}(x)@f$ for
52 @param di On output, @f$ I_{1/2}'(x), \ldots, I_{n/2}'(x)@f$ for
53 @f$ n > 0@f$ and @f$ I_{-n/2}'(x), \ldots, I_{-1/2}'(x)@f$ for
55 @return number of valid entries in @a bi and @a di */
56 UInt_t Ihalf(Int_t n, Double_t x, Double_t* bi, Double_t* di);
57 /** Compute the modified Bessel functions @f$ I_n(x)@f$ and their
58 derivatives. Note, that @f$ I_{-n}(x) = I_n(x)@f$ and
59 @f$ dI_{-n}(x)/dx = dI_{n}(x)/dx@f$ so this function can be used
60 to evaluate @f$ I_n \forall n \in \mathcal{Z}@f$
63 @param bi On output, @f$ I_0(x), \ldots, I_{mn}(x)@f$
64 @param di On output, @f$ I_0'(x), \ldots, I_{mn}'(x)@f$
65 @return number of valid entries in @a bi and @a di */
66 UInt_t Iwhole(UInt_t n, Double_t x, Double_t* bi, Double_t* di);
68 /** Compute the modified Bessel functions @f$ I_{\nu}(x)@f$ and
69 their derivatives for @f$ \nu = n_1, n_1+1, \ldots, n_2@f$ for
70 and integer @f$ n_1, n_2@f$ or any half-integer @f$ n_1,
75 @param bi On output, @f$ I_{n_1}(x), \ldots, I_{n_2}(x)@f$
76 @param di On output, @f$ I_{n_1}'(x), \ldots, I_{n_2}'(x)@f$
77 @return number of valid entries in @a bi and @a di */
78 UInt_t Inu(Double_t n1, Double_t n2, Double_t x, Double_t* bi, Double_t* di);
80 /** Compute the modified Bessel function of the first kind
82 I_n(x) = \left(\frac{x}{2}\right)^n
83 \sum_{k=0}^\infty\frac{\left(\frac{x^2}{4}\right)^k}
86 for arbirary integer order @f$ n@f$
89 @return @f$ I_n(x)@f$ */
90 Double_t I(Double_t n, Double_t x);
92 /** Compute the derivative of the modified Bessel function of the
95 \frac{dI_n(x)}{dx} = I_{n-1}(x) - \frac{n}{x} I_{n}(x)
97 for arbirary integer order @f$ n@f$
100 @return @f$ \frac{dI_n(x)}{dx}@f$ */
101 Double_t DiffI(Double_t n, Double_t x);