CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
LandauFluctuationGenerator Class Reference

#include <LandauFluctuationGenerator.h>

Inheritance diagram for LandauFluctuationGenerator:
BaseNumericalRandomGenerator

Public Member Functions

virtual double function (double x)
 The probability density function implementation. More...
 
double landau () const
 Random generator of the dE/dX spread (Landau function) More...
 
 LandauFluctuationGenerator (const RandomEngine *engine)
 Constructor : initialization of the Random Generator. More...
 
virtual ~LandauFluctuationGenerator ()
 Default destructor. More...
 
- Public Member Functions inherited from BaseNumericalRandomGenerator
 BaseNumericalRandomGenerator (const RandomEngine *engine, double xmin=0., double xmax=1., int n=1000, int iter=6)
 
double generate () const
 The random generation according to function() More...
 
double generateExp () const
 
double generateLin () const
 
void initialize ()
 The initialization (numerical integarion, inversion) More...
 
bool setSubInterval (double x1, double x2)
 To shoot in a given interval. More...
 
virtual ~BaseNumericalRandomGenerator ()
 Default destructor. More...
 

Private Member Functions

double ersatzt (double x)
 Ersatzt for Landau Fluctuations (very good approximation) More...
 

Additional Inherited Members

- Protected Attributes inherited from BaseNumericalRandomGenerator
double deltar
 
std::vector< double > f
 
int iter
 
int n
 
const RandomEnginerandom
 
double rmin
 
std::vector< double > sampling
 
double xmax
 
double xmin
 

Detailed Description

Definition at line 20 of file LandauFluctuationGenerator.h.

Constructor & Destructor Documentation

LandauFluctuationGenerator::LandauFluctuationGenerator ( const RandomEngine engine)
inline

Constructor : initialization of the Random Generator.

Definition at line 25 of file LandauFluctuationGenerator.h.

References BaseNumericalRandomGenerator::initialize().

25  :
26  BaseNumericalRandomGenerator(engine,-3.5,25.) {
27  initialize();
28  }
void initialize()
The initialization (numerical integarion, inversion)
BaseNumericalRandomGenerator(const RandomEngine *engine, double xmin=0., double xmax=1., int n=1000, int iter=6)
virtual LandauFluctuationGenerator::~LandauFluctuationGenerator ( )
inlinevirtual

Default destructor.

Definition at line 31 of file LandauFluctuationGenerator.h.

31 {}

Member Function Documentation

double LandauFluctuationGenerator::ersatzt ( double  x)
inlineprivate

Ersatzt for Landau Fluctuations (very good approximation)

Definition at line 42 of file LandauFluctuationGenerator.h.

References create_public_lumi_plots::exp, M_PI, and mathSSE::sqrt().

Referenced by function().

42  {
43  return std::exp(-0.5 * ( x + std::exp(-x) )) / std::sqrt (2. *M_PI);
44  }
T sqrt(T t)
Definition: SSEVec.h:46
#define M_PI
Definition: BFit3D.cc:3
x
Definition: VDTMath.h:216
virtual double LandauFluctuationGenerator::function ( double  x)
inlinevirtual

The probability density function implementation.

Implements BaseNumericalRandomGenerator.

Definition at line 37 of file LandauFluctuationGenerator.h.

References ersatzt(), and vdt::x.

37 { return ersatzt(x); }
double ersatzt(double x)
Ersatzt for Landau Fluctuations (very good approximation)
x
Definition: VDTMath.h:216
double LandauFluctuationGenerator::landau ( ) const
inline

Random generator of the dE/dX spread (Landau function)

Definition at line 34 of file LandauFluctuationGenerator.h.

References BaseNumericalRandomGenerator::generate().

Referenced by PreshowerHitMaker::addHit(), and EnergyLossSimulator::compute().

34 { return generate(); }
double generate() const
The random generation according to function()