Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
FastSimulation
Utilities
interface
GammaNumericalGenerator.h
Go to the documentation of this file.
1
#ifndef GammaNumericalGenerator_H
2
#define GammaNumericalGenerator_H
3
#include "
FastSimulation/Utilities/interface/BaseNumericalRandomGenerator.h
"
4
5
#include <cmath>
10
class
RandomEngineAndDistribution
;
11
12
class
GammaNumericalGenerator
:
public
BaseNumericalRandomGenerator
{
13
public
:
15
GammaNumericalGenerator
(
double
a
= 0,
double
b
= 0,
double
x1
= 0,
double
x2
= 0)
16
:
BaseNumericalRandomGenerator
(
x1
,
x2
, 1000),
a_
(
a
),
b_
(
b
),
valid
(
false
) {
17
if
(
a
> 0 &&
b
> 0) {
18
valid
=
true
;
19
initialize
();
20
}
21
}
22
24
~GammaNumericalGenerator
()
override
{}
25
27
double
gamma
(
RandomEngineAndDistribution
const
* random)
const
{
return
generate
(random); }
28
29
double
gamma_exp
(
RandomEngineAndDistribution
const
* random)
const
{
return
generateExp
(random); }
30
31
double
gamma_lin
(
RandomEngineAndDistribution
const
* random)
const
{
return
generateLin
(random); }
32
34
double
function
(
double
x
)
override
{
return
ersatzt
(
x
); }
35
36
inline
bool
isValid
()
const
{
return
valid
; }
37
38
private
:
40
double
ersatzt
(
double
x
) {
41
double
bt =
b_
*
x
;
42
return
b_
*
pow
(bt,
a_
- 1) *
exp
(-bt);
43
}
44
45
// gamma distribution parameters
46
double
a_
,
b_
;
47
bool
valid
;
48
};
49
50
#endif
funct::false
false
Definition:
Factorize.h:34
BaseNumericalRandomGenerator::generateExp
double generateExp(RandomEngineAndDistribution const *) const
Definition:
BaseNumericalRandomGenerator.cc:83
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition:
testProducerWithPsetDescEmpty_cfi.py:28
BaseNumericalRandomGenerator::generateLin
double generateLin(RandomEngineAndDistribution const *) const
Definition:
BaseNumericalRandomGenerator.cc:98
GammaNumericalGenerator::a_
double a_
Definition:
GammaNumericalGenerator.h:46
GammaNumericalGenerator::gamma_exp
double gamma_exp(RandomEngineAndDistribution const *random) const
Definition:
GammaNumericalGenerator.h:29
GammaNumericalGenerator::isValid
bool isValid() const
Definition:
GammaNumericalGenerator.h:36
DDAxes::x
GammaNumericalGenerator::b_
double b_
Definition:
GammaNumericalGenerator.h:46
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition:
testProducerWithPsetDescEmpty_cfi.py:33
BaseNumericalRandomGenerator::initialize
void initialize()
The initialization (numerical integarion, inversion)
Definition:
BaseNumericalRandomGenerator.cc:13
GammaNumericalGenerator::GammaNumericalGenerator
GammaNumericalGenerator(double a=0, double b=0, double x1=0, double x2=0)
Constructor : initialization of the Random Generator.
Definition:
GammaNumericalGenerator.h:15
BaseNumericalRandomGenerator::generate
double generate(RandomEngineAndDistribution const *) const
The random generation according to function()
Definition:
BaseNumericalRandomGenerator.cc:75
GammaNumericalGenerator::gamma_lin
double gamma_lin(RandomEngineAndDistribution const *random) const
Definition:
GammaNumericalGenerator.h:31
b
double b
Definition:
hdecay.h:118
GammaNumericalGenerator::gamma
double gamma(RandomEngineAndDistribution const *random) const
Random generator.
Definition:
GammaNumericalGenerator.h:27
GammaNumericalGenerator
Definition:
GammaNumericalGenerator.h:12
a
double a
Definition:
hdecay.h:119
BaseNumericalRandomGenerator.h
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition:
Power.h:30
BaseNumericalRandomGenerator
Definition:
BaseNumericalRandomGenerator.h:27
GammaNumericalGenerator::ersatzt
double ersatzt(double x)
Gamma Function.
Definition:
GammaNumericalGenerator.h:40
JetChargeProducer_cfi.exp
exp
Definition:
JetChargeProducer_cfi.py:6
GammaNumericalGenerator::valid
bool valid
Definition:
GammaNumericalGenerator.h:47
GammaNumericalGenerator::~GammaNumericalGenerator
~GammaNumericalGenerator() override
Default destructor.
Definition:
GammaNumericalGenerator.h:24
RandomEngineAndDistribution
Definition:
RandomEngineAndDistribution.h:18
Generated for CMSSW Reference Manual by
1.8.16