1 |
* |
* |
2 |
* $Id: gpdspe.F,v 3.3 2005/12/05 12:15:21 pam-ba Exp $ |
* $Id: gpdspe.F,v 3.9 2006/05/02 12:00:24 bottai Exp $ |
3 |
* |
* |
4 |
* $Log: gpdspe.F,v $ |
* $Log: gpdspe.F,v $ |
5 |
|
* Revision 3.9 2006/05/02 12:00:24 bottai |
6 |
|
* call gpucollection for strip simulation, condition on FFIELD repositioned |
7 |
|
* |
8 |
|
* Revision 3.8 2006/04/09 23:29:19 cafagna |
9 |
|
* Several new things, among this: ND and CARD |
10 |
|
* |
11 |
|
* Revision 3.7 2006/02/07 11:38:52 bottai |
12 |
|
* test of mail delivery |
13 |
|
* |
14 |
|
* Revision 3.6 2006/02/06 14:17:21 bottai |
15 |
|
* adapt again the resolution simulation to the ITRPB volume identification |
16 |
|
* |
17 |
|
* Revision 3.5 2006/01/24 13:52:01 bottai |
18 |
|
* prepare to store the x and y multiplicity of the hit |
19 |
|
* |
20 |
|
* Revision 3.4 2006/01/18 09:41:33 bottai |
21 |
|
* Some correction to the spe plane ID due to the new geometry tree |
22 |
|
* |
23 |
* Revision 3.3 2005/12/05 12:15:21 pam-ba |
* Revision 3.3 2005/12/05 12:15:21 pam-ba |
24 |
* new spectrometer geometry and internal magnetic field |
* new spectrometer geometry and internal magnetic field |
25 |
* |
* |
37 |
*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 |
38 |
*-- Author : Francesco Cafagna 23/02/96 |
*-- Author : Francesco Cafagna 23/02/96 |
39 |
SUBROUTINE GPDSPE |
SUBROUTINE GPDSPE |
40 |
************************************************************************ |
************************************************************************* |
41 |
* * |
* * |
42 |
* To perform SPE digitization * |
* To perform SPE digitization * |
43 |
* * |
* * |
44 |
* Called by: GUDIGI * |
* Called by: GUDIGI * |
45 |
* Author: Francesco Cafagna, 23/02/96 12.50.38 * |
* Author: Francesco Cafagna, 23/02/96 12.50.38 * |
46 |
* * |
* * |
47 |
************************************************************************ |
************************************************************************* |
48 |
#include "gcunit.inc" |
#include "gcunit.inc" |
49 |
#include "gpphit.inc" |
#include "gpphit.inc" |
50 |
PARAMETER (RADDEG=57.295779) |
PARAMETER (RADDEG=57.295779) |
54 |
#include "gprhit.inc" |
#include "gprhit.inc" |
55 |
#include "gpspe.inc" |
#include "gpspe.inc" |
56 |
#include "gpsed.inc" |
#include "gpsed.inc" |
57 |
|
#include "gpkey.inc" |
58 |
|
*et. 04/11/2005 |
59 |
|
#include "gpstripspe.inc" |
60 |
|
*end et. |
61 |
* |
* |
62 |
INTEGER IS,ID,NV,NVM,GPNHIT,NTHIT,NHFRST |
INTEGER IS,ID,NV,NVM,GPNHIT,NTHIT,NHFRST |
63 |
CHARACTER*4 CSET |
CHARACTER*4 CSET |
71 |
REAL VPOS(3),BMAGNET(3),ANGLEX,ANGLEY,XMULT,YMULT,DXPOS,DYPOS |
REAL VPOS(3),BMAGNET(3),ANGLEX,ANGLEY,XMULT,YMULT,DXPOS,DYPOS |
72 |
* |
* |
73 |
DATA NTRA,LTRA/1,1/ |
DATA NTRA,LTRA/1,1/ |
74 |
|
|
75 |
|
*et. 04/11/2005 |
76 |
|
* |
77 |
|
* |
78 |
|
* Vector zeroed |
79 |
|
* |
80 |
|
CALL VZERO(ISTRIPX,MAXSTR) |
81 |
|
CALL VZERO(NPSTRIPX,MAXSTR) |
82 |
|
CALL VZERO(NTSTRIPX,MAXSTR) |
83 |
|
CALL VZERO(QSTRIPX,MAXSTR) |
84 |
|
CALL VZERO(XSTRIPX,MAXSTR) |
85 |
|
CALL VZERO(ISTRIPY,MAXSTR) |
86 |
|
CALL VZERO(NPSTRIPY,MAXSTR) |
87 |
|
CALL VZERO(NTSTRIPY,MAXSTR) |
88 |
|
CALL VZERO(QSTRIPY,MAXSTR) |
89 |
|
CALL VZERO(YSTRIPY,MAXSTR) |
90 |
|
NSTRPX=0 |
91 |
|
NSTRPY=0 |
92 |
|
|
93 |
|
* |
94 |
|
|
95 |
|
do ip=1,nplanes |
96 |
|
do iip=1,nsensors |
97 |
|
isignyesx=0 |
98 |
|
isignyesy=0 |
99 |
|
do iiip=1,nstripx |
100 |
|
if(proxtanti(ip,iip,iiip).gt.0) then |
101 |
|
isignyesx=1 |
102 |
|
GO TO 456 |
103 |
|
endif |
104 |
|
enddo |
105 |
|
do iiip=1,nstripy |
106 |
|
if(proytanti(ip,iip,iiip).gt.0) then |
107 |
|
isignyesy=1 |
108 |
|
GO TO 456 |
109 |
|
endif |
110 |
|
enddo |
111 |
|
456 if(isignyesx.eq.1.or.isignyesy.eq.1) then |
112 |
|
call gpucollection(ip,iip) |
113 |
|
endif |
114 |
|
enddo |
115 |
|
enddo |
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
* |
* |
121 |
* |
* |
122 |
* Vector zeroed |
* Vector zeroed |
124 |
CALL VZERO(ITRPB ,NHM) |
CALL VZERO(ITRPB ,NHM) |
125 |
CALL VZERO(ITRSL ,NHM) |
CALL VZERO(ITRSL ,NHM) |
126 |
CALL VZERO(ITSPA ,NHM) |
CALL VZERO(ITSPA ,NHM) |
127 |
|
CALL VZERO(NXMULT ,NHM) |
128 |
|
CALL VZERO(NYMULT ,NHM) |
129 |
CALL VZERO(XTSPA,NHM) |
CALL VZERO(XTSPA,NHM) |
130 |
CALL VZERO(YTSPA,NHM) |
CALL VZERO(YTSPA,NHM) |
131 |
CALL VZERO(ZTSPA,NHM) |
CALL VZERO(ZTSPA,NHM) |
216 |
PATHSPE(I) = VHITS(8,I) |
PATHSPE(I) = VHITS(8,I) |
217 |
IPARSPE(I) = VHITS(9,I) |
IPARSPE(I) = VHITS(9,I) |
218 |
P0SPE (I) = VHITS(10,I) |
P0SPE (I) = VHITS(10,I) |
219 |
|
|
220 |
C |
C |
221 |
C ADD RESOLUTION SIMULATION TO XAVSPE |
C ADD RESOLUTION SIMULATION TO XAVSPE |
222 |
C |
C |
223 |
ANGLEX=0. |
ANGLEX=0. |
224 |
ANGLEY=0. |
ANGLEY=0. |
225 |
IF(ZOUTSPE(I).NE.ZINSPE(I)) THEN |
IF(ZOUTSPE(I).NE.ZINSPE(I)) THEN |
226 |
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE(I)-XINSPE(I) )/ |
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE(I)-XINSPE(I) )/ |
227 |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
228 |
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE(I)-YINSPE(I) )/ |
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE(I)-YINSPE(I) )/ |
229 |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
230 |
ENDIF |
ENDIF |
231 |
|
|
232 |
VPOS(1)=XAVSPE(I) |
VPOS(1)=XAVSPE(I) |
233 |
VPOS(2)=YAVSPE(I) |
VPOS(2)=YAVSPE(I) |
234 |
VPOS(3)=ZAVSPE(I) |
VPOS(3)=ZAVSPE(I) |
235 |
CALL GUFLD(VPOS,BMAGNET) |
CALL GUFLD(VPOS,BMAGNET) |
236 |
|
|
237 |
|
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
238 |
|
|
239 |
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
NXMULT(I)=INT(XMULT) |
240 |
|
NYMULT(I)=INT(YMULT) |
241 |
XAVSPE(I) = XAVSPE(I) + DXPOS |
|
242 |
YAVSPE(I) = YAVSPE(I) + DYPOS |
XAVSPE(I) = XAVSPE(I) + DXPOS |
243 |
|
YAVSPE(I) = YAVSPE(I) + DYPOS |
244 |
|
|
245 |
C |
C |
246 |
C ADD THE SHIFT INDUCED BY THE MAG. FIELD |
C ADD THE SHIFT INDUCED BY THE MAG. FIELD |
247 |
C |
C |
248 |
|
cv |
249 |
IF(ITRPB(I).EQ.1) THEN |
cv 8/05/2007 not anymore needed since the effect is corrected in reco |
250 |
XAVSPE(I) = XAVSPE(I) - 2.64e-4/4.5*BMAGNET(2) |
cv before calculating the positions for fit |
251 |
ELSE IF(ITRPB(I).EQ.2) THEN |
cv |
252 |
XAVSPE(I) = XAVSPE(I) + 2.64e-4/4.5*BMAGNET(2) |
cv IF(FFIELD.NE.0) THEN |
253 |
ENDIF |
cv |
254 |
|
cv IF(ITRPB(I).LT.6) THEN |
255 |
|
cv XAVSPE(I) = XAVSPE(I) + 2.64e-4/4.5*BMAGNET(2) |
256 |
|
cv ELSE IF(ITRPB(I).EQ.6) THEN |
257 |
|
cv XAVSPE(I) = XAVSPE(I) - 2.64e-4/4.5*BMAGNET(2) |
258 |
|
cv ENDIF |
259 |
|
cv ENDIF |
260 |
ENDDO |
ENDDO |
261 |
|
|
262 |
* |
* |
263 |
* 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 |
264 |
* |
* |