Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / gphys / gdrot.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:24  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.21  by  S.Giani
11 *-- Author :
12       SUBROUTINE GDROT(P,COSTH,SINTH,COSPH,SINPH)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *  Rotates vector from one reference system into another.        *
17 C.    *  THETA and PHI are anti-clockwise Eulerian angles between the  *
18 C.    *  two systems.                                                  *
19 C.    *                                                                *
20 C.    *    ==>Called by : GBREME,GCOMP,GDECAY,GDECA3,GDRAY,GPAIRG      *
21 C.    *       Author    M.Hansroul, G.Patrick  *********               *
22 C.    *                                                                *
23 C.    *                                                                *
24 C.    ******************************************************************
25 C.
26       DIMENSION P(3)
27 #if !defined(CERNLIB_SINGLE)
28       DOUBLE PRECISION P1,P2,P3
29 #endif
30 C.
31 C.    ------------------------------------------------------------------
32 C.
33       P1=P(1)
34       P2=P(2)
35       P3=P(3)
36       P(1)=P1*COSTH*COSPH - P2*SINPH + P3*SINTH*COSPH
37       P(2)=P1*COSTH*SINPH + P2*COSPH + P3*SINTH*SINPH
38       P(3)=-P1*SINTH                 + P3*COSTH
39 C
40       END