FastSimulation
Utilities
interface
LandauFluctuationGenerator.h
Go to the documentation of this file.
1
#ifndef FastSimulation_Utilities_LandauFluctuationGenerator_H
2
#define FastSimulation_Utilities_LandauFluctuationGenerator_H
3
4
#include "
FastSimulation/Utilities/interface/BaseNumericalRandomGenerator.h
"
5
6
#include <cmath>
7
18
class
RandomEngineAndDistribution
;
19
20
class
LandauFluctuationGenerator
:
public
BaseNumericalRandomGenerator
{
21
public
:
23
LandauFluctuationGenerator
() :
BaseNumericalRandomGenerator
(-3.5, 25.) {
initialize
(); }
24
26
~LandauFluctuationGenerator
()
override
{}
27
29
double
landau
(
RandomEngineAndDistribution
const
* random)
const
{
return
generate
(random); }
30
32
double
function
(
double
x
)
override
{
return
ersatzt
(
x
); }
33
34
private
:
36
double
ersatzt
(
double
x
) {
return
std::exp
(-0.5 * (
x
+
std::exp
(-
x
))) /
std::sqrt
(2. *
M_PI
); }
37
};
38
#endif
LandauFluctuationGenerator::~LandauFluctuationGenerator
~LandauFluctuationGenerator() override
Default destructor.
Definition:
LandauFluctuationGenerator.h:26
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
LandauFluctuationGenerator::landau
double landau(RandomEngineAndDistribution const *random) const
Random generator of the dE/dX spread (Landau function)
Definition:
LandauFluctuationGenerator.h:29
M_PI
#define M_PI
Definition:
BXVectorInputProducer.cc:49
BaseNumericalRandomGenerator.h
LandauFluctuationGenerator::LandauFluctuationGenerator
LandauFluctuationGenerator()
Constructor : initialization of the Random Generator.
Definition:
LandauFluctuationGenerator.h:23
BaseNumericalRandomGenerator
Definition:
BaseNumericalRandomGenerator.h:27
JetChargeProducer_cfi.exp
exp
Definition:
JetChargeProducer_cfi.py:6
LandauFluctuationGenerator
Definition:
LandauFluctuationGenerator.h:20
RandomEngineAndDistribution
Definition:
RandomEngineAndDistribution.h:18
Generated for CMSSW Reference Manual by
1.8.16