]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEANT321/ggeom/gnotr9.F
Allow any Cherenkov-like particle to be transported
[u/mrichter/AliRoot.git] / GEANT321 / ggeom / gnotr9.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:53  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.30  by  S.Giani
11 *-- Author :
12       SUBROUTINE GNOTR9(X,Y,Z,N1,N2,N3,N4)
13 C.    ******************************************************************
14 C.    *                                                                *
15 C.    *     GNOTR9 checks coplanarity of the face described by the     *
16 C.    *     indices N1,N2,N3,N4 into the vertex array X,Y,Z.           *
17 C.    *     This check is perfomed since shape TRAP is described by    *
18 C.    *     11 values in the parameter array of which only 9 are       *
19 C.    *     independant.
20 C.    *         Called by : GNOTR2
21 C.    *         Author  R.Nierhaus  *********                          *
22 C.    *                                                                *
23 C.    ******************************************************************
24 *
25 #include "geant321/gcunit.inc"
26 *
27       DIMENSION X(8),Y(8),Z(8)
28 *
29       A=-((Y(N2)-Y(N1))*(Z(N3)-Z(N1))-(Y(N3)-Y(N1))*(Z(N2)-Z(N1)))
30       B=-((Z(N2)-Z(N1))*(X(N3)-X(N1))-(Z(N3)-Z(N1))*(X(N2)-X(N1)))
31       C=-((X(N2)-X(N1))*(Y(N3)-Y(N1))-(X(N3)-X(N1))*(Y(N2)-Y(N1)))
32       V=(X(N4)-X(N1))*A+(Y(N4)-Y(N1))*B+(Z(N4)-Z(N1))*C
33       IF (ABS(V)/SQRT(A**2+B**2+C**2).GT.1.E-3) THEN
34          WRITE(CHMAIL,1001)
35          CALL GMAIL(0,0)
36  1001    FORMAT (' GNOTR9 ...TRAP shape :  surface not coplanar')
37       END IF
38 *
39       END
40