1 |
* |
* |
2 |
* $Id$ |
* $Id: gpdspe.F,v 3.4 2006/01/18 09:41:33 bottai Exp $ |
3 |
|
* |
4 |
|
* $Log: gpdspe.F,v $ |
5 |
|
* Revision 3.4 2006/01/18 09:41:33 bottai |
6 |
|
* Some correction to the spe plane ID due to the new geometry tree |
7 |
|
* |
8 |
|
* Revision 3.3 2005/12/05 12:15:21 pam-ba |
9 |
|
* new spectrometer geometry and internal magnetic field |
10 |
|
* |
11 |
|
* Revision 3.2 2005/07/25 11:53:21 cafagna |
12 |
|
* Several updates. See history for details |
13 |
|
* |
14 |
|
* Revision 3.1.1.1 2002/07/11 16:02:13 cafagna |
15 |
|
* First GPAMELA release on CVS |
16 |
* |
* |
|
* $Log$ |
|
17 |
* |
* |
18 |
*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 |
19 |
*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 |
32 |
************************************************************************ |
************************************************************************ |
33 |
#include "gcunit.inc" |
#include "gcunit.inc" |
34 |
#include "gpphit.inc" |
#include "gpphit.inc" |
35 |
PARAMETER (NH=NHSPE,NHM=NHMSPE,NVOL=4) |
PARAMETER (RADDEG=57.295779) |
36 |
|
PARAMETER (NH=NHSPE,NHM=NHMSPE,NVOL=3) |
37 |
#include "gppdigi.inc" |
#include "gppdigi.inc" |
38 |
c +SEQ,GPDSPE. |
c +SEQ,GPDSPE. |
39 |
#include "gprhit.inc" |
#include "gprhit.inc" |
49 |
INTEGER NTRA,IDIG,LTRA,NPLANE,LKDN,NTDIGI,JJ |
INTEGER NTRA,IDIG,LTRA,NPLANE,LKDN,NTDIGI,JJ |
50 |
INTEGER KDIGI(4),NUMBVD(NVOL) |
INTEGER KDIGI(4),NUMBVD(NVOL) |
51 |
REAL XI,YI,XO,YO,PATH,DE,GPGAUS |
REAL XI,YI,XO,YO,PATH,DE,GPGAUS |
52 |
|
REAL VPOS(3),BMAGNET(3),ANGLEX,ANGLEY,XMULT,YMULT,DXPOS,DYPOS |
53 |
* |
* |
54 |
DATA NTRA,LTRA/1,1/ |
DATA NTRA,LTRA/1,1/ |
55 |
* |
* |
121 |
NTHSPE = NHITS |
NTHSPE = NHITS |
122 |
DO I=1,NHITS |
DO I=1,NHITS |
123 |
ITRPB(I) = NUMBV(1,I) |
ITRPB(I) = NUMBV(1,I) |
124 |
ITRSL(I) = NUMBV(3,I) |
ITRSL(I) = NUMBV(2,I) |
125 |
ITSPA(I) = NUMBV(4,I) |
ITSPA(I) = NUMBV(3,I) |
126 |
#if defined(GPAMELA_INTER) |
#if defined(GPAMELA_INTER) |
127 |
XAVSPE(I) = VHITS(1,I) |
XAVSPE(I) = VHITS(1,I) |
128 |
YAVSPE(I) = VHITS(2,I) |
YAVSPE(I) = VHITS(2,I) |
149 |
PATHSPE(I) = VHITS(8,I) |
PATHSPE(I) = VHITS(8,I) |
150 |
IPARSPE(I) = VHITS(9,I) |
IPARSPE(I) = VHITS(9,I) |
151 |
P0SPE (I) = VHITS(10,I) |
P0SPE (I) = VHITS(10,I) |
152 |
|
C |
153 |
|
C ADD RESOLUTION SIMULATION TO XAVSPE |
154 |
|
C |
155 |
|
ANGLEX=0. |
156 |
|
ANGLEY=0. |
157 |
|
IF(ZOUTSPE(I).NE.ZINSPE(I)) THEN |
158 |
|
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE(I)-XINSPE(I) )/ |
159 |
|
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
160 |
|
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE(I)-YINSPE(I) )/ |
161 |
|
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
162 |
|
ENDIF |
163 |
|
VPOS(1)=XAVSPE(I) |
164 |
|
VPOS(2)=YAVSPE(I) |
165 |
|
VPOS(3)=ZAVSPE(I) |
166 |
|
CALL GUFLD(VPOS,BMAGNET) |
167 |
|
|
168 |
|
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
169 |
|
|
170 |
|
NXMULT(I)=INT(XMULT) |
171 |
|
NYMULT(I)=INT(YMULT) |
172 |
|
|
173 |
|
XAVSPE(I) = XAVSPE(I) + DXPOS |
174 |
|
YAVSPE(I) = YAVSPE(I) + DYPOS |
175 |
|
|
176 |
|
C |
177 |
|
C ADD THE SHIFT INDUCED BY THE MAG. FIELD |
178 |
|
C |
179 |
|
|
180 |
|
IF(ITRPB(I).EQ.1) THEN |
181 |
|
XAVSPE(I) = XAVSPE(I) - 2.64e-4/4.5*BMAGNET(2) |
182 |
|
ELSE IF(ITRPB(I).EQ.2) THEN |
183 |
|
XAVSPE(I) = XAVSPE(I) + 2.64e-4/4.5*BMAGNET(2) |
184 |
|
ENDIF |
185 |
|
|
186 |
ENDDO |
ENDDO |
187 |
* |
* |
188 |
* 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 |
189 |
* |
* |
190 |
C fc IF (HF) NTHSPE = NHITS |
C fc IF (HF) NTHSPE = NHITS |
191 |
C fc DO I=1,NHITS |
C fc DO I=1,NHITS |