/[PAMELA software]/gpamela/gpspe/gpdspe.F
ViewVC logotype

Diff of /gpamela/gpspe/gpdspe.F

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3.1.1.1 by cafagna, Thu Jul 11 16:02:13 2002 UTC revision 3.4 by bottai, Wed Jan 18 09:41:33 2006 UTC
# Line 1  Line 1 
1  *  *
2  * $Id$  * $Id: gpdspe.F,v 3.3 2005/12/05 12:15:21 pam-ba Exp $
3    *
4    * $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
12    * First GPAMELA release on CVS
13  *  *
 * $Log$  
14  *  *
15  *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
16  *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
# Line 20  Line 29 
29  ************************************************************************  ************************************************************************
30  #include "gcunit.inc"  #include "gcunit.inc"
31  #include "gpphit.inc"  #include "gpphit.inc"
32        PARAMETER (NH=NHSPE,NHM=NHMSPE,NVOL=4)        PARAMETER (RADDEG=57.295779)
33          PARAMETER (NH=NHSPE,NHM=NHMSPE,NVOL=3)
34  #include "gppdigi.inc"  #include "gppdigi.inc"
35  c +SEQ,GPDSPE.  c +SEQ,GPDSPE.
36  #include "gprhit.inc"  #include "gprhit.inc"
# Line 36  c +SEQ,GPDSPE. Line 46  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  *  *
# Line 107  c +SEQ,GPDSPE. Line 118  c +SEQ,GPDSPE.
118        NTHSPE = NHITS        NTHSPE = NHITS
119        DO I=1,NHITS        DO I=1,NHITS
120           ITRPB(I)   = NUMBV(1,I)           ITRPB(I)   = NUMBV(1,I)
121           ITRSL(I)   = NUMBV(3,I)           ITRSL(I)   = NUMBV(2,I)
122           ITSPA(I)   = NUMBV(4,I)           ITSPA(I)   = NUMBV(3,I)
123  #if defined(GPAMELA_INTER)  #if defined(GPAMELA_INTER)
124           XAVSPE(I) = VHITS(1,I)           XAVSPE(I) = VHITS(1,I)
125           YAVSPE(I) = VHITS(2,I)           YAVSPE(I) = VHITS(2,I)
# Line 135  c +SEQ,GPDSPE. Line 146  c +SEQ,GPDSPE.
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

Legend:
Removed from v.3.1.1.1  
changed lines
  Added in v.3.4

  ViewVC Help
Powered by ViewVC 1.1.23