CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LandauFluctuationGenerator.h
Go to the documentation of this file.
1 #ifndef FastSimulation_Utilities_LandauFluctuationGenerator_H
2 #define FastSimulation_Utilities_LandauFluctuationGenerator_H
3 
5 
6 #include <cmath>
7 
18 class RandomEngine;
19 
21 {
22  public:
23 
26  BaseNumericalRandomGenerator(engine,-3.5,25.) {
27  initialize();
28  }
29 
32 
34  double landau() const { return generate(); }
35 
37  virtual double function(double x) { return ersatzt(x); }
38 
39  private:
40 
42  double ersatzt(double x) {
43  return std::exp(-0.5 * ( x + std::exp(-x) )) / std::sqrt (2. *M_PI);
44  }
45 };
46 #endif
void initialize()
The initialization (numerical integarion, inversion)
LandauFluctuationGenerator(const RandomEngine *engine)
Constructor : initialization of the Random Generator.
double landau() const
Random generator of the dE/dX spread (Landau function)
double ersatzt(double x)
Ersatzt for Landau Fluctuations (very good approximation)
T sqrt(T t)
Definition: SSEVec.h:46
double generate() const
The random generation according to function()
virtual ~LandauFluctuationGenerator()
Default destructor.
#define M_PI
Definition: BFit3D.cc:3
x
Definition: VDTMath.h:216