Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Poisson.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Poisson.cc
1
// Some documentation //
2
3
#include "
Poisson.h
"
4
5
using namespace
std;
6
7
8
long
double
9
Poisson::poisson_prob
(
double
mean
,
int
value
){
10
11
double
prob = exp1( mean, value ) * exp2(mean) / fact(value);
12
return
prob;
13
14
}
15
16
long
double
17
Poisson::exp1
(
double
mean
,
int
value
){
18
19
long
double
output
= pow( mean, value );
20
return
output
;
21
22
}
23
24
long
double
25
Poisson::exp2
(
double
mean
){
26
27
long
double
output
= pow( 2.718, -1*mean );
28
return
output
;
29
30
}
31
32
long
double
33
Poisson::fact
(
int
value
){
34
35
long
double
output
= 1;
36
37
for
(
int
i
= 1;
i
<=
value
; ++
i
)
38
output *=
i
;
39
40
return
output
;
41
42
}
analysis
blob
master
ParticleID
RICHAnalysis
Poisson.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:54
using
1.8.2 with
sPHENIX GitHub integration