CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

GammaDistribution.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: 
00003 //---------------------GammaDistribution------------------------------------//
00004 //                                                                          //
00005 // Class Gamma, x^a * e(-x/b) / (b^(a+1) Gamma(Alpha+1));                   //
00006 // Joe Boudreau, Jan 2007                                                   //
00007 //                                                                          //
00008 //--------------------------------------------------------------------------//
00009 #ifndef GammaDistribution_h
00010 #define GammaDistribution_h 1
00011 #include "CLHEP/GenericFunctions/AbsFunction.hh"
00012 #include "CLHEP/GenericFunctions/Parameter.hh"
00013 #include "CLHEP/GenericFunctions/LogGamma.hh"
00014 #define _GAMMADISTRIBUTION_REVISED_ 1
00015 namespace Genfun {
00016 
00021   class GammaDistribution : public AbsFunction  {
00022     
00023     FUNCTION_OBJECT_DEF(GammaDistribution)
00024       
00025       public:
00026     
00027     // Constructor
00028     GammaDistribution();
00029     
00030     // Copy constructor
00031     GammaDistribution(const GammaDistribution &right);
00032     
00033     // Destructor
00034     virtual ~GammaDistribution();
00035     
00036     // Retreive function value
00037     virtual double operator ()(double argument) const;
00038     virtual double operator ()(const Argument & a) const {return operator() (a[0]);}
00039     
00040     // Get the paramter alpha
00041     Parameter & alpha(); 
00042 
00043     // Get the paramter alpha
00044     Parameter & beta(); 
00045     
00046   private:
00047     
00048     // It is illegal to assign an adjustable constant
00049     const GammaDistribution & operator=(const GammaDistribution &right);
00050     
00051     // Here are the two parameters alpha and beta:
00052 
00053     Parameter _alpha;
00054     Parameter _beta;
00055 
00056 
00057     // This function has a LogGamma Function;
00058     LogGamma _logGamma;
00059 
00060     
00061   };
00062 } // namespace Genfun
00063 #endif

Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7