1 |
* |
* |
2 |
* $Id: gpdspe.F,v 3.1.1.1 2002/07/11 16:02:13 cafagna 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 |
9 |
|
* test of mail delivery |
10 |
|
* |
11 |
|
* Revision 3.6 2006/02/06 14:17:21 bottai |
12 |
|
* adapt again the resolution simulation to the ITRPB volume identification |
13 |
|
* |
14 |
|
* Revision 3.5 2006/01/24 13:52:01 bottai |
15 |
|
* prepare to store the x and y multiplicity of the hit |
16 |
|
* |
17 |
|
* Revision 3.4 2006/01/18 09:41:33 bottai |
18 |
|
* Some correction to the spe plane ID due to the new geometry tree |
19 |
|
* |
20 |
|
* Revision 3.3 2005/12/05 12:15:21 pam-ba |
21 |
|
* new spectrometer geometry and internal magnetic field |
22 |
|
* |
23 |
|
* Revision 3.2 2005/07/25 11:53:21 cafagna |
24 |
|
* Several updates. See history for details |
25 |
|
* |
26 |
* Revision 3.1.1.1 2002/07/11 16:02:13 cafagna |
* Revision 3.1.1.1 2002/07/11 16:02:13 cafagna |
27 |
* First GPAMELA release on CVS |
* First GPAMELA release on CVS |
28 |
* |
* |
34 |
*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 |
35 |
*-- Author : Francesco Cafagna 23/02/96 |
*-- Author : Francesco Cafagna 23/02/96 |
36 |
SUBROUTINE GPDSPE |
SUBROUTINE GPDSPE |
37 |
************************************************************************ |
************************************************************************* |
38 |
* * |
* * |
39 |
* To perform SPE digitization * |
* To perform SPE digitization * |
40 |
* * |
* * |
41 |
* Called by: GUDIGI * |
* Called by: GUDIGI * |
42 |
* Author: Francesco Cafagna, 23/02/96 12.50.38 * |
* Author: Francesco Cafagna, 23/02/96 12.50.38 * |
43 |
* * |
* * |
44 |
************************************************************************ |
************************************************************************* |
45 |
#include "gcunit.inc" |
#include "gcunit.inc" |
46 |
#include "gpphit.inc" |
#include "gpphit.inc" |
47 |
|
PARAMETER (RADDEG=57.295779) |
48 |
PARAMETER (NH=NHSPE,NHM=NHMSPE,NVOL=3) |
PARAMETER (NH=NHSPE,NHM=NHMSPE,NVOL=3) |
49 |
#include "gppdigi.inc" |
#include "gppdigi.inc" |
50 |
c +SEQ,GPDSPE. |
c +SEQ,GPDSPE. |
51 |
#include "gprhit.inc" |
#include "gprhit.inc" |
52 |
#include "gpspe.inc" |
#include "gpspe.inc" |
53 |
#include "gpsed.inc" |
#include "gpsed.inc" |
54 |
|
#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 |
65 |
INTEGER NTRA,IDIG,LTRA,NPLANE,LKDN,NTDIGI,JJ |
INTEGER NTRA,IDIG,LTRA,NPLANE,LKDN,NTDIGI,JJ |
66 |
INTEGER KDIGI(4),NUMBVD(NVOL) |
INTEGER KDIGI(4),NUMBVD(NVOL) |
67 |
REAL XI,YI,XO,YO,PATH,DE,GPGAUS |
REAL XI,YI,XO,YO,PATH,DE,GPGAUS |
68 |
|
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 |
|
|
217 |
|
C |
218 |
|
C ADD RESOLUTION SIMULATION TO XAVSPE |
219 |
|
C |
220 |
|
ANGLEX=0. |
221 |
|
ANGLEY=0. |
222 |
|
IF(ZOUTSPE(I).NE.ZINSPE(I)) THEN |
223 |
|
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE(I)-XINSPE(I) )/ |
224 |
|
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
225 |
|
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE(I)-YINSPE(I) )/ |
226 |
|
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
227 |
|
ENDIF |
228 |
|
|
229 |
|
VPOS(1)=XAVSPE(I) |
230 |
|
VPOS(2)=YAVSPE(I) |
231 |
|
VPOS(3)=ZAVSPE(I) |
232 |
|
CALL GUFLD(VPOS,BMAGNET) |
233 |
|
|
234 |
|
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
235 |
|
|
236 |
|
NXMULT(I)=INT(XMULT) |
237 |
|
NYMULT(I)=INT(YMULT) |
238 |
|
|
239 |
|
XAVSPE(I) = XAVSPE(I) + DXPOS |
240 |
|
YAVSPE(I) = YAVSPE(I) + DYPOS |
241 |
|
|
242 |
|
C |
243 |
|
C ADD THE SHIFT INDUCED BY THE MAG. FIELD |
244 |
|
C |
245 |
|
IF(FFIELD.NE.0) THEN |
246 |
|
|
247 |
|
IF(ITRPB(I).LT.6) THEN |
248 |
|
XAVSPE(I) = XAVSPE(I) - 2.64e-4/4.5*BMAGNET(2) |
249 |
|
ELSE IF(ITRPB(I).EQ.6) THEN |
250 |
|
XAVSPE(I) = XAVSPE(I) + 2.64e-4/4.5*BMAGNET(2) |
251 |
|
ENDIF |
252 |
|
ENDIF |
253 |
ENDDO |
ENDDO |
254 |
|
|
255 |
* |
* |
256 |
* Loop on the hits retrived to fill the CWN common and the DIGI bank |
* Loop on the hits retrived to fill the CWN common and the DIGI b |
257 |
* |
* |
258 |
C fc IF (HF) NTHSPE = NHITS |
C fc IF (HF) NTHSPE = NHITS |
259 |
C fc DO I=1,NHITS |
C fc DO I=1,NHITS |