/[PAMELA software]/gpamela/gptrd/npoiss.F
ViewVC logotype

Diff of /gpamela/gptrd/npoiss.F

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3.1 by cafagna, Thu Jul 11 16:02:01 2002 UTC revision 3.2 by pamela, Tue Apr 6 10:33:46 2004 UTC
# Line 1  Line 1 
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
# Line 10  Line 13 
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

Legend:
Removed from v.3.1  
changed lines
  Added in v.3.2

  ViewVC Help
Powered by ViewVC 1.1.23