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

Annotation of /gpamela/gptrd/npoiss.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.2 - (hide annotations) (download)
Tue Apr 6 10:33:46 2004 UTC (20 years, 7 months ago) by pamela
Branch: MAIN
CVS Tags: v4r4, v4r5, v4r6, v4r7, v4r1, v4r2, v4r3, v4r8, v4r9, v4r14, v4r12, v4r13, v4r10, v4r11, HEAD
Changes since 3.1: +9 -5 lines
NON-REPRODUCIBILITY problem of a GPAMELA RUN fixed; bug found and fixed filling in the hit structure of the calorimeter

1 cafagna 3.1 *
2 pamela 3.2 * $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 cafagna 3.1 *
8     *
9     *CMZ : 3.00/00 06/04/2001 11.21.19 by Marialuigia Ambriola
10     *-- Author : Marialuigia Ambriola 05/04/2001
11     INTEGER FUNCTION NPOISS(X)
12     **************************************
13     * Simulate the Poisson distribution
14     * From data particle book vol. 15 2000
15     **************************************
16 pamela 3.2 REAL U(1),A,X
17 cafagna 3.1 INTEGER K,N
18     NPOISS=0
19     K=1
20     A=1.
21 pamela 3.2 c ml26/03/04 100 U=RNDM(1)
22     100 CALL GRNDM(U,1)
23     A=U(1)*A
24 cafagna 3.1 IF(A.LT.EXP(-X)) THEN
25     N=K-1
26     ELSE
27     K=K+1
28     GOTO 100
29     ENDIF
30     NPOISS=N
31     RETURN
32     END

  ViewVC Help
Powered by ViewVC 1.1.23