1 |
* |
* |
2 |
* $Id: gpdspe.F,v 3.7 2006/02/07 11:38:52 bottai Exp $ |
* $Id: gpdspe.F,v 3.8 2006/04/09 23:29:19 cafagna Exp $ |
3 |
* |
* |
4 |
* $Log: gpdspe.F,v $ |
* $Log: gpdspe.F,v $ |
5 |
|
* Revision 3.8 2006/04/09 23:29:19 cafagna |
6 |
|
* Several new things, among this: ND and CARD |
7 |
|
* |
8 |
* Revision 3.7 2006/02/07 11:38:52 bottai |
* Revision 3.7 2006/02/07 11:38:52 bottai |
9 |
* test of mail delivery |
* test of mail delivery |
10 |
* |
* |
52 |
#include "gpspe.inc" |
#include "gpspe.inc" |
53 |
#include "gpsed.inc" |
#include "gpsed.inc" |
54 |
#include "gpkey.inc" |
#include "gpkey.inc" |
55 |
|
*et. 04/11/2005 |
56 |
|
#include "gpstripspe.inc" |
57 |
|
*end et. |
58 |
* |
* |
59 |
INTEGER IS,ID,NV,NVM,GPNHIT,NTHIT,NHFRST |
INTEGER IS,ID,NV,NVM,GPNHIT,NTHIT,NHFRST |
60 |
CHARACTER*4 CSET |
CHARACTER*4 CSET |
68 |
REAL VPOS(3),BMAGNET(3),ANGLEX,ANGLEY,XMULT,YMULT,DXPOS,DYPOS |
REAL VPOS(3),BMAGNET(3),ANGLEX,ANGLEY,XMULT,YMULT,DXPOS,DYPOS |
69 |
* |
* |
70 |
DATA NTRA,LTRA/1,1/ |
DATA NTRA,LTRA/1,1/ |
71 |
|
|
72 |
|
*et. 04/11/2005 |
73 |
|
* |
74 |
|
* |
75 |
|
* Vector zeroed |
76 |
|
* |
77 |
|
CALL VZERO(ISTRIPX,MAXSTR) |
78 |
|
CALL VZERO(NPSTRIPX,MAXSTR) |
79 |
|
CALL VZERO(NTSTRIPX,MAXSTR) |
80 |
|
CALL VZERO(QSTRIPX,MAXSTR) |
81 |
|
CALL VZERO(XSTRIPX,MAXSTR) |
82 |
|
CALL VZERO(ISTRIPY,MAXSTR) |
83 |
|
CALL VZERO(NPSTRIPY,MAXSTR) |
84 |
|
CALL VZERO(NTSTRIPY,MAXSTR) |
85 |
|
CALL VZERO(QSTRIPY,MAXSTR) |
86 |
|
CALL VZERO(YSTRIPY,MAXSTR) |
87 |
|
NSTRPX=0 |
88 |
|
NSTRPY=0 |
89 |
|
|
90 |
|
* |
91 |
|
|
92 |
|
do ip=1,nplanes |
93 |
|
do iip=1,nsensors |
94 |
|
isignyesx=0 |
95 |
|
isignyesy=0 |
96 |
|
do iiip=1,nstripx |
97 |
|
if(proxtanti(ip,iip,iiip).gt.0) then |
98 |
|
isignyesx=1 |
99 |
|
GO TO 456 |
100 |
|
endif |
101 |
|
enddo |
102 |
|
do iiip=1,nstripy |
103 |
|
if(proytanti(ip,iip,iiip).gt.0) then |
104 |
|
isignyesy=1 |
105 |
|
GO TO 456 |
106 |
|
endif |
107 |
|
enddo |
108 |
|
456 if(isignyesx.eq.1.or.isignyesy.eq.1) then |
109 |
|
call gpucollection(ip,iip) |
110 |
|
endif |
111 |
|
enddo |
112 |
|
enddo |
113 |
|
|
114 |
|
|
115 |
|
|
116 |
|
|
117 |
* |
* |
118 |
* |
* |
119 |
* Vector zeroed |
* Vector zeroed |
121 |
CALL VZERO(ITRPB ,NHM) |
CALL VZERO(ITRPB ,NHM) |
122 |
CALL VZERO(ITRSL ,NHM) |
CALL VZERO(ITRSL ,NHM) |
123 |
CALL VZERO(ITSPA ,NHM) |
CALL VZERO(ITSPA ,NHM) |
124 |
|
CALL VZERO(NXMULT ,NHM) |
125 |
|
CALL VZERO(NYMULT ,NHM) |
126 |
CALL VZERO(XTSPA,NHM) |
CALL VZERO(XTSPA,NHM) |
127 |
CALL VZERO(YTSPA,NHM) |
CALL VZERO(YTSPA,NHM) |
128 |
CALL VZERO(ZTSPA,NHM) |
CALL VZERO(ZTSPA,NHM) |
213 |
PATHSPE(I) = VHITS(8,I) |
PATHSPE(I) = VHITS(8,I) |
214 |
IPARSPE(I) = VHITS(9,I) |
IPARSPE(I) = VHITS(9,I) |
215 |
P0SPE (I) = VHITS(10,I) |
P0SPE (I) = VHITS(10,I) |
216 |
IF(FFIELD.NE.0) THEN |
|
217 |
C |
C |
218 |
C ADD RESOLUTION SIMULATION TO XAVSPE |
C ADD RESOLUTION SIMULATION TO XAVSPE |
219 |
C |
C |
220 |
ANGLEX=0. |
ANGLEX=0. |
221 |
ANGLEY=0. |
ANGLEY=0. |
222 |
IF(ZOUTSPE(I).NE.ZINSPE(I)) THEN |
IF(ZOUTSPE(I).NE.ZINSPE(I)) THEN |
223 |
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE(I)-XINSPE(I) )/ |
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE(I)-XINSPE(I) )/ |
224 |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
225 |
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE(I)-YINSPE(I) )/ |
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE(I)-YINSPE(I) )/ |
226 |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
227 |
ENDIF |
ENDIF |
228 |
|
|
229 |
VPOS(1)=XAVSPE(I) |
VPOS(1)=XAVSPE(I) |
230 |
VPOS(2)=YAVSPE(I) |
VPOS(2)=YAVSPE(I) |
231 |
VPOS(3)=ZAVSPE(I) |
VPOS(3)=ZAVSPE(I) |
232 |
CALL GUFLD(VPOS,BMAGNET) |
CALL GUFLD(VPOS,BMAGNET) |
233 |
|
|
234 |
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
235 |
|
|
236 |
NXMULT(I)=INT(XMULT) |
NXMULT(I)=INT(XMULT) |
237 |
NYMULT(I)=INT(YMULT) |
NYMULT(I)=INT(YMULT) |
238 |
|
|
239 |
XAVSPE(I) = XAVSPE(I) + DXPOS |
XAVSPE(I) = XAVSPE(I) + DXPOS |
240 |
YAVSPE(I) = YAVSPE(I) + DYPOS |
YAVSPE(I) = YAVSPE(I) + DYPOS |
241 |
|
|
242 |
C |
C |
243 |
C ADD THE SHIFT INDUCED BY THE MAG. FIELD |
C ADD THE SHIFT INDUCED BY THE MAG. FIELD |
244 |
C |
C |
245 |
|
IF(FFIELD.NE.0) THEN |
246 |
|
|
247 |
IF(ITRPB(I).LT.6) THEN |
IF(ITRPB(I).LT.6) THEN |
248 |
XAVSPE(I) = XAVSPE(I) - 2.64e-4/4.5*BMAGNET(2) |
XAVSPE(I) = XAVSPE(I) - 2.64e-4/4.5*BMAGNET(2) |
249 |
ELSE IF(ITRPB(I).EQ.6) THEN |
ELSE IF(ITRPB(I).EQ.6) THEN |