1 |
pamelats |
1.1 |
* |
2 |
|
|
*cutted from gpdcspe by Nikolay Nikonov |
3 |
|
|
*CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola |
4 |
|
|
*CMZ : 2.00/00 03/03/2000 15.39.06 by Francesco Cafagna |
5 |
|
|
*CMZ : 1.02/00 19/01/2000 15.50.14 by Francesco Cafagna |
6 |
|
|
*CMZ : 1.01/00 16/05/96 17.38.13 by Francesco Cafagna |
7 |
|
|
*CMZ : 1.00/02 27/03/96 18.35.42 by Francesco Cafagna |
8 |
|
|
*-- Author : Francesco Cafagna 23/02/96 |
9 |
|
|
SUBROUTINE GPDCSPE(XINSPE,YINSPE,ZINSPE,XOUTSPE,YOUTSPE,ZOUTSPE) |
10 |
|
|
************************************************************************* |
11 |
|
|
* * |
12 |
|
|
* To calculate XAVE,YAVE,ZAVE and NMULT, YMULT after each hit * |
13 |
|
|
* * |
14 |
|
|
* * |
15 |
|
|
************************************************************************* |
16 |
|
|
*#include "gcunit.inc" |
17 |
|
|
*#include "gpphit.inc" |
18 |
|
|
PARAMETER (RADDEG=57.295779) |
19 |
|
|
#include "gpspe.inc" |
20 |
|
|
*#include "gpsed.inc" |
21 |
|
|
*#include "gpkey.inc" |
22 |
|
|
*et. 04/11/2005 |
23 |
|
|
*#include "gpstripspe.inc" |
24 |
|
|
*end et. |
25 |
|
|
* |
26 |
|
|
* |
27 |
|
|
* Data block for digitalization |
28 |
|
|
* |
29 |
|
|
REAL XINSPE,YINSPE,ZINSPE,XOUTSPE,YOUTSPE,ZOUTSPE |
30 |
|
|
REAL VPOS(3),BMAGNET(3),ANGLEX,ANGLEY,XMULT,YMULT,DXPOS,DYPOS |
31 |
|
|
* |
32 |
|
|
* DATA NTRA,LTRA/1,1/ |
33 |
|
|
|
34 |
|
|
c PRINT*,XINSPE,' ',YINSPE,' ',ZINSPE,' ',XOUTSPE,' ',ZOUTSPE |
35 |
|
|
|
36 |
|
|
XAVSPE = (XINSPE+XOUTSPE)/2. |
37 |
|
|
YAVSPE = (YINSPE+YOUTSPE)/2. |
38 |
|
|
ZAVSPE = (ZINSPE+ZOUTSPE)/2. |
39 |
|
|
|
40 |
|
|
|
41 |
|
|
C |
42 |
|
|
C ADD RESOLUTION SIMULATION TO XAVSPE |
43 |
|
|
C |
44 |
|
|
ANGLEX=0. |
45 |
|
|
ANGLEY=0. |
46 |
|
|
IF(ZOUTSPE.NE.ZINSPE) THEN |
47 |
|
|
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE-XINSPE )/ |
48 |
|
|
+ ABS(ZOUTSPE-ZINSPE ) ) |
49 |
|
|
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE-YINSPE )/ |
50 |
|
|
+ ABS(ZOUTSPE-ZINSPE ) ) |
51 |
|
|
ENDIF |
52 |
|
|
|
53 |
|
|
c PRINT*,'ANGX=',ANGLEX,' ANGY=',ANGLEY |
54 |
|
|
|
55 |
|
|
VPOS(1)=XAVSPE |
56 |
|
|
VPOS(2)=YAVSPE |
57 |
|
|
VPOS(3)=ZAVSPE |
58 |
|
|
CALL GUFIELD(VPOS,BMAGNET) |
59 |
|
|
|
60 |
|
|
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
61 |
|
|
|
62 |
|
|
NXMULT=INT(XMULT) |
63 |
|
|
NYMULT=INT(YMULT) |
64 |
|
|
|
65 |
|
|
XAVSPE = XAVSPE + DXPOS |
66 |
|
|
YAVSPE = YAVSPE + DYPOS |
67 |
|
|
|
68 |
|
|
c PRINT*,'<X>=',XAVSPE,' <Y>=',YAVSPE,' <Z>=',ZAVSPE |
69 |
|
|
c PRINT*,'NXMULT=',NXMULT,' NYMULT=',NYMULT |
70 |
|
|
|
71 |
|
|
* |
72 |
|
|
20 RETURN |
73 |
|
|
END |