1 |
* |
* |
2 |
* $Id$ |
* $Id: gpdspe.F,v 3.10 2007/05/08 15:05:18 bottai Exp $ |
3 |
|
* |
4 |
|
* $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 |
22 |
|
* prepare to store the x and y multiplicity of the hit |
23 |
|
* |
24 |
|
* Revision 3.4 2006/01/18 09:41:33 bottai |
25 |
|
* Some correction to the spe plane ID due to the new geometry tree |
26 |
|
* |
27 |
|
* Revision 3.3 2005/12/05 12:15:21 pam-ba |
28 |
|
* new spectrometer geometry and internal magnetic field |
29 |
|
* |
30 |
|
* Revision 3.2 2005/07/25 11:53:21 cafagna |
31 |
|
* Several updates. See history for details |
32 |
|
* |
33 |
|
* Revision 3.1.1.1 2002/07/11 16:02:13 cafagna |
34 |
|
* First GPAMELA release on CVS |
35 |
* |
* |
|
* $Log$ |
|
36 |
* |
* |
37 |
*CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola |
*CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola |
38 |
*CMZ : 2.00/00 03/03/2000 15.39.06 by Francesco Cafagna |
*CMZ : 2.00/00 03/03/2000 15.39.06 by Francesco Cafagna |
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 (NH=NHSPE,NHM=NHMSPE,NVOL=4) |
PARAMETER (RADDEG=57.295779) |
55 |
|
PARAMETER (NH=NHSPE,NHM=NHMSPE,NVOL=3) |
56 |
#include "gppdigi.inc" |
#include "gppdigi.inc" |
57 |
c +SEQ,GPDSPE. |
c +SEQ,GPDSPE. |
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 |
72 |
INTEGER NTRA,IDIG,LTRA,NPLANE,LKDN,NTDIGI,JJ |
INTEGER NTRA,IDIG,LTRA,NPLANE,LKDN,NTDIGI,JJ |
73 |
INTEGER KDIGI(4),NUMBVD(NVOL) |
INTEGER KDIGI(4),NUMBVD(NVOL) |
74 |
REAL XI,YI,XO,YO,PATH,DE,GPGAUS |
REAL XI,YI,XO,YO,PATH,DE,GPGAUS |
75 |
|
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(3,I) |
NUMSENS=NUMBV(2,I)-(NSPEPLANE-1)*6 |
196 |
ITSPA(I) = NUMBV(4,I) |
ITRPB(I) = NSPEPLANE |
197 |
|
ITRSL(I) = NUMSENS |
198 |
|
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) |
201 |
YAVSPE(I) = VHITS(2,I) |
YAVSPE(I) = VHITS(2,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 |
227 |
|
C ADD RESOLUTION SIMULATION TO XAVSPE |
228 |
|
C |
229 |
|
ANGLEX=0. |
230 |
|
ANGLEY=0. |
231 |
|
IF(ZOUTSPE(I).NE.ZINSPE(I)) THEN |
232 |
|
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE(I)-XINSPE(I) )/ |
233 |
|
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
234 |
|
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE(I)-YINSPE(I) )/ |
235 |
|
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
236 |
|
ENDIF |
237 |
|
|
238 |
|
VPOS(1)=XAVSPE(I) |
239 |
|
VPOS(2)=YAVSPE(I) |
240 |
|
VPOS(3)=ZAVSPE(I) |
241 |
|
CALL GUFLD(VPOS,BMAGNET) |
242 |
|
|
243 |
|
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
244 |
|
|
245 |
|
NXMULT(I)=INT(XMULT) |
246 |
|
NYMULT(I)=INT(YMULT) |
247 |
|
|
248 |
|
XAVSPE(I) = XAVSPE(I) + DXPOS |
249 |
|
YAVSPE(I) = YAVSPE(I) + DYPOS |
250 |
|
|
251 |
|
C |
252 |
|
C ADD THE SHIFT INDUCED BY THE MAG. FIELD |
253 |
|
C |
254 |
|
cv |
255 |
|
cv 8/05/2007 not anymore needed since the effect is corrected in reco |
256 |
|
cv before calculating the positions for fit |
257 |
|
cv |
258 |
|
cv IF(FFIELD.NE.0) THEN |
259 |
|
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 bank |
* Loop on the hits retrived to fill the CWN common and the DIGI b |
270 |
* |
* |
271 |
C fc IF (HF) NTHSPE = NHITS |
C fc IF (HF) NTHSPE = NHITS |
272 |
C fc DO I=1,NHITS |
C fc DO I=1,NHITS |