Go to the source code of this file.
|
long | pois (double AMU, int &IERROR) |
|
◆ pois()
long pois |
( |
double |
AMU, |
|
|
int & |
IERROR |
|
) |
| |
Definition at line 17 of file pois.cpp.
26 {
27 double AMUOL = -1.;
28 double AMAX = 100.;
29 double EXPMA = 0.;
30 double PIR = 0;
31 double RAN;
32
33
34 long N = 0;
35 IERROR = 0;
36 if (AMU > AMAX) goto m500;
37 if (AMU == AMUOL) goto m200;
38 if (AMU > 0.0) goto m100;
39
40 IERROR = 1;
41 return 0;
42
43m100:
44 IERROR = 0;
45 AMUOL = AMU;
47m200:
48 PIR = 1.;
49 N = -1;
50m300:
51 N = N + 1;
52
53
54
55
56
58 if (PIR > EXPMA) goto m300;
59 return N;
60
61m500:
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
81 N = long(RAN *
sqrt(AMU) + AMU + .5);
82 return N;
83
84}
DoubleAc sqrt(const DoubleAc &f)
DoubleAc exp(const DoubleAc &f)
double rnorm_improved(void)
Referenced by Heed::HeedParticle::physics(), Heed::HeedParticle_BGM::physics(), and Heed::HeedDeltaElectron::physics_after_new_speed().