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

Legend:
Removed from v.3.1  
changed lines
  Added in v.3.6

  ViewVC Help
Powered by ViewVC 1.1.23