Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:34

0001 // -*- C++ -*-
0002 // $Id: 
0003 //---------------------EllipticIntegral---------------------------------------//
0004 //                                                                            //
0005 //                                                                            //
0006 // Joe Boudreau, September 2001                                               //
0007 //                                                                            //
0008 //--------------------------------------------------------------------------  //
0009 #ifndef EllipticIntegral_h
0010 #define EllipticIntegral_h 1
0011 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0012 #include "CLHEP/GenericFunctions/Parameter.hh"
0013 
0014 namespace Genfun {
0015 namespace EllipticIntegral {
0016 
0017   class FirstKind : public AbsFunction  {
0018 
0019     FUNCTION_OBJECT_DEF(FirstKind)
0020 
0021       public:
0022 
0023     // Constructor:  
0024     FirstKind ();
0025 
0026     // Copy constructor
0027     FirstKind(const FirstKind &right);
0028   
0029     // Destructor
0030     virtual ~FirstKind();
0031   
0032     // Retreive function value
0033     virtual double operator ()(double argument) const override;
0034     virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0035   
0036     // Get the k-parameter.  Default value = 1.0.
0037     Parameter & k(); 
0038     const Parameter & k() const; 
0039 
0040   private:
0041 
0042     // It is illegal to assign an adjustable constant
0043     const FirstKind & operator=(const FirstKind &right);
0044 
0045     Parameter _k;    // the k parameter
0046   
0047   };
0048 
0049   class SecondKind : public AbsFunction  {
0050 
0051     FUNCTION_OBJECT_DEF(SecondKind)
0052 
0053       public:
0054 
0055     // Constructor:  
0056     SecondKind ();
0057 
0058     // Copy constructor
0059     SecondKind(const SecondKind &right);
0060   
0061     // Destructor
0062     virtual ~SecondKind();
0063   
0064     // Retreive function value
0065     virtual double operator ()(double argument) const override;
0066     virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0067   
0068     // Get the k-parameter.  Default value = 1.0.
0069     Parameter & k(); 
0070     const Parameter & k() const; 
0071 
0072   private:
0073 
0074     // It is illegal to assign an adjustable constant
0075     const SecondKind & operator=(const SecondKind &right);
0076 
0077     Parameter _k;    // the k parameter
0078   
0079   };
0080 
0081   class ThirdKind : public AbsFunction  {
0082 
0083     FUNCTION_OBJECT_DEF(ThirdKind)
0084 
0085       public:
0086 
0087     // Constructor:  
0088     ThirdKind ();
0089 
0090     // Copy constructor
0091     ThirdKind(const ThirdKind &right);
0092   
0093     // Destructor
0094     virtual ~ThirdKind();
0095   
0096     // Retreive function value
0097     virtual double operator ()(double argument) const override;
0098     virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0099   
0100     // Get the k-parameter.  Default value = 1.0.
0101     Parameter & k(); 
0102     const Parameter & k() const; 
0103 
0104     // Get the n-parameter.  Default value = 1.0.
0105     Parameter & n(); 
0106     const Parameter & n() const; 
0107 
0108   private:
0109 
0110     // It is illegal to assign an adjustable constant
0111     const ThirdKind & operator=(const ThirdKind &right);
0112 
0113     Parameter _k;    // the k parameter
0114     Parameter _n;    // the n parameter
0115   
0116   };
0117 
0118 } // end namespace EllipticIntegral 
0119 } // end namespace Genfun
0120 
0121 #include "CLHEP/GenericFunctions/EllipticIntegral.icc"
0122 #endif