CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
IncompleteGamma.hh
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: IncompleteGamma.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
3//---------------------IncompleteGamma--------------------------------------//
4// //
5// Class IncompleteGamma, the incomplete Gamma function //
6// Joe Boudreau, October 2000 //
7// //
8//--------------------------------------------------------------------------//
9#ifndef IncompleteGamma_h
10#define IncompleteGamma_h 1
11#include "CLHEP/GenericFunctions/AbsFunction.hh"
12#include "CLHEP/GenericFunctions/Parameter.hh"
13#include "CLHEP/GenericFunctions/LogGamma.hh"
14namespace Genfun {
15
16 /**
17 * @author
18 * @ingroup genfun
19 */
21
23
24 public:
25
26 // Constructor
28
29 // Copy constructor
30 IncompleteGamma(const IncompleteGamma &right);
31
32 // Destructor
33 virtual ~IncompleteGamma();
34
35 // Retreive function value
36 virtual double operator ()(double argument) const override;
37 virtual double operator ()(const Argument & arg) const override {return operator() (arg[0]);}
38
39 // Get the paramter a
40 Parameter & a();
41
42 private:
43
44 // It is illegal to assign an adjustable constant
45 const IncompleteGamma & operator=(const IncompleteGamma &right);
46
47 // Here is the parameter of the Incomplete Gamma Function
48 Parameter _a;
49
50 // Compute via series representation:
51 double _gamser(double a, double x, double logGamma) const;
52
53 // Compute via continued fraction representation:
54 double _gammcf(double a, double x, double logGamma) const;
55
56 // This function has a LogGamma Function;
57 LogGamma _logGamma;
58
59 static const int ITMAX;
60 static const double EPS;
61 static const double FPMIN;
62
63 };
64} // namespace Genfun
65#endif
#define FUNCTION_OBJECT_DEF(classname)
Definition: AbsFunction.hh:143
virtual double operator()(double argument) const override
Definition: Abs.hh:14