This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gstrag / gpscin.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:21:38 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.25 by S.Giani
11*-- Author :
12 FUNCTION GPSCIN(EBEG,EEND,ECUR,COEFF)
13C.
14C. ******************************************************************
15C. * *
16C. ******************************************************************
17C.
18#if !defined(CERNLIB_SINGLE)
19 IMPLICIT DOUBLE PRECISION (A-H,O-Z)
20#endif
21 REAL COEFF(4)
22 PARAMETER (ONE=1)
23C.
24C. ------------------------------------------------------------------
25C.
26 YBEG = EBEG/ECUR
27 YEND = EEND/ECUR
28 YBEGIN = ONE/YBEG
29 YENDIN = ONE/YEND
30*
31 EINV = ONE/ECUR
32 C1 = COEFF(1)*EINV
33 C2 = COEFF(2)*EINV**2
34 C3 = COEFF(3)*EINV**3
35 C4 = COEFF(4)*EINV**4
36*
37 CONS1 = 0.5*(C1+C3)
38 CONS2 = C2+C4
39 CONS3 = 0.5*CONS2
40 CONS4 = 0.5*C3
41 CONS5 = C4/3
42*
43* VALBEG = CONS1*F1(YBEG)+CONS3*F2(YBEG)+
44* + YBEGIN*(CONS2+YBEGIN*(CONS4+YBEGIN*CONS5))
45* VALEND = CONS1*F1(YEND)+CONS3*F2(YEND)+
46* + YENDIN*(CONS2+YENDIN*(CONS4+YENDIN*CONS5))
47*
48* GPSCIN = VALEND-VALBEG
49 GPSCIN =
50 + CONS1*LOG(ABS((YEND**2-1)*YBEG**2/((YBEG**2-1)*YEND**2)))+
51 + CONS2*(YENDIN-YBEGIN)+
52 + CONS3*LOG(ABS((1-YEND)*(1+YBEG)/((1-YBEG)*(1+YEND))))+
53 + CONS4*(YENDIN**2-YBEGIN**2)+CONS5*(YENDIN**3-YBEGIN**3)
54*
55 END