BhlumiRandom Class Reference

#include <BhlumiRandom.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 BhlumiRandom.h.


Member Function Documentation

double BhlumiRandom::Flat (  )  [static]

Definition at line 41 of file BhlumiRandom.cxx.

References random().

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

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

Definition at line 35 of file BhlumiRandom.cxx.

References random().

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

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

Definition at line 25 of file BhlumiRandom.cxx.

References random().

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

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

Definition at line 47 of file BhlumiRandom.cxx.

References _randomEngine.

Referenced by carran_(), ecuran_(), and marran_().

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

double BhlumiRandom::random (  )  [static]

Definition at line 14 of file BhlumiRandom.cxx.

References _randomEngine.

Referenced by Flat(), and ranmarr_().

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

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

Definition at line 10 of file BhlumiRandom.cxx.

References _randomEngine.

Referenced by Bhlumi::initialize().

00010                                                                     {
00011   _randomEngine=randomEngine;
00012 }


Member Data Documentation

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

Definition at line 31 of file BhlumiRandom.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