1 |
* |
* |
2 |
* $Id$ |
* $Id: npoiss.F,v 3.1.1.1 2002/07/11 16:02:01 cafagna Exp $ |
3 |
|
* |
4 |
|
* $Log: npoiss.F,v $ |
5 |
|
* Revision 3.1.1.1 2002/07/11 16:02:01 cafagna |
6 |
|
* First GPAMELA release on CVS |
7 |
* |
* |
|
* $Log$ |
|
8 |
* |
* |
9 |
*CMZ : 3.00/00 06/04/2001 11.21.19 by Marialuigia Ambriola |
*CMZ : 3.00/00 06/04/2001 11.21.19 by Marialuigia Ambriola |
10 |
*-- Author : Marialuigia Ambriola 05/04/2001 |
*-- Author : Marialuigia Ambriola 05/04/2001 |
13 |
* Simulate the Poisson distribution |
* Simulate the Poisson distribution |
14 |
* From data particle book vol. 15 2000 |
* From data particle book vol. 15 2000 |
15 |
************************************** |
************************************** |
16 |
REAL U,A,X |
REAL U(1),A,X |
17 |
INTEGER K,N |
INTEGER K,N |
18 |
NPOISS=0 |
NPOISS=0 |
19 |
K=1 |
K=1 |
20 |
A=1. |
A=1. |
21 |
100 U=RNDM(1) |
c ml26/03/04 100 U=RNDM(1) |
22 |
A=U*A |
100 CALL GRNDM(U,1) |
23 |
|
A=U(1)*A |
24 |
IF(A.LT.EXP(-X)) THEN |
IF(A.LT.EXP(-X)) THEN |
25 |
N=K-1 |
N=K-1 |
26 |
ELSE |
ELSE |