CLHEP 2.0.4.7 Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: 00003 //---------------------EllipticIntegral---------------------------------------// 00004 // // 00005 // // 00006 // Joe Boudreau, September 2001 // 00007 // // 00008 //-------------------------------------------------------------------------- // 00009 #ifndef EllipticIntegral_h 00010 #define EllipticIntegral_h 1 00011 #include "CLHEP/GenericFunctions/AbsFunction.hh" 00012 #include "CLHEP/GenericFunctions/Parameter.hh" 00013 00014 namespace Genfun { 00015 namespace EllipticIntegral { 00016 00017 class FirstKind : public AbsFunction { 00018 00019 FUNCTION_OBJECT_DEF(FirstKind) 00020 00021 public: 00022 00023 // Constructor: 00024 FirstKind (); 00025 00026 // Copy constructor 00027 FirstKind(const FirstKind &right); 00028 00029 // Destructor 00030 virtual ~FirstKind(); 00031 00032 // Retreive function value 00033 virtual double operator ()(double argument) const; 00034 virtual double operator ()(const Argument & a) const {return operator() (a[0]);} 00035 00036 // Get the k-parameter. Default value = 1.0. 00037 Parameter & k(); 00038 const Parameter & k() const; 00039 00040 private: 00041 00042 // It is illegal to assign an adjustable constant 00043 const FirstKind & operator=(const FirstKind &right); 00044 00045 Parameter _k; // the k parameter 00046 00047 }; 00048 00049 class SecondKind : public AbsFunction { 00050 00051 FUNCTION_OBJECT_DEF(SecondKind) 00052 00053 public: 00054 00055 // Constructor: 00056 SecondKind (); 00057 00058 // Copy constructor 00059 SecondKind(const SecondKind &right); 00060 00061 // Destructor 00062 virtual ~SecondKind(); 00063 00064 // Retreive function value 00065 virtual double operator ()(double argument) const; 00066 virtual double operator ()(const Argument & a) const {return operator() (a[0]);} 00067 00068 // Get the k-parameter. Default value = 1.0. 00069 Parameter & k(); 00070 const Parameter & k() const; 00071 00072 private: 00073 00074 // It is illegal to assign an adjustable constant 00075 const SecondKind & operator=(const SecondKind &right); 00076 00077 Parameter _k; // the k parameter 00078 00079 }; 00080 00081 class ThirdKind : public AbsFunction { 00082 00083 FUNCTION_OBJECT_DEF(ThirdKind) 00084 00085 public: 00086 00087 // Constructor: 00088 ThirdKind (); 00089 00090 // Copy constructor 00091 ThirdKind(const ThirdKind &right); 00092 00093 // Destructor 00094 virtual ~ThirdKind(); 00095 00096 // Retreive function value 00097 virtual double operator ()(double argument) const; 00098 virtual double operator ()(const Argument & a) const {return operator() (a[0]);} 00099 00100 // Get the k-parameter. Default value = 1.0. 00101 Parameter & k(); 00102 const Parameter & k() const; 00103 00104 // Get the n-parameter. Default value = 1.0. 00105 Parameter & n(); 00106 const Parameter & n() const; 00107 00108 private: 00109 00110 // It is illegal to assign an adjustable constant 00111 const ThirdKind & operator=(const ThirdKind &right); 00112 00113 Parameter _k; // the k parameter 00114 Parameter _n; // the n parameter 00115 00116 }; 00117 00118 } // end namespace EllipticIntegral 00119 } // end namespace Genfun 00120 00121 #include "CLHEP/GenericFunctions/EllipticIntegral.icc" 00122 #endif