Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / fluka / iefun.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:20:00 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.44 by S.Giani
11*-- Author :
12*$ CREATE IEFUN.FOR
13*COPY IEFUN
14*
15*=== iefun ============================================================*
16*
17 INTEGER FUNCTION IEFUN(PL,IRE)
18
19#include "geant321/dblprc.inc"
20#include "geant321/dimpar.inc"
21#include "geant321/iounit.inc"
22*
23#include "geant321/reac.inc"
24#include "geant321/redver.inc"
25*
26C*****IEFUN CALCULATES A MOMENTUM INDEX
27 COMMON / FKRUN / RUNTES, EFTES
28*
29 IPLA=IEII(IRE)+1+1
30 IPLE=IEII(IRE+1)
31 IF (PL.LT.0.D0) GO TO 13
32 DO 2 I=IPLA,IPLE
33 J=I-IPLA+1
34 IF (PL.LE.PLABF(I)) GO TO 3
35 2 CONTINUE
36 I=IPLE
37 IF ( EFTES.GT.40.D0) GO TO 4321
38 EFTES=EFTES+1.D0
39 WRITE(LUNOUT,10)PL,J
40 4321 CONTINUE
41 GO TO 4323
42 13 CONTINUE
43 DO 12 I=IPLA,IPLE
44 J=I-IPLA+1
45 IF (-PL.LE.UMO(I)) GO TO 3
46 12 CONTINUE
47 I=IPLE
48 IF ( EFTES.GT.40.D0) GO TO 4322
49 EFTES=EFTES+1.D0
50 WRITE(LUNOUT,10)PL,I
51 4322 CONTINUE
52 3 CONTINUE
53 4323 CONTINUE
54 IEFUN=I
55 RETURN
56 10 FORMAT(14H PLAB OR -ECM=,E10.4,27H IS OUT OF CONSIDERED RANGE
57 *,7H IEFUN=,I5)
58 END