Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / fluka / fkener.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:20:06 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.45 by S.Giani
11*-- Author :
12*=== energy ===========================================================*
13* *
14 FUNCTION FKENER(A,Z)
15
16#include "geant321/dblprc.inc"
17#include "geant321/dimpar.inc"
18#include "geant321/iounit.inc"
19C--------------------------------------------------------------------
20C SUBNAME = ENERGY
21C--------------------------------------------------------------------
22#include "geant321/eva0.inc"
23C--------------------------------------------------------------------
24 KA0 = NINT ( A )
25 KZ0 = NINT ( Z )
26 N = KA0 - KZ0
27 IF ( N .LE. 0 ) THEN
28 IF ( KA0 .NE. 1 ) THEN
29 IF ( N .LT. 0 ) THEN
30 WRITE ( LUNOUT, * )
31 & ' Stopped in energy: mass number =< atomic number !!',
32 & KA0, KZ0
33 END IF
34 ELSE
35 FKENER = WAPS ( 1, 3 )
36 RETURN
37 END IF
38 END IF
39 IZZ = NINT ( WAPS ( KA0, 1 ) )
40 IF ( KZ0 .LT. IZZ .OR. KZ0 .GT. IZZ + 9 ) THEN
41 FKENER = ENRG ( A, Z )
42 RETURN
43 ELSE
44 IZ0 = KZ0 - IZZ + 2
45 FKENER = WAPS ( KA0, IZ0 )
46 IF ( FKENER .EQ. 0.D+00 .AND. (KA0 .NE. 12 .OR. KZ0 .NE. 6) )
47 & FKENER = ENRG ( A, Z )
48 RETURN
49 END IF
50* RETURN
51 END