CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

GammaNumericalGenerator Class Reference

#include <GammaNumericalGenerator.h>

Inheritance diagram for GammaNumericalGenerator:
BaseNumericalRandomGenerator

List of all members.

Public Member Functions

virtual double function (double x)
 The probability density function implementation.
double gamma () const
 Random generator.
double gamma_exp () const
double gamma_lin () const
 GammaNumericalGenerator (const RandomEngine *engine, double a=0, double b=0, double x1=0, double x2=0)
 Constructor : initialization of the Random Generator.
bool isValid () const
virtual ~GammaNumericalGenerator ()
 Default destructor.

Private Member Functions

double ersatzt (double x)
 Gamma Function.

Private Attributes

double a_
double b_
bool valid

Detailed Description

Definition at line 12 of file GammaNumericalGenerator.h.


Constructor & Destructor Documentation

GammaNumericalGenerator::GammaNumericalGenerator ( const RandomEngine engine,
double  a = 0,
double  b = 0,
double  x1 = 0,
double  x2 = 0 
) [inline]

Constructor : initialization of the Random Generator.

Definition at line 17 of file GammaNumericalGenerator.h.

References a, b, BaseNumericalRandomGenerator::initialize(), and valid.

                                                                          : 
     BaseNumericalRandomGenerator(engine,x1,x2,1000),
     a_(a),b_(b),valid(false) {

    if(a>0&&b>0) 
      {
        valid=true;
        initialize();
      }
  }
virtual GammaNumericalGenerator::~GammaNumericalGenerator ( ) [inline, virtual]

Default destructor.

Definition at line 30 of file GammaNumericalGenerator.h.

{}

Member Function Documentation

double GammaNumericalGenerator::ersatzt ( double  x) [inline, private]

Gamma Function.

Definition at line 47 of file GammaNumericalGenerator.h.

References a_, b_, funct::exp(), funct::pow(), and ExpressReco_HICollisions_FallBack::x.

Referenced by function().

                           { 
    double bt=b_*x;
    return  b_*pow(bt,a_-1)*exp(-bt);
  }
virtual double GammaNumericalGenerator::function ( double  x) [inline, virtual]

The probability density function implementation.

Implements BaseNumericalRandomGenerator.

Definition at line 40 of file GammaNumericalGenerator.h.

References ersatzt().

{ return ersatzt(x); }
double GammaNumericalGenerator::gamma ( ) const [inline]

Random generator.

Definition at line 33 of file GammaNumericalGenerator.h.

References BaseNumericalRandomGenerator::generate().

{ return generate(); }
double GammaNumericalGenerator::gamma_exp ( ) const [inline]

Definition at line 35 of file GammaNumericalGenerator.h.

References BaseNumericalRandomGenerator::generateExp().

{return generateExp();}
double GammaNumericalGenerator::gamma_lin ( ) const [inline]

Definition at line 37 of file GammaNumericalGenerator.h.

References BaseNumericalRandomGenerator::generateLin().

{return generateLin();}
bool GammaNumericalGenerator::isValid ( void  ) const [inline]

Definition at line 42 of file GammaNumericalGenerator.h.

References valid.

{return valid;}

Member Data Documentation

double GammaNumericalGenerator::a_ [private]

Definition at line 53 of file GammaNumericalGenerator.h.

Referenced by ersatzt().

double GammaNumericalGenerator::b_ [private]

Definition at line 53 of file GammaNumericalGenerator.h.

Referenced by ersatzt().

Definition at line 54 of file GammaNumericalGenerator.h.

Referenced by GammaNumericalGenerator(), and isValid().