Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / ggeom / gitran.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:20:51 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.29 by S.Giani
11*-- Author :
12 SUBROUTINE GITRAN(X,DX,IROT,XNEW)
13C.
14C. ******************************************************************
15C * *
16C * ROUTINE TO APPLY THE TRANSFORMATION GIVEN BY *
17C * THE POINT DX AND THE ROTATION MATRIX IN THE GEANT *
18C * ROTATION MATRIX BANKS WITH INDEX NUMBER IROT TO THE *
19C * POINT X, STORING THE RESULT AS THE POINT XNEW. *
20C * *
21C. * ==>Called by : GFTRAC,GINVOL,GMEPOS,GNEXT,GTMEDI,GTNEXT *
22C. * Author A.McPherson ********* *
23C. * *
24C. ******************************************************************
25C.
26#include "geant321/gcbank.inc"
27 DIMENSION X(3),DX(3),XNEW(3)
28C.
29C. ------------------------------------------------------------------
30C.
31 IF(IROT.EQ.0) THEN
32 XNEW(1) = X(1) - DX(1)
33 XNEW(2) = X(2) - DX(2)
34 XNEW(3) = X(3) - DX(3)
35*
36 ELSE
37 XL1 = X(1) - DX(1)
38 XL2 = X(2) - DX(2)
39 XL3 = X(3) - DX(3)
40 JR=LQ(JROTM-IROT)
41 XNEW(1) = XL1*Q(JR+1) + XL2*Q(JR+2) + XL3*Q(JR+3)
42 XNEW(2) = XL1*Q(JR+4) + XL2*Q(JR+5) + XL3*Q(JR+6)
43 XNEW(3) = XL1*Q(JR+7) + XL2*Q(JR+8) + XL3*Q(JR+9)
44*
45 ENDIF
46 END