]> git.uio.no Git - u/mrichter/AliRoot.git/blame - GEANT321/gdraw/gdahit.F
Corrections to line for alpha
[u/mrichter/AliRoot.git] / GEANT321 / gdraw / gdahit.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:20:19 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 SUBROUTINE GDAHIT (X,Y,Z,ISYMB,SIZSYM)
13C.
14C. ******************************************************************
15C. * *
16C. * Draw an HIT point at (X,Y,Z) *
17C. * *
18C. * The hit belongs to track -ITR3D (in common GCDRAW) *
19C. * if GDAHIT is called from GDHITS or GDCHIT, otherwise *
20C. * it belongs to track ITRA (in common GCKINE) *
21C. * if GDAHIT is called directly from user hit routines. *
22C. * *
23C. * The following characters may be chosen : *
24C. * ISYMB = -1 hardware character (fast), *
25C. * = 0 crosses X by TVDRAW (default), *
26C. * (size = SIZSYM in cm, default = 0.1), *
27C. * = 840 characters by HPLSOF *
28C. * . according to the table p. 25 *
29C. * . of the HPLOT manual *
30C. * 853 (size = SIZSYM in cm) *
31C. * (844,854 white, black asterisk * in addition). *
32C. * *
33C. * ==>Called by : <USER>, GDCHIT, GDHITS *
34C. * Authors : R.Brun, P.Zanarini ********** *
35C. * *
36C. ******************************************************************
37C.
38#include "geant321/gcdraw.inc"
39#include "geant321/gckine.inc"
40 CHARACTER*4 LSYMB(10),CHTEXT
41 DIMENSION HITS(3),UU(2),VV(2),JSYMB(10)
42 SAVE JSYMB,LSYMB,IFIRST,IOFF
43 DATA JSYMB/ 840 , 841 , 842 , 843 , 844
44 +, 850 , 851 , 852 , 853 , 854 /
45 DATA LSYMB/'"<0$','"<1$','"<2$','"<3$','"<4$'
46 +, '">0$','">1$','">2$','">3$','">4$'/
47 DATA IFIRST/0/
48C.
49C. ------------------------------------------------------------------
50C.
51 IF (IFIRST.EQ.0) THEN
52 IFIRST=1
53 CALL UCTOH('OFF ',IOFF,4,4)
54 ENDIF
55C
56C Set IOBJ to HIT
57C
58 IOBJ=3
59C
60 HITS(1)= X
61 HITS(2)= Y
62 HITS(3)= Z
63C
64C Find mode of drawing
65C
66 KSYMB = ISYMB
67 IF (ISYMB.NE.-1) KSYMB=IUCOMP(ISYMB,JSYMB(1),10)
68 IF (KSYMB.GT. 0) CALL UCTOH(LSYMB(KSYMB),MSYMB,4,4)
69 SSYMB=SIZSYM
70 IF (SSYMB.EQ.0.) SSYMB=0.1
71C
72C If THRZ option is set on (R-Z projection) and
73C the cut is lateral (vertical or horizontal) then :
74C if ITR3D is not set by GDHITS or GDCHIT
75C then use -ITRA from common /GCKINE/
76C else do not modify ITR3D already set
77C
78 IF (ITHRZ.NE.IOFF) THEN
79 IF (ICUT.EQ.1.OR.ICUT.EQ.2) THEN
80 IF (ITR3D.EQ.0) ITR3D=-ITRA
81 ENDIF
82 ELSE
83 ITR3D=0
84 ENDIF
85C
86C Draw the hit
87C
88 CALL GDFR3D(HITS,1,U,V)
89C
90CM Short circuit in case of GMR
91C
92 IF ( IGMR .NE. 0 ) GO TO 999
93CM
94C
95 IF (KSYMB.LT.0) THEN
96C
97C ' ' for hardware points, or 'x' for hardware crosses
98C
99 CALL IPM(1,U,V)
100C
101 ELSE IF (KSYMB.GT.0) THEN
102C
103C soft-characters 840...854 (see above)
104C
105 V=V-SSYMB*0.5
106 CALL UHTOC(MSYMB,4,CHTEXT,4)
107 CALL GDRAWT(U,V,CHTEXT,SSYMB,0.,1,0)
108C
109 ELSE
110C
111C default crosses of size SSYMB cm
112C
113 DP = 0.5 * SSYMB
114 UU(1) = U-DP
115 UU(2) = U+DP
116 VV(1) = V+DP
117 VV(2) = V-DP
118 CALL GDRAWV(UU,VV,2)
119 UU(1) = U+DP
120 UU(2) = U-DP
121 VV(1) = V+DP
122 VV(2) = V-DP
123 CALL GDRAWV(UU,VV,2)
124C
125 ENDIF
126C
127 999 RETURN
128 END