]> git.uio.no Git - u/mrichter/AliRoot.git/blame - GEANT321/gdraw/gdkine.F
Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / gdraw / gdkine.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:20:30 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.28 by S.Giani
11*-- Author :
12 SUBROUTINE GDKINE
13*
14************************************************************************
15* *
16* RAY-TRACING *
17* Kinematics for the light rays. *
18* Parallel and perspective views. *
19* *
20* Author: S.Giani. *
21* *
22************************************************************************
23*
24#include "geant321/gcflag.inc"
25#include "geant321/gckine.inc"
26#include "geant321/gconst.inc"
27********************************************************************************
28#include "geant321/gcbank.inc"
29#include "geant321/gcunit.inc"
30#include "geant321/gcdraw.inc"
31#include "geant321/gcspee.inc"
32#include "geant321/gchiln.inc"
33#include "geant321/gcrayt.inc"
34********************************************************************************
35 DIMENSION VERTEX(6),PLAB(3)
36*
37* -----------------------------------------------------------------
38*
39 XMIP=0.
40 CALL VZERO(VERTEX,6)
41********************************************************************************
42 CALL UCTOH('PERS',IPERS,4,4)
43 XCOSXS=(SIN(GTHETA*DEGRAD))*(COS(GPHI*DEGRAD))
44 YCOSYS=(SIN(GTHETA*DEGRAD))*(SIN(GPHI*DEGRAD))
45 ZCOSZS=COS(GTHETA*DEGRAD)
46* print *,XCOSXS,YCOSYS,ZCOSZS,'direction from gukine'
47 VDX=XCOSXS
48 VDY=YCOSYS
49 VDZ=ZCOSZS
50 IK=48
51 VERTEX(1)=XPINTS
52 VERTEX(2)=YPINTS
53 VERTEX(3)=ZPINTS
54 IF(IPERS.EQ.IPRJ)THEN
55 CONMOD=1./SQRT(((XPINTS-FPINTX)**2)+((YPINTS-FPINTY)**2)+
56 + ((ZPINTS-FPINTZ)**2))
57 XCOSXS=-(XPINTS-FPINTX)*CONMOD
58 YCOSYS=-(YPINTS-FPINTY)*CONMOD
59 ZCOSZS=-(ZPINTS-FPINTZ)*CONMOD
60 ENDIF
61 PLAB(1) = -PKINE(1)*XCOSXS
62 PLAB(2) = -PKINE(1)*YCOSYS
63 PLAB(3) = -PKINE(1)*ZCOSZS
64********************************************************************************
65 CALL GSVERT(VERTEX,0,0,0,0,NVERT)
66 CALL GSKINE(PLAB,IK,NVERT,0,0,NT)
67*
68 END