CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Bessel.hh
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: Bessel.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
3//---------------------Bessel-------------------------------------------------//
4// //
5// Class Bessel, providing Bessel Functions The Namespace "FractionalORder" //
6// and "Integral order" are nested here, so that you fully specify the class //
7// like this: //
8// //
9// Genfun::FractionalOrder::Bessel //
10// //
11// or //
12// //
13// Genfun::IntegralOrder::Bessel //
14// //
15// //
16// Joe Boudreau, April 2001 //
17// //
18//-------------------------------------------------------------------------- //
19#ifndef Bessel_h
20#define Bessel_h 1
21#include "CLHEP/GenericFunctions/AbsFunction.hh"
22#include "CLHEP/GenericFunctions/Parameter.hh"
23namespace Genfun {
24
25namespace FractionalOrder {
26 /**
27 * @author
28 * @ingroup genfun
29 */
30 class Bessel : public AbsFunction {
31
33
34 public:
35
36 // Enumerated type:
37 enum Type {J, Y};
38
39 // Constructor: Use this one and you will get a Bessel function of
40 // integer order
41 Bessel (Type type);
42
43 // Copy constructor
44 Bessel(const Bessel &right);
45
46 // Destructor
47 virtual ~Bessel();
48
49 // Retreive function value
50 virtual double operator ()(double argument) const override;
51 virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
52
53 // Get the order of the Bessel Function. Default value, 0.0. If modified the
54 // Bessel function
56 const Parameter & order() const;
57
58 private:
59
60 // It is illegal to assign an adjustable constant
61 const Bessel & operator=(const Bessel &right);
62
63 // The type and order of the Bessel function
64 Type _type;
65 Parameter _order; // the fractional order:
66
67 };
68} // namespace FractionalOrder
69
70namespace IntegralOrder {
71 /**
72 * @author
73 * @ingroup genfun
74 */
75 class Bessel : public AbsFunction {
76
78
79 public:
80
81 // Enumerated type:
82 enum Type {J, Y};
83
84 // Constructor: Use this one and you will get a Bessel function of
85 // integer order
86 Bessel (Type type, unsigned int order);
87
88 // Copy constructor
89 Bessel(const Bessel &right);
90
91 // Destructor
92 virtual ~Bessel();
93
94 // Retreive function value
95 virtual double operator ()(double argument) const override;
96 virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
97
98 private:
99
100 // It is illegal to assign an adjustable constant
101 const Bessel & operator=(const Bessel &right);
102
103 // The type and order of the Bessel function
104 Type _type;
105 unsigned int _order;
106
107 double _bessel_IJ_taylor(double nu,
108 double x,
109 int sign,
110 int kmax,
111 double threshhold) const;
112
113 };
114} // namespace IntegralOrder
115
116} // namespace Genfun
117
118
119#include "CLHEP/GenericFunctions/Bessel.icc"
120#endif
#define FUNCTION_OBJECT_DEF(classname)
Definition: AbsFunction.hh:143
Bessel(const Bessel &right)
virtual double operator()(double argument) const override
const Parameter & order() const
Bessel(const Bessel &right)
virtual double operator()(double argument) const override
Bessel(Type type, unsigned int order)
Definition: Abs.hh:14