1 |
* |
* |
2 |
* $Id: gpdspe.F,v 3.1.1.1 2002/07/11 16:02:13 cafagna Exp $ |
* $Id: gpdspe.F,v 3.3 2005/12/05 12:15:21 pam-ba Exp $ |
3 |
* |
* |
4 |
* $Log: gpdspe.F,v $ |
* $Log: gpdspe.F,v $ |
5 |
|
* Revision 3.3 2005/12/05 12:15:21 pam-ba |
6 |
|
* new spectrometer geometry and internal magnetic field |
7 |
|
* |
8 |
|
* Revision 3.2 2005/07/25 11:53:21 cafagna |
9 |
|
* Several updates. See history for details |
10 |
|
* |
11 |
* Revision 3.1.1.1 2002/07/11 16:02:13 cafagna |
* Revision 3.1.1.1 2002/07/11 16:02:13 cafagna |
12 |
* First GPAMELA release on CVS |
* First GPAMELA release on CVS |
13 |
* |
* |
29 |
************************************************************************ |
************************************************************************ |
30 |
#include "gcunit.inc" |
#include "gcunit.inc" |
31 |
#include "gpphit.inc" |
#include "gpphit.inc" |
32 |
|
PARAMETER (RADDEG=57.295779) |
33 |
PARAMETER (NH=NHSPE,NHM=NHMSPE,NVOL=3) |
PARAMETER (NH=NHSPE,NHM=NHMSPE,NVOL=3) |
34 |
#include "gppdigi.inc" |
#include "gppdigi.inc" |
35 |
c +SEQ,GPDSPE. |
c +SEQ,GPDSPE. |
46 |
INTEGER NTRA,IDIG,LTRA,NPLANE,LKDN,NTDIGI,JJ |
INTEGER NTRA,IDIG,LTRA,NPLANE,LKDN,NTDIGI,JJ |
47 |
INTEGER KDIGI(4),NUMBVD(NVOL) |
INTEGER KDIGI(4),NUMBVD(NVOL) |
48 |
REAL XI,YI,XO,YO,PATH,DE,GPGAUS |
REAL XI,YI,XO,YO,PATH,DE,GPGAUS |
49 |
|
REAL VPOS(3),BMAGNET(3),ANGLEX,ANGLEY,XMULT,YMULT,DXPOS,DYPOS |
50 |
* |
* |
51 |
DATA NTRA,LTRA/1,1/ |
DATA NTRA,LTRA/1,1/ |
52 |
* |
* |
146 |
PATHSPE(I) = VHITS(8,I) |
PATHSPE(I) = VHITS(8,I) |
147 |
IPARSPE(I) = VHITS(9,I) |
IPARSPE(I) = VHITS(9,I) |
148 |
P0SPE (I) = VHITS(10,I) |
P0SPE (I) = VHITS(10,I) |
149 |
|
C |
150 |
|
C ADD RESOLUTION SIMULATION TO XAVSPE |
151 |
|
C |
152 |
|
ANGLEX=0. |
153 |
|
ANGLEY=0. |
154 |
|
IF(ZOUTSPE(I).NE.ZINSPE(I)) THEN |
155 |
|
ANGLEX=RADDEG*ATAN( ABS(XOUTSPE(I)-XINSPE(I) )/ |
156 |
|
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
157 |
|
ANGLEY=RADDEG*ATAN( ABS(YOUTSPE(I)-YINSPE(I) )/ |
158 |
|
+ ABS(ZOUTSPE(I)-ZINSPE(I) ) ) |
159 |
|
ENDIF |
160 |
|
VPOS(1)=XAVSPE(I) |
161 |
|
VPOS(2)=YAVSPE(I) |
162 |
|
VPOS(3)=ZAVSPE(I) |
163 |
|
CALL GUFLD(VPOS,BMAGNET) |
164 |
|
|
165 |
|
CALL GPRSPE(ANGLEX,ANGLEY,BMAGNET,XMULT,YMULT,DXPOS,DYPOS) |
166 |
|
|
167 |
|
XAVSPE(I) = XAVSPE(I) + DXPOS |
168 |
|
YAVSPE(I) = YAVSPE(I) + DYPOS |
169 |
|
|
170 |
|
C |
171 |
|
C ADD THE SHIFT INDUCED BY THE MAG. FIELD |
172 |
|
C |
173 |
|
|
174 |
|
IF(ITRPB(I).EQ.1) THEN |
175 |
|
XAVSPE(I) = XAVSPE(I) - 2.64e-4/4.5*BMAGNET(2) |
176 |
|
ELSE IF(ITRPB(I).EQ.2) THEN |
177 |
|
XAVSPE(I) = XAVSPE(I) + 2.64e-4/4.5*BMAGNET(2) |
178 |
|
ENDIF |
179 |
|
|
180 |
ENDDO |
ENDDO |
181 |
* |
* |
182 |
* 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 |
183 |
* |
* |
184 |
C fc IF (HF) NTHSPE = NHITS |
C fc IF (HF) NTHSPE = NHITS |
185 |
C fc DO I=1,NHITS |
C fc DO I=1,NHITS |