Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 // $Id: 
0003 //---------------------BetaDistribution-------------------------------------//
0004 //                                                                          //
0005 // Class Beta, x^(a-1)(1-x)^beta-1 Gamma(a+b)/Gamma(a)/Gamma(b);            //
0006 // Joe Boudreau, Jan 2007                                                   //
0007 //                                                                          //
0008 //--------------------------------------------------------------------------//
0009 #ifndef BetaDistribution_h
0010 #define BetaDistribution_h 1
0011 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0012 #include "CLHEP/GenericFunctions/Parameter.hh"
0013 #include "CLHEP/GenericFunctions/LogGamma.hh"
0014 #define _BETADISTRIBUTION_REVISED_ 1
0015 namespace Genfun {
0016 
0017   /**
0018    * @author
0019    * @ingroup genfun
0020    */
0021   class BetaDistribution : public AbsFunction  {
0022     
0023     FUNCTION_OBJECT_DEF(BetaDistribution)
0024       
0025       public:
0026     
0027     // Constructor
0028     BetaDistribution();
0029     
0030     // Copy constructor
0031     BetaDistribution(const BetaDistribution &right);
0032     
0033     // Destructor
0034     virtual ~BetaDistribution();
0035     
0036     // Retreive function value
0037     virtual double operator ()(double argument) const override;
0038     virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0039     
0040     // Get the paramter alpha
0041     Parameter & alpha(); 
0042 
0043     // Get the paramter alpha
0044     Parameter & beta(); 
0045     
0046   private:
0047     
0048     // It is illegal to assign an adjustable constant
0049     const BetaDistribution & operator=(const BetaDistribution &right);
0050     
0051     // Here are the two parameters alpha and beta:
0052 
0053     Parameter _alpha;
0054     Parameter _beta;
0055 
0056 
0057     // This function has a LogGamma Function;
0058     LogGamma _logGamma;
0059 
0060     
0061   };
0062 } // namespace Genfun
0063 #endif