CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
LandauFluctuationGenerator Class Reference

#include <LandauFluctuationGenerator.h>

Inheritance diagram for LandauFluctuationGenerator:
BaseNumericalRandomGenerator

Public Member Functions

double function (double x) override
 The probability density function implementation. More...
 
double landau (RandomEngineAndDistribution const *random) const
 Random generator of the dE/dX spread (Landau function) More...
 
 LandauFluctuationGenerator ()
 Constructor : initialization of the Random Generator. More...
 
 ~LandauFluctuationGenerator () override
 Default destructor. More...
 
- Public Member Functions inherited from BaseNumericalRandomGenerator
 BaseNumericalRandomGenerator (double xmin=0., double xmax=1., int n=1000, int iter=6)
 
double generate (RandomEngineAndDistribution const *) const
 The random generation according to function() More...
 
double generateExp (RandomEngineAndDistribution const *) const
 
double generateLin (RandomEngineAndDistribution const *) 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
 
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::LandauFluctuationGenerator ( )
inline

Constructor : initialization of the Random Generator.

Definition at line 23 of file LandauFluctuationGenerator.h.

23 : BaseNumericalRandomGenerator(-3.5, 25.) { initialize(); }

References BaseNumericalRandomGenerator::initialize().

◆ ~LandauFluctuationGenerator()

LandauFluctuationGenerator::~LandauFluctuationGenerator ( )
inlineoverride

Default destructor.

Definition at line 26 of file LandauFluctuationGenerator.h.

26 {}

Member Function Documentation

◆ ersatzt()

double LandauFluctuationGenerator::ersatzt ( double  x)
inlineprivate

Ersatzt for Landau Fluctuations (very good approximation)

Definition at line 36 of file LandauFluctuationGenerator.h.

36 { return std::exp(-0.5 * (x + std::exp(-x))) / std::sqrt(2. * M_PI); }

References JetChargeProducer_cfi::exp, M_PI, mathSSE::sqrt(), and x.

Referenced by function().

◆ function()

double LandauFluctuationGenerator::function ( double  x)
inlineoverridevirtual

The probability density function implementation.

Implements BaseNumericalRandomGenerator.

Definition at line 32 of file LandauFluctuationGenerator.h.

32 { return ersatzt(x); }

References ersatzt(), and x.

◆ landau()

double LandauFluctuationGenerator::landau ( RandomEngineAndDistribution const *  random) const
inline

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

Definition at line 29 of file LandauFluctuationGenerator.h.

29 { return generate(random); }

References BaseNumericalRandomGenerator::generate().

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

DDAxes::x
LandauFluctuationGenerator::ersatzt
double ersatzt(double x)
Ersatzt for Landau Fluctuations (very good approximation)
Definition: LandauFluctuationGenerator.h:36
BaseNumericalRandomGenerator::initialize
void initialize()
The initialization (numerical integarion, inversion)
Definition: BaseNumericalRandomGenerator.cc:13
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
BaseNumericalRandomGenerator::generate
double generate(RandomEngineAndDistribution const *) const
The random generation according to function()
Definition: BaseNumericalRandomGenerator.cc:75
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
BaseNumericalRandomGenerator::BaseNumericalRandomGenerator
BaseNumericalRandomGenerator(double xmin=0., double xmax=1., int n=1000, int iter=6)
Definition: BaseNumericalRandomGenerator.cc:7
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6