1 |
* |
* |
2 |
* $Id: gpdspe.F,v 3.5 2006/01/24 13:52:01 bottai Exp $ |
* $Id: gpdspe.F,v 3.10 2007/05/08 15:05:18 bottai Exp $ |
3 |
* |
* |
4 |
* $Log: gpdspe.F,v $ |
* $Log: gpdspe.F,v $ |
5 |
|
* Revision 3.10 2007/05/08 15:05:18 bottai |
6 |
|
* avoid simulating Lorentz angle drift in SPE spread positions |
7 |
|
* since new reconstruction correct it at strip level |
8 |
|
* |
9 |
|
* Revision 3.9 2006/05/02 12:00:24 bottai |
10 |
|
* call gpucollection for strip simulation, condition on FFIELD repositioned |
11 |
|
* |
12 |
|
* Revision 3.8 2006/04/09 23:29:19 cafagna |
13 |
|
* Several new things, among this: ND and CARD |
14 |
|
* |
15 |
|
* Revision 3.7 2006/02/07 11:38:52 bottai |
16 |
|
* test of mail delivery |
17 |
|
* |
18 |
|
* Revision 3.6 2006/02/06 14:17:21 bottai |
19 |
|
* adapt again the resolution simulation to the ITRPB volume identification |
20 |
|
* |
21 |
* Revision 3.5 2006/01/24 13:52:01 bottai |
* Revision 3.5 2006/01/24 13:52:01 bottai |
22 |
* prepare to store the x and y multiplicity of the hit |
* prepare to store the x and y multiplicity of the hit |
23 |
* |
* |
41 |
*CMZ : 1.00/02 27/03/96 18.35.42 by Francesco Cafagna |
*CMZ : 1.00/02 27/03/96 18.35.42 by Francesco Cafagna |
42 |
*-- Author : Francesco Cafagna 23/02/96 |
*-- Author : Francesco Cafagna 23/02/96 |
43 |
SUBROUTINE GPDSPE |
SUBROUTINE GPDSPE |
44 |
************************************************************************ |
************************************************************************* |
45 |
* * |
* * |
46 |
* To perform SPE digitization * |
* To perform SPE digitization * |
47 |
* * |
* * |
48 |
* Called by: GUDIGI * |
* Called by: GUDIGI * |
49 |
* Author: Francesco Cafagna, 23/02/96 12.50.38 * |
* Author: Francesco Cafagna, 23/02/96 12.50.38 * |
50 |
* * |
* * |
51 |
************************************************************************ |
************************************************************************* |
52 |
#include "gcunit.inc" |
#include "gcunit.inc" |
53 |
#include "gpphit.inc" |
#include "gpphit.inc" |
54 |
PARAMETER (RADDEG=57.295779) |
PARAMETER (RADDEG=57.295779) |
58 |
#include "gprhit.inc" |
#include "gprhit.inc" |
59 |
#include "gpspe.inc" |
#include "gpspe.inc" |
60 |
#include "gpsed.inc" |
#include "gpsed.inc" |
61 |
|
#include "gpkey.inc" |
62 |
|
*et. 04/11/2005 |
63 |
|
#include "gpstripspe.inc" |
64 |
|
*end et. |
65 |
* |
* |
66 |
INTEGER IS,ID,NV,NVM,GPNHIT,NTHIT,NHFRST |
INTEGER IS,ID,NV,NVM,GPNHIT,NTHIT,NHFRST |
67 |
CHARACTER*4 CSET |
CHARACTER*4 CSET |
75 |
REAL VPOS(3),BMAGNET(3),ANGLEX,ANGLEY,XMULT,YMULT,DXPOS,DYPOS |
REAL VPOS(3),BMAGNET(3),ANGLEX,ANGLEY,XMULT,YMULT,DXPOS,DYPOS |
76 |
* |
* |
77 |
DATA NTRA,LTRA/1,1/ |
DATA NTRA,LTRA/1,1/ |
78 |
|
|
79 |
|
*et. 04/11/2005 |
80 |
|
* |
81 |
|
* |
82 |
|
* Vector zeroed |
83 |
|
* |
84 |
|
CALL VZERO(ISTRIPX,MAXSTR) |
85 |
|
CALL VZERO(NPSTRIPX,MAXSTR) |
86 |
|
CALL VZERO(NTSTRIPX,MAXSTR) |
87 |
|
CALL VZERO(QSTRIPX,MAXSTR) |
88 |
|
CALL VZERO(XSTRIPX,MAXSTR) |
89 |
|
CALL VZERO(ISTRIPY,MAXSTR) |
90 |
|
CALL VZERO(NPSTRIPY,MAXSTR) |
91 |
|
CALL VZERO(NTSTRIPY,MAXSTR) |
92 |
|
CALL VZERO(QSTRIPY,MAXSTR) |
93 |
|
CALL VZERO(YSTRIPY,MAXSTR) |
94 |
|
NSTRPX=0 |
95 |
|
NSTRPY=0 |
96 |
|
|
97 |
|
* |
98 |
|
|
99 |
|
do ip=1,nplanes |
100 |
|
do iip=1,nsensors |
101 |
|
isignyesx=0 |
102 |
|
isignyesy=0 |
103 |
|
do iiip=1,nstripx |
104 |
|
if(proxtanti(ip,iip,iiip).gt.0) then |
105 |
|
isignyesx=1 |
106 |
|
GO TO 456 |
107 |
|
endif |
108 |
|
enddo |
109 |
|
do iiip=1,nstripy |
110 |
|
if(proytanti(ip,iip,iiip).gt.0) then |
111 |
|
isignyesy=1 |
112 |
|
GO TO 456 |
113 |
|
endif |
114 |
|
enddo |
115 |
|
456 if(isignyesx.eq.1.or.isignyesy.eq.1) then |
116 |
|
call gpucollection(ip,iip) |
117 |
|
endif |
118 |
|
enddo |
119 |
|
enddo |
120 |
|
|
121 |
|
|
122 |
|
|
123 |
|
|
124 |
* |
* |
125 |
* |
* |
126 |
* Vector zeroed |
* Vector zeroed |
128 |
CALL VZERO(ITRPB ,NHM) |
CALL VZERO(ITRPB ,NHM) |
129 |
CALL VZERO(ITRSL ,NHM) |
CALL VZERO(ITRSL ,NHM) |
130 |
CALL VZERO(ITSPA ,NHM) |
CALL VZERO(ITSPA ,NHM) |
131 |
|
CALL VZERO(NXMULT ,NHM) |
132 |
|
CALL VZERO(NYMULT ,NHM) |
133 |
CALL VZERO(XTSPA,NHM) |
CALL VZERO(XTSPA,NHM) |
134 |
CALL VZERO(YTSPA,NHM) |
CALL VZERO(YTSPA,NHM) |
135 |
CALL VZERO(ZTSPA,NHM) |
CALL VZERO(ZTSPA,NHM) |
191 |
* |
* |
192 |
NTHSPE = NHITS |
NTHSPE = NHITS |
193 |
DO I=1,NHITS |
DO I=1,NHITS |
194 |
ITRPB(I) = NUMBV(1,I) |
NSPEPLANE=INT((NUMBV(2,I)-1)/6)+1 |
195 |
ITRSL(I) = NUMBV(2,I) |
NUMSENS=NUMBV(2,I)-(NSPEPLANE-1)*6 |
196 |
|
ITRPB(I) = NSPEPLANE |
197 |
|
ITRSL(I) = NUMSENS |
198 |
ITSPA(I) = NUMBV(3,I) |
ITSPA(I) = NUMBV(3,I) |
199 |
#if defined(GPAMELA_INTER) |
#if defined(GPAMELA_INTER) |
200 |
XAVSPE(I) = VHITS(1,I) |
XAVSPE(I) = VHITS(1,I) |
222 |
PATHSPE(I) = VHITS(8,I) |
PATHSPE(I) = VHITS(8,I) |
223 |
IPARSPE(I) = VHITS(9,I) |
IPARSPE(I) = VHITS(9,I) |
224 |
P0SPE (I) = VHITS(10,I) |
P0SPE (I) = VHITS(10,I) |
225 |
|
|
226 |
C |
C |
227 |
C ADD RESOLUTION SIMULATION TO XAVSPE |
C ADD RESOLUTION SIMULATION TO XAVSPE |
228 |
C |
C |
229 |
ANGLEX=0. |
ANGLEX=0. |
230 |
ANGLEY=0. |
ANGLEY=0. |
231 |
IF(ZOUTSPE(I).NE.ZINSPE(I)) THEN |
IF(ZOUTSPE(I).NE.ZINSPE(I)) THEN |
232 |
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE(I)-XINSPE(I) )/ |
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE(I)-XINSPE(I) )/ |
233 |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
234 |
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE(I)-YINSPE(I) )/ |
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE(I)-YINSPE(I) )/ |
235 |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
236 |
ENDIF |
ENDIF |
237 |
|
|
238 |
VPOS(1)=XAVSPE(I) |
VPOS(1)=XAVSPE(I) |
239 |
VPOS(2)=YAVSPE(I) |
VPOS(2)=YAVSPE(I) |
240 |
VPOS(3)=ZAVSPE(I) |
VPOS(3)=ZAVSPE(I) |
241 |
CALL GUFLD(VPOS,BMAGNET) |
CALL GUFLD(VPOS,BMAGNET) |
242 |
|
|
243 |
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
244 |
|
|
245 |
NXMULT(I)=INT(XMULT) |
NXMULT(I)=INT(XMULT) |
246 |
NYMULT(I)=INT(YMULT) |
NYMULT(I)=INT(YMULT) |
247 |
|
|
248 |
XAVSPE(I) = XAVSPE(I) + DXPOS |
XAVSPE(I) = XAVSPE(I) + DXPOS |
249 |
YAVSPE(I) = YAVSPE(I) + DYPOS |
YAVSPE(I) = YAVSPE(I) + DYPOS |
250 |
|
|
251 |
C |
C |
252 |
C ADD THE SHIFT INDUCED BY THE MAG. FIELD |
C ADD THE SHIFT INDUCED BY THE MAG. FIELD |
253 |
C |
C |
254 |
|
cv |
255 |
IF(ITRPB(I).LT.6) THEN |
cv 8/05/2007 not anymore needed since the effect is corrected in reco |
256 |
XAVSPE(I) = XAVSPE(I) - 2.64e-4/4.5*BMAGNET(2) |
cv before calculating the positions for fit |
257 |
ELSE IF(ITRPB(I).EQ.6) THEN |
cv |
258 |
XAVSPE(I) = XAVSPE(I) + 2.64e-4/4.5*BMAGNET(2) |
cv IF(FFIELD.NE.0) THEN |
259 |
ENDIF |
cv |
260 |
|
cv IF(ITRPB(I).LT.6) THEN |
261 |
|
cv XAVSPE(I) = XAVSPE(I) + 2.64e-4/4.5*BMAGNET(2) |
262 |
|
cv ELSE IF(ITRPB(I).EQ.6) THEN |
263 |
|
cv XAVSPE(I) = XAVSPE(I) - 2.64e-4/4.5*BMAGNET(2) |
264 |
|
cv ENDIF |
265 |
|
cv ENDIF |
266 |
ENDDO |
ENDDO |
267 |
|
|
268 |
* |
* |
269 |
* Loop on the hits retrived to fill the CWN common and the DIGI b |
* Loop on the hits retrived to fill the CWN common and the DIGI b |
270 |
* |
* |