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

Annotation of /gpamela/gpspe/gpucollection.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.3 - (hide annotations) (download)
Wed Dec 23 13:39:13 2009 UTC (14 years, 11 months ago) by bottai
Branch: MAIN
Changes since 3.2: +2 -1 lines
 New version of strips collection without tails

1 bottai 3.1 *-- Author : Elena Taddei-Sergio Bottai 09/08/2005
2    
3     SUBROUTINE GPUCOLLECTION(np,nt)
4    
5     ***************************************************************************
6     * *
7     * *
8     * *
9     * Here we calculate the signal appearing on each ADC channel *
10     * starting from the charge collected on every strip of the silicon *
11     * sensor. Noise is kept from data of beam test. Capacitive coupling *
12     * between strips and energy to ADC calibration are introduced too. *
13     * *
14     * *
15     * Called by: GPDSPE *
16     * *
17     ***************************************************************************
18    
19     #include "gpstripspe.inc"
20 bottai 3.2 c
21     c eventually to be removed in future version containing the BADVA1 filling
22     c
23     DATA BADVA1/ntotva1*1/
24     c
25     c new strip capacitance simulation 19/02/09 S. Bottai
26     c
27     c
28 bottai 3.1 dimension stripqxtanti(nstripx)
29     dimension stripqytanti(nstripy)
30    
31    
32    
33    
34    
35     ********zeroing**************
36    
37     do i=1,nstripx
38     stripqxtanti(i)=0.
39     enddo
40     do i=1,nstripy
41     stripqytanti(i)=0.
42     enddo
43    
44     ***************************
45     if(NT.eq.1.or.NT.eq.4) LADD=1
46     if(NT.eq.2.or.NT.eq.5) LADD=2
47     if(NT.eq.3.or.NT.eq.6) LADD=3
48    
49     *
50     * Odd strip, X side --> charge shared between adjacent strips
51     * EFFCOUPL --> coupling efficiency (capacitance to backplane =0?)
52     * SHIFTMASK --> asymmetry in charge division on X view
53     * different in each sensor (mask)
54    
55    
56     do j=(1+8),(nstripx-7),2
57     proxtanti(np,nt,j-1)=
58     + proxtanti(np,nt,j-1)+
59     + 0.5*effcoupl*proxtanti(np,nt,j)*(1.-shiftmask)
60    
61     proxtanti(np,nt,j+1)=
62     + proxtanti(np,nt,j+1)+
63     + 0.5*effcoupl*proxtanti(np,nt,j)*(1.+shiftmask)
64     proxtanti(np,nt,j)=0.
65     enddo
66    
67    
68     *
69     * Capacitive coupling: a fraction of the charge arriving at one strip
70     * appears at the output of the neighbouring amplifiers
71     * This fraction is about Cis/Cdec, where Cis is the interstrip
72     * capacitance and Cdec is the decoupling capacitance (see Turchetta)
73     * An algorithm has been chosen that is precise for low values of the
74     * capacitive coupling, i.e. if the INDUCED charge on a given strip
75     * is little compared with the COLLECTED one.
76     *
77    
78    
79     ******************** X side *************************
80    
81     c=cistrx/cdec
82     c2=cistrx2/cdec
83    
84    
85 bottai 3.2 do j=8,nstripx-6,2 ! only even strips on X side
86     CV jm2=1
87     CV IF(j-2.lt.8) jm2=0
88     CV jp2=1
89     CV IF(j+2.gt.(nstripx-6)) jp2=0
90     CV jm4=1
91     CV IF(j-4.lt.8) jm4=0
92     CV jp4=1
93     CV IF(j+4.gt.(nstripx-6)) jp4=0
94    
95    
96     stripqxtanti(j)=proxtanti(np,nt,j)
97     SUMF=0.
98 bottai 3.3 CV DO KK=1,15
99     DO KK=1,4
100 bottai 3.2 KF=KK*2
101     IF(KK.EQ.1) FN=F1
102     IF(KK.EQ.2) FN=F2
103     IF(KK.EQ.3) FN=F3
104     IF(KK.EQ.4) FN=F4
105     IF(KK.GE.5) FN=F1/KK
106     IF((J-KF).GE.8) THEN
107     stripqxtanti(j)=stripqxtanti(j)+FN*proxtanti(np,nt,j-KF)
108     SUMF=SUMF+FN
109     ENDIF
110     IF((J+KF).LE.(nstripx-6)) THEN
111     stripqxtanti(j)=stripqxtanti(j)+FN*proxtanti(np,nt,j+KF)
112     SUMF=SUMF+FN
113     ENDIF
114     ENDDO
115    
116     stripqxtanti(j)=stripqxtanti(j)-SUMF*proxtanti(np,nt,j)
117    
118     cv stripqxtanti(j)=proxtanti(np,nt,j)*(1.-2.*(c+c2))+
119     cv + c*(1.-2.*c)*(jm2*proxtanti(np,nt,j-2)
120     cv + +jp2*proxtanti(np,nt,j+2))+
121     cv + (c**2)*(jm4*proxtanti(np,nt,j-4)*(1.+c2/(c**2))+
122     cv + 2.*proxtanti(np,nt,j)+jp4*proxtanti(np,nt,j+4)*(1.+c2/(c**2)))
123    
124 bottai 3.1
125     if(stripqxtanti(j).gt.1.e-8) then
126 bottai 3.2
127     IVA1=INT((J/2-1)/128)+1
128     IF(badva1(NP*2,LADD,IVA1).EQ.1) THEN
129     NSTRPX=NSTRPX+1
130     floatadcx=stripqxtanti(j)*xcalib
131     IF(NSTRPX.GT.MAXSTR) THEN
132     WRITE(6,*) 'ERROR - NSTRPX > MAXSTR'
133     NSTRPX=MAXSTR
134     ENDIF
135     NPSTRIPX(NSTRPX)=NP
136     NTSTRIPX(NSTRPX)=NT
137     ISTRIPX(NSTRPX)=(J/2)+(LADD-1)*1024
138     QSTRIPX(NSTRPX)=floatadcx
139     XSTRIPX(NSTRPX)=GLOBSTRIPX(NP,NT,J)
140     ENDIF
141    
142 bottai 3.1 endif
143     enddo
144    
145    
146     ******************** Y side *************************
147    
148     c=cistry/cdec
149    
150    
151     do j=1,nstripy
152    
153     jmen1=j-1
154     jm1=1
155     if(jmen1.lt.1) then
156     jm1=0
157     jmen1=1
158     endif
159    
160     jmen2=j-2
161     jm2=1
162     if(jmen2.lt.1) then
163     jm2=0
164     jmen2=1
165     endif
166    
167     jpiu1=j+1
168     jp1=1
169     if(jpiu1.gt.nstripy) then
170     jp1=0
171     jpiu1=nstripy
172     endif
173    
174     jpiu2=j+2
175     jp2=1
176     if(jpiu2.gt.nstripy) then
177     jp2=0
178     jpiu2=nstripy
179     endif
180    
181     stripqytanti(j)=proytanti(np,nt,j)*(1.-2.*c)+
182     + c*(1.-2.*c)*(jm1*proytanti(np,nt,jmen1)+jp1*
183     + proytanti(np,nt,jpiu1))+
184     + (c**2)*(jm2*proytanti(np,nt,jmen2)+2.*proytanti(np,nt,j)+
185     + jp2*proytanti(np,nt,jpiu2))
186    
187     if(stripqytanti(j).gt.1.e-8) then
188 bottai 3.2
189    
190     IVA1=INT((J-1)/128)+1
191     IF(badva1(NP*2-1,LADD,IVA1).EQ.1) THEN
192    
193     NSTRPY=NSTRPY+1
194     IF(NSTRPY.GT.MAXSTR) THEN
195     WRITE(6,*) 'ERROR - NSTRPY > MAXSTR'
196     NSTRPY=MAXSTR
197     ENDIF
198     floatadcy=stripqytanti(j)*ycalib
199     NPSTRIPY(NSTRPY)=NP
200     NTSTRIPY(NSTRPY)=NT
201     ISTRIPY(NSTRPY)=J+(LADD-1)*1024
202     QSTRIPY(NSTRPY)=FLOATADCY
203     YSTRIPY(NSTRPY)=GLOBSTRIPY(NP,NT,J)
204    
205 bottai 3.1 ENDIF
206 bottai 3.2
207 bottai 3.1 endif
208    
209     enddo
210    
211    
212     END
213    

  ViewVC Help
Powered by ViewVC 1.1.23