BhwideRandom Class Reference

#include <BhwideRandom.h>

List of all members.

Static Public Member Functions

static double Flat (double min, double max)
static double Flat (double max)
static double Flat ()
static void FlatArray (double *vect, const int size)
static double random ()
static void setRandomEngine (CLHEP::HepRandomEngine *randomEngine)

Static Private Attributes

static CLHEP::HepRandomEngine * _randomEngine = 0


Detailed Description

Definition at line 13 of file BhwideRandom.h.


Member Function Documentation

double BhwideRandom::Flat (  )  [static]

Definition at line 41 of file BhwideRandom.cxx.

References random().

00041                          {
00042 
00043   return BhwideRandom::random();
00044 
00045  } 

double BhwideRandom::Flat ( double  max  )  [static]

Definition at line 35 of file BhwideRandom.cxx.

References random().

00035                                    {
00036 
00037   return max*BhwideRandom::random();
00038 
00039 } 

double BhwideRandom::Flat ( double  min,
double  max 
) [static]

Definition at line 25 of file BhwideRandom.cxx.

References random().

00025                                                 {
00026 
00027   if ( min > max ) {
00028     cerr<< "min>max in BhwideRandom::Flat(" << min << "," << max << ")" <<endl;
00029   }
00030 
00031   return BhwideRandom::random()*( max - min )+min;
00032 
00033 } 

void BhwideRandom::FlatArray ( double *  vect,
const int  size 
) [static]

Definition at line 47 of file BhwideRandom.cxx.

References _randomEngine.

00047                                                         {
00048   if(_randomEngine == 0) cout<<"Can not get randomEngine pointer in BhwideRandom::FlatArray"<<endl;
00049   else _randomEngine->flatArray(size,vect);
00050 }

double BhwideRandom::random (  )  [static]

Definition at line 14 of file BhwideRandom.cxx.

References _randomEngine.

Referenced by Flat().

00014                            {
00015 
00016   if (_randomEngine==0){
00017     cerr <<"No random engine available in "
00018                            <<"BhwideRandom::random()."<<endl;
00019   }
00020     return _randomEngine->flat();
00021   }

void BhwideRandom::setRandomEngine ( CLHEP::HepRandomEngine *  randomEngine  )  [static]

Definition at line 10 of file BhwideRandom.cxx.

References _randomEngine.

Referenced by Bhwide::initialize().

00010                                                                     {
00011   _randomEngine=randomEngine;
00012 }


Member Data Documentation

HepRandomEngine * BhwideRandom::_randomEngine = 0 [static, private]

Definition at line 31 of file BhwideRandom.h.

Referenced by FlatArray(), random(), and setRandomEngine().


Generated on Tue Nov 29 23:17:55 2016 for BOSS_7.0.2 by  doxygen 1.4.7