1 |
* |
* |
2 |
* $Id$ |
* $Id: gpdspe.F,v 3.7 2006/02/07 11:38:52 bottai Exp $ |
3 |
|
* |
4 |
|
* $Log: gpdspe.F,v $ |
5 |
|
* Revision 3.7 2006/02/07 11:38:52 bottai |
6 |
|
* test of mail delivery |
7 |
|
* |
8 |
|
* Revision 3.6 2006/02/06 14:17:21 bottai |
9 |
|
* adapt again the resolution simulation to the ITRPB volume identification |
10 |
|
* |
11 |
|
* Revision 3.5 2006/01/24 13:52:01 bottai |
12 |
|
* prepare to store the x and y multiplicity of the hit |
13 |
|
* |
14 |
|
* Revision 3.4 2006/01/18 09:41:33 bottai |
15 |
|
* Some correction to the spe plane ID due to the new geometry tree |
16 |
|
* |
17 |
|
* Revision 3.3 2005/12/05 12:15:21 pam-ba |
18 |
|
* new spectrometer geometry and internal magnetic field |
19 |
|
* |
20 |
|
* Revision 3.2 2005/07/25 11:53:21 cafagna |
21 |
|
* Several updates. See history for details |
22 |
|
* |
23 |
|
* Revision 3.1.1.1 2002/07/11 16:02:13 cafagna |
24 |
|
* First GPAMELA release on CVS |
25 |
* |
* |
|
* $Log$ |
|
26 |
* |
* |
27 |
*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 |
28 |
*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 |
31 |
*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 |
32 |
*-- Author : Francesco Cafagna 23/02/96 |
*-- Author : Francesco Cafagna 23/02/96 |
33 |
SUBROUTINE GPDSPE |
SUBROUTINE GPDSPE |
34 |
************************************************************************ |
************************************************************************* |
35 |
* * |
* * |
36 |
* To perform SPE digitization * |
* To perform SPE digitization * |
37 |
* * |
* * |
38 |
* Called by: GUDIGI * |
* Called by: GUDIGI * |
39 |
* Author: Francesco Cafagna, 23/02/96 12.50.38 * |
* Author: Francesco Cafagna, 23/02/96 12.50.38 * |
40 |
* * |
* * |
41 |
************************************************************************ |
************************************************************************* |
42 |
#include "gcunit.inc" |
#include "gcunit.inc" |
43 |
#include "gpphit.inc" |
#include "gpphit.inc" |
44 |
PARAMETER (NH=NHSPE,NHM=NHMSPE,NVOL=4) |
PARAMETER (RADDEG=57.295779) |
45 |
|
PARAMETER (NH=NHSPE,NHM=NHMSPE,NVOL=3) |
46 |
#include "gppdigi.inc" |
#include "gppdigi.inc" |
47 |
c +SEQ,GPDSPE. |
c +SEQ,GPDSPE. |
48 |
#include "gprhit.inc" |
#include "gprhit.inc" |
49 |
#include "gpspe.inc" |
#include "gpspe.inc" |
50 |
#include "gpsed.inc" |
#include "gpsed.inc" |
51 |
|
#include "gpkey.inc" |
52 |
* |
* |
53 |
INTEGER IS,ID,NV,NVM,GPNHIT,NTHIT,NHFRST |
INTEGER IS,ID,NV,NVM,GPNHIT,NTHIT,NHFRST |
54 |
CHARACTER*4 CSET |
CHARACTER*4 CSET |
59 |
INTEGER NTRA,IDIG,LTRA,NPLANE,LKDN,NTDIGI,JJ |
INTEGER NTRA,IDIG,LTRA,NPLANE,LKDN,NTDIGI,JJ |
60 |
INTEGER KDIGI(4),NUMBVD(NVOL) |
INTEGER KDIGI(4),NUMBVD(NVOL) |
61 |
REAL XI,YI,XO,YO,PATH,DE,GPGAUS |
REAL XI,YI,XO,YO,PATH,DE,GPGAUS |
62 |
|
REAL VPOS(3),BMAGNET(3),ANGLEX,ANGLEY,XMULT,YMULT,DXPOS,DYPOS |
63 |
* |
* |
64 |
DATA NTRA,LTRA/1,1/ |
DATA NTRA,LTRA/1,1/ |
65 |
* |
* |
131 |
NTHSPE = NHITS |
NTHSPE = NHITS |
132 |
DO I=1,NHITS |
DO I=1,NHITS |
133 |
ITRPB(I) = NUMBV(1,I) |
ITRPB(I) = NUMBV(1,I) |
134 |
ITRSL(I) = NUMBV(3,I) |
ITRSL(I) = NUMBV(2,I) |
135 |
ITSPA(I) = NUMBV(4,I) |
ITSPA(I) = NUMBV(3,I) |
136 |
#if defined(GPAMELA_INTER) |
#if defined(GPAMELA_INTER) |
137 |
XAVSPE(I) = VHITS(1,I) |
XAVSPE(I) = VHITS(1,I) |
138 |
YAVSPE(I) = VHITS(2,I) |
YAVSPE(I) = VHITS(2,I) |
159 |
PATHSPE(I) = VHITS(8,I) |
PATHSPE(I) = VHITS(8,I) |
160 |
IPARSPE(I) = VHITS(9,I) |
IPARSPE(I) = VHITS(9,I) |
161 |
P0SPE (I) = VHITS(10,I) |
P0SPE (I) = VHITS(10,I) |
162 |
|
IF(FFIELD.NE.0) THEN |
163 |
|
C |
164 |
|
C ADD RESOLUTION SIMULATION TO XAVSPE |
165 |
|
C |
166 |
|
ANGLEX=0. |
167 |
|
ANGLEY=0. |
168 |
|
IF(ZOUTSPE(I).NE.ZINSPE(I)) THEN |
169 |
|
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE(I)-XINSPE(I) )/ |
170 |
|
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
171 |
|
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE(I)-YINSPE(I) )/ |
172 |
|
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
173 |
|
ENDIF |
174 |
|
|
175 |
|
VPOS(1)=XAVSPE(I) |
176 |
|
VPOS(2)=YAVSPE(I) |
177 |
|
VPOS(3)=ZAVSPE(I) |
178 |
|
CALL GUFLD(VPOS,BMAGNET) |
179 |
|
|
180 |
|
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
181 |
|
|
182 |
|
NXMULT(I)=INT(XMULT) |
183 |
|
NYMULT(I)=INT(YMULT) |
184 |
|
|
185 |
|
XAVSPE(I) = XAVSPE(I) + DXPOS |
186 |
|
YAVSPE(I) = YAVSPE(I) + DYPOS |
187 |
|
|
188 |
|
C |
189 |
|
C ADD THE SHIFT INDUCED BY THE MAG. FIELD |
190 |
|
C |
191 |
|
|
192 |
|
IF(ITRPB(I).LT.6) THEN |
193 |
|
XAVSPE(I) = XAVSPE(I) - 2.64e-4/4.5*BMAGNET(2) |
194 |
|
ELSE IF(ITRPB(I).EQ.6) THEN |
195 |
|
XAVSPE(I) = XAVSPE(I) + 2.64e-4/4.5*BMAGNET(2) |
196 |
|
ENDIF |
197 |
|
ENDIF |
198 |
ENDDO |
ENDDO |
199 |
|
|
200 |
* |
* |
201 |
* 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 |
202 |
* |
* |
203 |
C fc IF (HF) NTHSPE = NHITS |
C fc IF (HF) NTHSPE = NHITS |
204 |
C fc DO I=1,NHITS |
C fc DO I=1,NHITS |