This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gcons / gevkev.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:13  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.19  by  S.Giani
11 *-- Author :
12       SUBROUTINE GEVKEV(EGEV,ENERU,KUNIT)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *       Convert energy from GeV to more appropriate units        *
17 C.    *                                                                *
18 C.    *    ==>Called by : GPLMAT,GPRMAT,GPHYSI,GPCXYZ                  *
19 C.    *       Author     M.Maire    *********                          *
20 C.    *                                                                *
21 C.    ******************************************************************
22 C.
23       CHARACTER*4 KUNIT
24 *
25       IF(EGEV.LT.0.0000009999) THEN
26          ENERU = EGEV*1.E+9
27          KUNIT = '  eV'
28       ELSEIF(EGEV.LT.0.0009999) THEN
29          ENERU = EGEV*1.E+6
30          KUNIT = ' keV'
31       ELSEIF(EGEV.LT.0.9999) THEN
32          ENERU = EGEV*1.E+3
33          KUNIT = ' MeV'
34       ELSEIF(EGEV.LT.999.9) THEN
35          ENERU = EGEV
36          KUNIT = ' GeV'
37       ELSE
38          ENERU = EGEV*1.E-3
39          KUNIT = ' TeV'
40       ENDIF
41 *
42       END