1 |
pam-fi |
1.9 |
|
2 |
pam-fi |
1.10 |
|
3 |
|
|
subroutine idtoc(ipfa,cpfa) |
4 |
|
|
|
5 |
|
|
integer ipfa |
6 |
|
|
character*4 cpfa |
7 |
|
|
|
8 |
|
|
CPFA='COG4' |
9 |
|
|
if(ipfa.eq.0)CPFA='ETA' |
10 |
|
|
if(ipfa.eq.2)CPFA='ETA2' |
11 |
|
|
if(ipfa.eq.3)CPFA='ETA3' |
12 |
|
|
if(ipfa.eq.4)CPFA='ETA4' |
13 |
|
|
if(ipfa.eq.10)CPFA='COG' |
14 |
|
|
if(ipfa.eq.11)CPFA='COG1' |
15 |
|
|
if(ipfa.eq.12)CPFA='COG2' |
16 |
|
|
if(ipfa.eq.13)CPFA='COG3' |
17 |
|
|
if(ipfa.eq.14)CPFA='COG4' |
18 |
|
|
|
19 |
|
|
end |
20 |
|
|
|
21 |
mocchiut |
1.1 |
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
22 |
|
|
* this file contains all subroutines and functions |
23 |
|
|
* that are needed for position finding algorithms |
24 |
|
|
* |
25 |
|
|
* |
26 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
27 |
|
|
|
28 |
|
|
|
29 |
pam-fi |
1.9 |
integer function npfastrips(ic,PFA,angle) |
30 |
|
|
*-------------------------------------------------------------- |
31 |
|
|
* thid function returns the number of strips used |
32 |
|
|
* to evaluate the position of a cluster, according to the p.f.a. |
33 |
|
|
*-------------------------------------------------------------- |
34 |
|
|
include 'commontracker.f' |
35 |
|
|
include 'level1.f' |
36 |
|
|
include 'calib.f' |
37 |
|
|
|
38 |
|
|
character*4 usedPFA,PFA |
39 |
|
|
|
40 |
|
|
|
41 |
|
|
usedPFA=PFA |
42 |
|
|
|
43 |
|
|
npfastrips=0 |
44 |
|
|
|
45 |
|
|
if(usedPFA.eq.'COG1')npfastrips=1 |
46 |
|
|
if(usedPFA.eq.'COG2')npfastrips=2 |
47 |
|
|
if(usedPFA.eq.'COG3')npfastrips=3 |
48 |
|
|
if(usedPFA.eq.'COG4')npfastrips=4 |
49 |
|
|
if(usedPFA.eq.'ETA2')npfastrips=2 |
50 |
|
|
if(usedPFA.eq.'ETA3')npfastrips=3 |
51 |
|
|
if(usedPFA.eq.'ETA4')npfastrips=4 |
52 |
|
|
* ---------------------------------------------------------------- |
53 |
|
|
if(usedPFA.eq.'ETA')then |
54 |
|
|
c print*,VIEW(ic),angle |
55 |
|
|
if(mod(int(VIEW(ic)),2).eq.1)then !Y-view |
56 |
|
|
if( abs(angle).ge.e2fay.and.abs(angle).lt.e2tay )then |
57 |
|
|
npfastrips=2 |
58 |
|
|
elseif( abs(angle).ge.e3fay.and.abs(angle).lt.e3tay )then |
59 |
|
|
npfastrips=3 |
60 |
|
|
elseif( abs(angle).ge.e4fay.and.abs(angle).lt.e4tay )then |
61 |
|
|
npfastrips=4 |
62 |
|
|
else |
63 |
|
|
npfastrips=4 |
64 |
|
|
c usedPFA='COG' |
65 |
|
|
endif |
66 |
|
|
else !X-view |
67 |
|
|
if( abs(angle).ge.e2fax.and.abs(angle).lt.e2tax )then |
68 |
|
|
npfastrips=2 |
69 |
|
|
elseif( abs(angle).ge.e3fax.and.abs(angle).lt.e3tax )then |
70 |
|
|
npfastrips=3 |
71 |
|
|
elseif( abs(angle).ge.e4fax.and.abs(angle).lt.e4tax )then |
72 |
|
|
npfastrips=4 |
73 |
|
|
else |
74 |
|
|
npfastrips=4 |
75 |
|
|
c usedPFA='COG' |
76 |
|
|
endif |
77 |
|
|
endif |
78 |
|
|
endif |
79 |
|
|
* ---------------------------------------------------------------- |
80 |
|
|
if(usedPFA.eq.'COG')then |
81 |
|
|
|
82 |
|
|
iv=VIEW(ic) |
83 |
|
|
if(mod(iv,2).eq.1)incut=incuty |
84 |
|
|
if(mod(iv,2).eq.0)incut=incutx |
85 |
|
|
istart = INDSTART(IC) |
86 |
|
|
istop = TOTCLLENGTH |
87 |
|
|
if(ic.lt.NCLSTR1)istop=INDSTART(IC+1)-1 |
88 |
|
|
mu = 0 |
89 |
|
|
do i = INDMAX(IC),istart,-1 |
90 |
|
|
ipos = i-INDMAX(ic) |
91 |
|
|
cut = incut*CLSIGMA(i) |
92 |
|
|
if(CLSIGNAL(i).ge.cut)then |
93 |
|
|
mu = mu + 1 |
94 |
|
|
print*,i,mu |
95 |
|
|
else |
96 |
|
|
goto 10 |
97 |
|
|
endif |
98 |
|
|
enddo |
99 |
|
|
10 continue |
100 |
|
|
do i = INDMAX(IC)+1,istop |
101 |
|
|
ipos = i-INDMAX(ic) |
102 |
|
|
cut = incut*CLSIGMA(i) |
103 |
|
|
if(CLSIGNAL(i).ge.cut)then |
104 |
|
|
mu = mu + 1 |
105 |
|
|
print*,i,mu |
106 |
|
|
else |
107 |
|
|
goto 20 |
108 |
|
|
endif |
109 |
|
|
enddo |
110 |
|
|
20 continue |
111 |
|
|
npfastrips=mu |
112 |
|
|
|
113 |
|
|
endif |
114 |
|
|
* ---------------------------------------------------------------- |
115 |
|
|
|
116 |
|
|
c print*,pfastrips |
117 |
|
|
|
118 |
|
|
return |
119 |
|
|
end |
120 |
|
|
|
121 |
mocchiut |
1.1 |
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
122 |
pam-fi |
1.4 |
real function pfaeta(ic,angle) |
123 |
mocchiut |
1.1 |
*-------------------------------------------------------------- |
124 |
|
|
* this function returns the position (in strip units) |
125 |
|
|
* it calls: |
126 |
pam-fi |
1.4 |
* - pfaeta2(ic,angle) |
127 |
|
|
* - pfaeta3(ic,angle) |
128 |
|
|
* - pfaeta4(ic,angle) |
129 |
mocchiut |
1.1 |
* according to the angle |
130 |
|
|
*-------------------------------------------------------------- |
131 |
|
|
include 'commontracker.f' |
132 |
|
|
include 'level1.f' |
133 |
pam-fi |
1.9 |
include 'calib.f' |
134 |
mocchiut |
1.1 |
|
135 |
pam-fi |
1.4 |
pfaeta = 0 |
136 |
mocchiut |
1.1 |
|
137 |
|
|
if(mod(int(VIEW(ic)),2).eq.1)then !Y-view |
138 |
|
|
|
139 |
pam-fi |
1.9 |
if( abs(angle).ge.e2fay.and.abs(angle).le.e2tay )then |
140 |
|
|
pfaeta = pfaeta2(ic,angle) |
141 |
|
|
elseif( abs(angle).ge.e3fay.and.abs(angle).le.e3tay )then |
142 |
|
|
pfaeta = pfaeta3(ic,angle) |
143 |
|
|
elseif( abs(angle).ge.e4fay.and.abs(angle).le.e4tay )then |
144 |
|
|
pfaeta = pfaeta4(ic,angle) |
145 |
|
|
else |
146 |
|
|
pfaeta = cog(4,ic) |
147 |
|
|
endif |
148 |
|
|
|
149 |
mocchiut |
1.1 |
else !X-view |
150 |
|
|
|
151 |
pam-fi |
1.9 |
if( abs(angle).ge.e2fax.and.abs(angle).le.e2tax )then |
152 |
pam-fi |
1.4 |
pfaeta = pfaeta2(ic,angle) |
153 |
pam-fi |
1.9 |
elseif( abs(angle).ge.e3fax.and.abs(angle).le.e3tax )then |
154 |
pam-fi |
1.4 |
pfaeta = pfaeta3(ic,angle) |
155 |
pam-fi |
1.9 |
elseif( abs(angle).ge.e4fax.and.abs(angle).le.e4tax )then |
156 |
pam-fi |
1.4 |
pfaeta = pfaeta4(ic,angle) |
157 |
pam-fi |
1.9 |
else |
158 |
|
|
pfaeta = cog(4,ic) |
159 |
|
|
endif |
160 |
mocchiut |
1.1 |
|
161 |
|
|
endif |
162 |
pam-fi |
1.5 |
|
163 |
mocchiut |
1.1 |
100 return |
164 |
|
|
end |
165 |
|
|
|
166 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
167 |
pam-fi |
1.11 |
c real function riseta(ic,angle) |
168 |
|
|
real function riseta(iview,angle) |
169 |
mocchiut |
1.1 |
*-------------------------------------------------------------- |
170 |
|
|
* this function returns the average spatial resolution |
171 |
pam-fi |
1.4 |
* (in cm) for the ETA algorithm (function pfaeta(ic,angle)) |
172 |
mocchiut |
1.1 |
* it calls: |
173 |
pam-fi |
1.13 |
* - risxeta2(angle) |
174 |
|
|
* - risyeta2(angle) |
175 |
|
|
* - risxeta3(angle) |
176 |
|
|
* - risxeta4(angle) |
177 |
mocchiut |
1.1 |
* according to the angle |
178 |
|
|
*-------------------------------------------------------------- |
179 |
|
|
include 'commontracker.f' |
180 |
|
|
include 'level1.f' |
181 |
pam-fi |
1.9 |
include 'calib.f' |
182 |
mocchiut |
1.1 |
|
183 |
pam-fi |
1.11 |
riseta = 0 |
184 |
mocchiut |
1.1 |
|
185 |
pam-fi |
1.11 |
c if(mod(int(VIEW(ic)),2).eq.1)then !Y-view |
186 |
|
|
if(mod(iview,2).eq.1)then !Y-view |
187 |
mocchiut |
1.1 |
|
188 |
pam-fi |
1.9 |
|
189 |
|
|
if( abs(angle).ge.e2fay.and.abs(angle).le.e2tay )then |
190 |
pam-fi |
1.13 |
riseta = risyeta2(angle) |
191 |
pam-fi |
1.9 |
elseif( abs(angle).ge.e3fay.and.abs(angle).le.e3tay )then |
192 |
pam-fi |
1.11 |
riseta = risy_cog(angle) !ATTENZIONE!! |
193 |
pam-fi |
1.9 |
elseif( abs(angle).ge.e4fay.and.abs(angle).le.e4tay )then |
194 |
pam-fi |
1.11 |
riseta = risy_cog(angle) !ATTENZIONE!! |
195 |
pam-fi |
1.9 |
else |
196 |
pam-fi |
1.11 |
riseta = risy_cog(angle) |
197 |
pam-fi |
1.9 |
endif |
198 |
mocchiut |
1.1 |
|
199 |
|
|
else !X-view |
200 |
|
|
|
201 |
pam-fi |
1.9 |
if( abs(angle).ge.e2fax.and.abs(angle).le.e2tax )then |
202 |
pam-fi |
1.13 |
riseta = risxeta2(angle) |
203 |
pam-fi |
1.9 |
elseif( abs(angle).ge.e3fax.and.abs(angle).le.e3tax )then |
204 |
pam-fi |
1.13 |
riseta = risxeta3(angle) |
205 |
pam-fi |
1.9 |
elseif( abs(angle).ge.e4fax.and.abs(angle).le.e4tax )then |
206 |
pam-fi |
1.13 |
riseta = risxeta4(angle) |
207 |
pam-fi |
1.9 |
else |
208 |
pam-fi |
1.11 |
riseta = risx_cog(angle) |
209 |
pam-fi |
1.9 |
endif |
210 |
mocchiut |
1.1 |
|
211 |
|
|
endif |
212 |
|
|
|
213 |
pam-fi |
1.11 |
|
214 |
mocchiut |
1.1 |
100 return |
215 |
|
|
end |
216 |
|
|
|
217 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
218 |
|
|
real function fbad_eta(ic,angle) |
219 |
|
|
*------------------------------------------------------- |
220 |
|
|
* this function returns a factor that takes into |
221 |
|
|
* account deterioration of the spatial resolution |
222 |
|
|
* in the case BAD strips are included in the cluster. |
223 |
|
|
* This factor should multiply the nominal spatial |
224 |
|
|
* resolution. |
225 |
|
|
* It calls the function FBAD_COG(NCOG,IC), |
226 |
|
|
* accordingto the angle |
227 |
|
|
*------------------------------------------------------- |
228 |
|
|
|
229 |
|
|
include 'commontracker.f' |
230 |
|
|
include 'level1.f' |
231 |
pam-fi |
1.9 |
include 'calib.f' |
232 |
mocchiut |
1.1 |
fbad_eta = 0 |
233 |
|
|
|
234 |
|
|
if(mod(int(VIEW(ic)),2).eq.1)then !Y-view |
235 |
|
|
|
236 |
pam-fi |
1.9 |
if( abs(angle).ge.e2fay.and.abs(angle).le.e2tay )then |
237 |
|
|
fbad_eta = fbad_cog(2,ic) |
238 |
|
|
elseif( abs(angle).ge.e3fay.and.abs(angle).le.e3tay )then |
239 |
|
|
fbad_eta = fbad_cog(3,ic) |
240 |
|
|
elseif( abs(angle).ge.e4fay.and.abs(angle).le.e4tay )then |
241 |
|
|
fbad_eta = fbad_cog(4,ic) |
242 |
|
|
else |
243 |
|
|
fbad_eta = fbad_cog(4,ic) |
244 |
|
|
endif |
245 |
mocchiut |
1.1 |
|
246 |
|
|
else !X-view |
247 |
|
|
|
248 |
pam-fi |
1.9 |
if( abs(angle).ge.e2fax.and.abs(angle).le.e2tax )then |
249 |
mocchiut |
1.1 |
fbad_eta = fbad_cog(2,ic) |
250 |
pam-fi |
1.9 |
elseif( abs(angle).ge.e3fax.and.abs(angle).le.e3tax )then |
251 |
mocchiut |
1.1 |
fbad_eta = fbad_cog(3,ic) |
252 |
pam-fi |
1.9 |
elseif( abs(angle).ge.e4fax.and.abs(angle).le.e4tax )then |
253 |
|
|
fbad_eta = fbad_cog(4,ic) |
254 |
|
|
else |
255 |
mocchiut |
1.1 |
fbad_eta = fbad_cog(4,ic) |
256 |
pam-fi |
1.9 |
endif |
257 |
mocchiut |
1.1 |
|
258 |
|
|
endif |
259 |
|
|
|
260 |
|
|
return |
261 |
|
|
end |
262 |
|
|
|
263 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
264 |
pam-fi |
1.4 |
real function pfaeta2(ic,angle) !(1) |
265 |
mocchiut |
1.1 |
*-------------------------------------------------------------- |
266 |
|
|
* this function returns |
267 |
|
|
* |
268 |
|
|
* - the position (in strip units) |
269 |
|
|
* corrected according to the ETA2 Position Finding Algorithm. |
270 |
|
|
* The function performs an interpolation of FETA2%ETA2 |
271 |
|
|
* |
272 |
|
|
* - if the angle is out of range, the calibration parameters |
273 |
|
|
* of the lowest or higher bin are used |
274 |
|
|
* |
275 |
|
|
*-------------------------------------------------------------- |
276 |
|
|
include 'commontracker.f' |
277 |
|
|
include 'calib.f' |
278 |
|
|
include 'level1.f' |
279 |
|
|
|
280 |
|
|
real cog2,angle |
281 |
|
|
integer iview,lad |
282 |
|
|
|
283 |
pam-fi |
1.9 |
iview = VIEW(ic) |
284 |
|
|
lad = nld(MAXS(ic),VIEW(ic)) |
285 |
|
|
cog2 = cog(2,ic) |
286 |
pam-fi |
1.4 |
pfaeta2=cog2 |
287 |
mocchiut |
1.1 |
|
288 |
|
|
* find angular bin |
289 |
|
|
* (in futuro possiamo pensare di interpolare anche sull'angolo) |
290 |
|
|
do iang=1,nangbin |
291 |
|
|
if(angL(iang).lt.angle.and.angR(iang).ge.angle)then |
292 |
|
|
iangle=iang |
293 |
|
|
goto 98 |
294 |
|
|
endif |
295 |
|
|
enddo |
296 |
|
|
if(DEBUG) |
297 |
pam-fi |
1.4 |
$ print*,'pfaeta2 *** warning *** angle out of range: ',angle |
298 |
mocchiut |
1.1 |
if(angle.lt.angL(1))iang=1 |
299 |
|
|
if(angle.gt.angR(nangbin))iang=nangbin |
300 |
|
|
98 continue !jump here if ok |
301 |
|
|
|
302 |
|
|
|
303 |
|
|
c$$$* find extremes of interpolation |
304 |
|
|
c$$$ iflag=0 |
305 |
|
|
c$$$* -------------------------------- |
306 |
|
|
c$$$ if(cog2.lt.eta2(1,iang).or.cog2.gt.eta2(netaval,iang))then |
307 |
pam-fi |
1.4 |
c$$$c print*,'pfaeta2 *** warning *** argument out of range: ',cog2 |
308 |
mocchiut |
1.1 |
c$$$* goto 100 |
309 |
|
|
c$$$* ---------------------------------------------- |
310 |
|
|
c$$$* non salto piu`, ma scalo di 1 o -1 |
311 |
|
|
c$$$* nel caso si tratti di un cluster |
312 |
|
|
c$$$* in cui la strip con il segnale massimo non coincide |
313 |
|
|
c$$$* con la strip con il rapposto s/n massimo!!! |
314 |
|
|
c$$$* ---------------------------------------------- |
315 |
|
|
c$$$ if(cog2.lt.eta2(1,iang))then !temp |
316 |
|
|
c$$$ cog2=cog2+1. !temp |
317 |
|
|
c$$$ iflag=1 !temp |
318 |
|
|
c$$$ else !temp |
319 |
|
|
c$$$ cog2=cog2-1. !temp |
320 |
|
|
c$$$ iflag=-1 !temp |
321 |
|
|
c$$$ endif !temp |
322 |
|
|
c$$$c print*,'shifted >>> ',cog2 |
323 |
|
|
c$$$ endif |
324 |
|
|
|
325 |
|
|
iadd=0 |
326 |
|
|
10 continue |
327 |
|
|
if(cog2.lt.eta2(1,iang))then |
328 |
|
|
cog2 = cog2 + 1 |
329 |
|
|
iadd = iadd + 1 |
330 |
|
|
goto 10 |
331 |
|
|
endif |
332 |
|
|
20 continue |
333 |
|
|
if(cog2.gt.eta2(netaval,iang))then |
334 |
|
|
cog2 = cog2 - 1 |
335 |
|
|
iadd = iadd - 1 |
336 |
|
|
goto 20 |
337 |
|
|
endif |
338 |
|
|
|
339 |
|
|
* -------------------------------- |
340 |
|
|
c print*,'*****',i,view,lad,iang,'------> cog2 ',cog2 |
341 |
|
|
do i=2,netaval |
342 |
|
|
if(eta2(i,iang).gt.cog2)then |
343 |
|
|
|
344 |
|
|
x1 = eta2(i-1,iang) |
345 |
|
|
x2 = eta2(i,iang) |
346 |
|
|
y1 = feta2(i-1,iview,lad,iang) |
347 |
|
|
y2 = feta2(i,iview,lad,iang) |
348 |
|
|
|
349 |
|
|
c print*,'*****',i,view,lad,iang |
350 |
|
|
c print*,'-----',x1,x2,y1,y2 |
351 |
|
|
goto 99 |
352 |
|
|
endif |
353 |
|
|
enddo |
354 |
|
|
99 continue |
355 |
|
|
|
356 |
|
|
|
357 |
|
|
AA=(y2-y1)/(x2-x1) |
358 |
|
|
BB=y1-AA*x1 |
359 |
|
|
|
360 |
pam-fi |
1.4 |
pfaeta2 = AA*cog2+BB |
361 |
|
|
pfaeta2 = pfaeta2 - iadd |
362 |
mocchiut |
1.1 |
|
363 |
|
|
c$$$ if(iflag.eq.1)then |
364 |
pam-fi |
1.4 |
c$$$ pfaeta2=pfaeta2-1. !temp |
365 |
mocchiut |
1.1 |
c$$$ cog2=cog2-1. !temp |
366 |
|
|
c$$$ endif |
367 |
|
|
c$$$ if(iflag.eq.-1)then |
368 |
pam-fi |
1.4 |
c$$$ pfaeta2=pfaeta2+1. !temp |
369 |
mocchiut |
1.1 |
c$$$ cog2=cog2+1. !temp |
370 |
|
|
c$$$ endif |
371 |
|
|
|
372 |
|
|
if(DEBUG)print*,'ETA2 (ic ',ic,' ang',angle,')' |
373 |
pam-fi |
1.4 |
$ ,cog2-iadd,' -->',pfaeta2 |
374 |
mocchiut |
1.1 |
|
375 |
|
|
|
376 |
|
|
100 return |
377 |
|
|
end |
378 |
|
|
|
379 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
380 |
pam-fi |
1.4 |
real function pfaeta3(ic,angle) !(1) |
381 |
mocchiut |
1.1 |
*-------------------------------------------------------------- |
382 |
|
|
* this function returns |
383 |
|
|
* |
384 |
|
|
* - the position (in strip units) |
385 |
|
|
* corrected according to the ETA3 Position Finding Algorithm. |
386 |
|
|
* The function performs an interpolation of FETA3%ETA3 |
387 |
|
|
* |
388 |
|
|
* - if the angle is out of range, the calibration parameters |
389 |
|
|
* of the lowest or higher bin are used |
390 |
|
|
* |
391 |
|
|
*-------------------------------------------------------------- |
392 |
|
|
include 'commontracker.f' |
393 |
|
|
include 'calib.f' |
394 |
|
|
include 'level1.f' |
395 |
|
|
|
396 |
|
|
real cog3,angle |
397 |
|
|
integer iview,lad |
398 |
|
|
|
399 |
|
|
|
400 |
pam-fi |
1.9 |
iview = VIEW(ic) |
401 |
|
|
lad = nld(MAXS(ic),VIEW(ic)) |
402 |
|
|
cog3 = cog(3,ic) |
403 |
pam-fi |
1.4 |
pfaeta3=cog3 |
404 |
mocchiut |
1.1 |
|
405 |
|
|
* find angular bin |
406 |
|
|
* (in futuro possiamo pensare di interpolare anche sull'angolo) |
407 |
|
|
do iang=1,nangbin |
408 |
|
|
c print*,'~~~~~~~~~~~~ ',iang,angL(iang),angR(iang),angle |
409 |
|
|
if(angL(iang).lt.angle.and.angR(iang).ge.angle)then |
410 |
|
|
iangle=iang |
411 |
|
|
goto 98 |
412 |
|
|
endif |
413 |
|
|
enddo |
414 |
|
|
if(DEBUG) |
415 |
pam-fi |
1.4 |
$ print*,'pfaeta3 *** warning *** angle out of range: ',angle |
416 |
mocchiut |
1.1 |
if(angle.lt.angL(1))iang=1 |
417 |
|
|
if(angle.gt.angR(nangbin))iang=nangbin |
418 |
|
|
98 continue !jump here if ok |
419 |
|
|
|
420 |
|
|
|
421 |
|
|
c$$$* find extremes of interpolation |
422 |
|
|
c$$$ iflag=0 |
423 |
|
|
c$$$* -------------------------------- |
424 |
|
|
c$$$ if(cog3.lt.eta3(1,iang).or.cog3.gt.eta3(netaval,iang))then |
425 |
|
|
c$$$* ---------------------------------------------- |
426 |
|
|
c$$$* non salto piu`, ma scalo di 1 o -1 |
427 |
|
|
c$$$* nel caso si tratti di un cluster |
428 |
|
|
c$$$* in cui la strip con il segnale massimo non coincide |
429 |
|
|
c$$$* con la strip con il rapposto s/n massimo!!! |
430 |
|
|
c$$$* ---------------------------------------------- |
431 |
|
|
c$$$ if(cog2.lt.eta2(1,iang))then !temp |
432 |
|
|
c$$$ cog2=cog2+1. !temp |
433 |
|
|
c$$$ iflag=1 !temp |
434 |
|
|
c$$$ else !temp |
435 |
|
|
c$$$ cog2=cog2-1. !temp |
436 |
|
|
c$$$ iflag=-1 !temp |
437 |
|
|
c$$$ endif !temp |
438 |
|
|
c$$$c print*,'shifted >>> ',cog2 |
439 |
|
|
c$$$ endif |
440 |
|
|
|
441 |
|
|
|
442 |
|
|
iadd=0 |
443 |
|
|
10 continue |
444 |
|
|
if(cog3.lt.eta3(1,iang))then |
445 |
|
|
cog3 = cog3 + 1 |
446 |
|
|
iadd = iadd + 1 |
447 |
|
|
goto 10 |
448 |
|
|
endif |
449 |
|
|
20 continue |
450 |
|
|
if(cog3.gt.eta3(netaval,iang))then |
451 |
|
|
cog3 = cog3 - 1 |
452 |
|
|
iadd = iadd - 1 |
453 |
|
|
goto 20 |
454 |
|
|
endif |
455 |
|
|
|
456 |
|
|
* -------------------------------- |
457 |
|
|
c print*,'*****',i,view,lad,iang,'------> cog2 ',cog2 |
458 |
|
|
do i=2,netaval |
459 |
|
|
if(eta3(i,iang).gt.cog3)then |
460 |
|
|
|
461 |
|
|
x1 = eta3(i-1,iang) |
462 |
|
|
x2 = eta3(i,iang) |
463 |
|
|
y1 = feta3(i-1,iview,lad,iang) |
464 |
|
|
y2 = feta3(i,iview,lad,iang) |
465 |
|
|
|
466 |
|
|
c print*,'*****',i,view,lad,iang |
467 |
|
|
c print*,'-----',x1,x2,y1,y2 |
468 |
|
|
goto 99 |
469 |
|
|
endif |
470 |
|
|
enddo |
471 |
|
|
99 continue |
472 |
|
|
|
473 |
|
|
|
474 |
|
|
AA=(y2-y1)/(x2-x1) |
475 |
|
|
BB=y1-AA*x1 |
476 |
|
|
|
477 |
pam-fi |
1.4 |
pfaeta3 = AA*cog3+BB |
478 |
|
|
pfaeta3 = pfaeta3 - iadd |
479 |
mocchiut |
1.1 |
|
480 |
|
|
c$$$ if(iflag.eq.1)then |
481 |
pam-fi |
1.4 |
c$$$ pfaeta2=pfaeta2-1. !temp |
482 |
mocchiut |
1.1 |
c$$$ cog2=cog2-1. !temp |
483 |
|
|
c$$$ endif |
484 |
|
|
c$$$ if(iflag.eq.-1)then |
485 |
pam-fi |
1.4 |
c$$$ pfaeta2=pfaeta2+1. !temp |
486 |
mocchiut |
1.1 |
c$$$ cog2=cog2+1. !temp |
487 |
|
|
c$$$ endif |
488 |
|
|
|
489 |
|
|
if(DEBUG)print*,'ETA3 (ic ',ic,' ang',angle,')' |
490 |
pam-fi |
1.4 |
$ ,cog3-iadd,' -->',pfaeta3 |
491 |
mocchiut |
1.1 |
|
492 |
|
|
100 return |
493 |
|
|
end |
494 |
|
|
|
495 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
496 |
pam-fi |
1.9 |
real function pfaeta4(ic,angle) |
497 |
mocchiut |
1.1 |
*-------------------------------------------------------------- |
498 |
|
|
* this function returns |
499 |
|
|
* |
500 |
|
|
* - the position (in strip units) |
501 |
|
|
* corrected according to the ETA4 Position Finding Algorithm. |
502 |
|
|
* The function performs an interpolation of FETA3%ETA3 |
503 |
|
|
* |
504 |
|
|
* - if the angle is out of range, the calibration parameters |
505 |
|
|
* of the lowest or higher bin are used |
506 |
|
|
* |
507 |
|
|
*-------------------------------------------------------------- |
508 |
|
|
include 'commontracker.f' |
509 |
|
|
include 'calib.f' |
510 |
|
|
include 'level1.f' |
511 |
|
|
|
512 |
|
|
real cog4,angle |
513 |
|
|
integer iview,lad |
514 |
|
|
|
515 |
pam-fi |
1.6 |
|
516 |
pam-fi |
1.9 |
iview = VIEW(ic) |
517 |
|
|
lad = nld(MAXS(ic),VIEW(ic)) |
518 |
|
|
cog4=cog(4,ic) |
519 |
pam-fi |
1.4 |
pfaeta4=cog4 |
520 |
mocchiut |
1.1 |
|
521 |
|
|
* find angular bin |
522 |
|
|
* (in futuro possiamo pensare di interpolare anche sull'angolo) |
523 |
|
|
do iang=1,nangbin |
524 |
|
|
c print*,'~~~~~~~~~~~~ ',iang,angL(iang),angR(iang),angle |
525 |
|
|
if(angL(iang).lt.angle.and.angR(iang).ge.angle)then |
526 |
|
|
iangle=iang |
527 |
|
|
goto 98 |
528 |
|
|
endif |
529 |
|
|
enddo |
530 |
|
|
if(DEBUG) |
531 |
pam-fi |
1.4 |
$ print*,'pfaeta4 *** warning *** angle out of range: ',angle |
532 |
mocchiut |
1.1 |
if(angle.lt.angL(1))iang=1 |
533 |
|
|
if(angle.gt.angR(nangbin))iang=nangbin |
534 |
|
|
98 continue !jump here if ok |
535 |
|
|
|
536 |
|
|
|
537 |
|
|
c$$$* find extremes of interpolation |
538 |
|
|
c$$$ iflag=0 |
539 |
|
|
c$$$* -------------------------------- |
540 |
|
|
c$$$ if(cog3.lt.eta3(1,iang).or.cog3.gt.eta3(netaval,iang))then |
541 |
|
|
c$$$* ---------------------------------------------- |
542 |
|
|
c$$$* non salto piu`, ma scalo di 1 o -1 |
543 |
|
|
c$$$* nel caso si tratti di un cluster |
544 |
|
|
c$$$* in cui la strip con il segnale massimo non coincide |
545 |
|
|
c$$$* con la strip con il rapposto s/n massimo!!! |
546 |
|
|
c$$$* ---------------------------------------------- |
547 |
|
|
c$$$ if(cog2.lt.eta2(1,iang))then !temp |
548 |
|
|
c$$$ cog2=cog2+1. !temp |
549 |
|
|
c$$$ iflag=1 !temp |
550 |
|
|
c$$$ else !temp |
551 |
|
|
c$$$ cog2=cog2-1. !temp |
552 |
|
|
c$$$ iflag=-1 !temp |
553 |
|
|
c$$$ endif !temp |
554 |
|
|
c$$$c print*,'shifted >>> ',cog2 |
555 |
|
|
c$$$ endif |
556 |
|
|
|
557 |
|
|
|
558 |
|
|
iadd=0 |
559 |
|
|
10 continue |
560 |
|
|
if(cog4.lt.eta4(1,iang))then |
561 |
|
|
cog4 = cog4 + 1 |
562 |
|
|
iadd = iadd + 1 |
563 |
|
|
goto 10 |
564 |
|
|
endif |
565 |
|
|
20 continue |
566 |
|
|
if(cog4.gt.eta4(netaval,iang))then |
567 |
|
|
cog4 = cog4 - 1 |
568 |
|
|
iadd = iadd - 1 |
569 |
|
|
goto 20 |
570 |
|
|
endif |
571 |
|
|
|
572 |
|
|
* -------------------------------- |
573 |
|
|
c print*,'*****',i,view,lad,iang,'------> cog2 ',cog2 |
574 |
|
|
do i=2,netaval |
575 |
|
|
if(eta4(i,iang).gt.cog4)then |
576 |
|
|
|
577 |
|
|
x1 = eta4(i-1,iang) |
578 |
|
|
x2 = eta4(i,iang) |
579 |
|
|
y1 = feta4(i-1,iview,lad,iang) |
580 |
|
|
y2 = feta4(i,iview,lad,iang) |
581 |
|
|
|
582 |
|
|
c print*,'*****',i,view,lad,iang |
583 |
|
|
c print*,'-----',x1,x2,y1,y2 |
584 |
|
|
goto 99 |
585 |
|
|
endif |
586 |
|
|
enddo |
587 |
|
|
99 continue |
588 |
|
|
|
589 |
|
|
|
590 |
|
|
AA=(y2-y1)/(x2-x1) |
591 |
|
|
BB=y1-AA*x1 |
592 |
|
|
|
593 |
pam-fi |
1.4 |
pfaeta4 = AA*cog4+BB |
594 |
|
|
pfaeta4 = pfaeta4 - iadd |
595 |
mocchiut |
1.1 |
|
596 |
|
|
c$$$ if(iflag.eq.1)then |
597 |
pam-fi |
1.4 |
c$$$ pfaeta2=pfaeta2-1. !temp |
598 |
mocchiut |
1.1 |
c$$$ cog2=cog2-1. !temp |
599 |
|
|
c$$$ endif |
600 |
|
|
c$$$ if(iflag.eq.-1)then |
601 |
pam-fi |
1.4 |
c$$$ pfaeta2=pfaeta2+1. !temp |
602 |
mocchiut |
1.1 |
c$$$ cog2=cog2+1. !temp |
603 |
|
|
c$$$ endif |
604 |
|
|
|
605 |
|
|
if(DEBUG)print*,'ETA4 (ic ',ic,' ang',angle,')' |
606 |
pam-fi |
1.4 |
$ ,cog4-iadd,' -->',pfaeta4 |
607 |
mocchiut |
1.1 |
|
608 |
|
|
100 return |
609 |
|
|
end |
610 |
|
|
|
611 |
|
|
|
612 |
|
|
|
613 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
614 |
pam-fi |
1.14 |
c$$$ real function cog0(ncog,ic) |
615 |
|
|
c$$$*------------------------------------------------- |
616 |
|
|
c$$$* this function returns |
617 |
|
|
c$$$* |
618 |
|
|
c$$$* - the Center-Of-Gravity of the cluster IC |
619 |
|
|
c$$$* evaluated using NCOG strips, |
620 |
|
|
c$$$* calculated relative to MAXS(IC) |
621 |
|
|
c$$$* |
622 |
|
|
c$$$* - zero in case that not enough strips |
623 |
|
|
c$$$* have a positive signal |
624 |
|
|
c$$$* |
625 |
|
|
c$$$* NOTE: |
626 |
|
|
c$$$* This is the old definition, used by Straulino. |
627 |
|
|
c$$$* The new routine, according to Landi, |
628 |
|
|
c$$$* is COG(NCOG,IC) |
629 |
|
|
c$$$*------------------------------------------------- |
630 |
|
|
c$$$ |
631 |
|
|
c$$$ |
632 |
|
|
c$$$ include 'commontracker.f' |
633 |
|
|
c$$$ include 'level1.f' |
634 |
|
|
c$$$ |
635 |
|
|
c$$$* --> signal of the central strip |
636 |
|
|
c$$$ sc = CLSIGNAL(INDMAX(ic)) !center |
637 |
|
|
c$$$ |
638 |
|
|
c$$$* signal of adjacent strips |
639 |
|
|
c$$$* --> left |
640 |
|
|
c$$$ sl1 = 0 !left 1 |
641 |
|
|
c$$$ if( |
642 |
|
|
c$$$ $ (INDMAX(ic)-1).ge.INDSTART(ic) |
643 |
|
|
c$$$ $ ) |
644 |
|
|
c$$$ $ sl1 = max(0.,CLSIGNAL(INDMAX(ic)-1)) |
645 |
|
|
c$$$ |
646 |
|
|
c$$$ sl2 = 0 !left 2 |
647 |
|
|
c$$$ if( |
648 |
|
|
c$$$ $ (INDMAX(ic)-2).ge.INDSTART(ic) |
649 |
|
|
c$$$ $ ) |
650 |
|
|
c$$$ $ sl2 = max(0.,CLSIGNAL(INDMAX(ic)-2)) |
651 |
|
|
c$$$ |
652 |
|
|
c$$$* --> right |
653 |
|
|
c$$$ sr1 = 0 !right 1 |
654 |
|
|
c$$$ if( |
655 |
|
|
c$$$ $ (ic.ne.NCLSTR1.and.(INDMAX(ic)+1).lt.INDSTART(ic+1)) |
656 |
|
|
c$$$ $ .or. |
657 |
|
|
c$$$ $ (ic.eq.NCLSTR1.and.(INDMAX(ic)+1).le.TOTCLLENGTH) |
658 |
|
|
c$$$ $ ) |
659 |
|
|
c$$$ $ sr1 = max(0.,CLSIGNAL(INDMAX(ic)+1)) |
660 |
|
|
c$$$ |
661 |
|
|
c$$$ sr2 = 0 !right 2 |
662 |
|
|
c$$$ if( |
663 |
|
|
c$$$ $ (ic.ne.NCLSTR1.and.(INDMAX(ic)+2).lt.INDSTART(ic+1)) |
664 |
|
|
c$$$ $ .or. |
665 |
|
|
c$$$ $ (ic.eq.NCLSTR1.and.(INDMAX(ic)+2).le.TOTCLLENGTH) |
666 |
|
|
c$$$ $ ) |
667 |
|
|
c$$$ $ sr2 = max(0.,CLSIGNAL(INDMAX(ic)+2)) |
668 |
|
|
c$$$ |
669 |
|
|
c$$$************************************************************ |
670 |
|
|
c$$$* COG computation |
671 |
|
|
c$$$************************************************************ |
672 |
|
|
c$$$ |
673 |
|
|
c$$$c print*,sl2,sl1,sc,sr1,sr2 |
674 |
|
|
c$$$ |
675 |
|
|
c$$$ COG = 0. |
676 |
|
|
c$$$ |
677 |
|
|
c$$$ if(sl1.gt.sr1.and.sl1.gt.0.)then |
678 |
|
|
c$$$ |
679 |
|
|
c$$$ if(ncog.eq.2.and.sl1.ne.0)then |
680 |
|
|
c$$$ COG = -sl1/(sl1+sc) |
681 |
|
|
c$$$ elseif(ncog.eq.3.and.sl1.ne.0.and.sr1.ne.0)then |
682 |
|
|
c$$$ COG = (sr1-sl1)/(sl1+sc+sr1) |
683 |
|
|
c$$$ elseif(ncog.eq.4.and.sl1.ne.0.and.sr1.ne.0.and.sl2.ne.0)then |
684 |
|
|
c$$$ COG = (sr1-sl1-2*sl2)/(sl2+sl1+sc+sr1) |
685 |
|
|
c$$$ else |
686 |
|
|
c$$$ COG = 0. |
687 |
|
|
c$$$ endif |
688 |
|
|
c$$$ |
689 |
|
|
c$$$ elseif(sl1.le.sr1.and.sr1.gt.0.)then |
690 |
|
|
c$$$ |
691 |
|
|
c$$$ if(ncog.eq.2.and.sr1.ne.0)then |
692 |
|
|
c$$$ COG = sr1/(sc+sr1) |
693 |
|
|
c$$$ elseif(ncog.eq.3.and.sr1.ne.0.and.sl1.ne.0)then |
694 |
|
|
c$$$ COG = (sr1-sl1)/(sl1+sc+sr1) |
695 |
|
|
c$$$ elseif(ncog.eq.4.and.sr1.ne.0.and.sl1.ne.0.and.sr2.ne.0)then |
696 |
|
|
c$$$ COG = (2*sr2+sr1-sl1)/(sl2+sl1+sc+sr1) |
697 |
|
|
c$$$ else |
698 |
|
|
c$$$ COG = 0. |
699 |
|
|
c$$$ endif |
700 |
|
|
c$$$ |
701 |
|
|
c$$$ endif |
702 |
|
|
c$$$ |
703 |
|
|
c$$$ COG0 = COG |
704 |
|
|
c$$$ |
705 |
|
|
c$$$c print *,ncog,ic,cog,'/////////////' |
706 |
|
|
c$$$ |
707 |
|
|
c$$$ return |
708 |
|
|
c$$$ end |
709 |
mocchiut |
1.1 |
|
710 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
711 |
|
|
real function cog(ncog,ic) |
712 |
|
|
*------------------------------------------------- |
713 |
|
|
* this function returns |
714 |
|
|
* |
715 |
|
|
* - if NCOG=0, the Center-Of-Gravity of the |
716 |
|
|
* cluster IC, relative to MAXS(IC), according to |
717 |
|
|
* the cluster multiplicity |
718 |
|
|
* |
719 |
|
|
* - if NCOG>0, the Center-Of-Gravity of the cluster IC |
720 |
|
|
* evaluated using NCOG strips, even if they have a |
721 |
|
|
* negative signal (according to Landi) |
722 |
|
|
* |
723 |
|
|
*------------------------------------------------- |
724 |
|
|
|
725 |
|
|
|
726 |
|
|
include 'commontracker.f' |
727 |
|
|
include 'calib.f' |
728 |
|
|
include 'level1.f' |
729 |
|
|
|
730 |
|
|
|
731 |
|
|
|
732 |
|
|
if (ncog.gt.0) then |
733 |
|
|
* =========================== |
734 |
|
|
* ETA2 ETA3 ETA4 computation |
735 |
|
|
* =========================== |
736 |
|
|
|
737 |
|
|
* --> signal of the central strip |
738 |
|
|
sc = CLSIGNAL(INDMAX(ic)) !center |
739 |
|
|
* signal of adjacent strips |
740 |
pam-fi |
1.14 |
sl1 = -9999. !left 1 |
741 |
mocchiut |
1.1 |
if( |
742 |
|
|
$ (INDMAX(ic)-1).ge.INDSTART(ic) |
743 |
|
|
$ ) |
744 |
|
|
$ sl1 = CLSIGNAL(INDMAX(ic)-1) |
745 |
|
|
|
746 |
pam-fi |
1.14 |
sl2 = -9999. !left 2 |
747 |
mocchiut |
1.1 |
if( |
748 |
|
|
$ (INDMAX(ic)-2).ge.INDSTART(ic) |
749 |
|
|
$ ) |
750 |
|
|
$ sl2 = CLSIGNAL(INDMAX(ic)-2) |
751 |
|
|
|
752 |
pam-fi |
1.14 |
sr1 = -9999. !right 1 |
753 |
mocchiut |
1.1 |
if( |
754 |
|
|
$ (ic.ne.NCLSTR1.and.(INDMAX(ic)+1).lt.INDSTART(ic+1)) |
755 |
|
|
$ .or. |
756 |
|
|
$ (ic.eq.NCLSTR1.and.(INDMAX(ic)+1).le.TOTCLLENGTH) |
757 |
|
|
$ ) |
758 |
|
|
$ sr1 = CLSIGNAL(INDMAX(ic)+1) |
759 |
|
|
|
760 |
pam-fi |
1.14 |
sr2 = -9999. !right 2 |
761 |
mocchiut |
1.1 |
if( |
762 |
|
|
$ (ic.ne.NCLSTR1.and.(INDMAX(ic)+2).lt.INDSTART(ic+1)) |
763 |
|
|
$ .or. |
764 |
|
|
$ (ic.eq.NCLSTR1.and.(INDMAX(ic)+2).le.TOTCLLENGTH) |
765 |
|
|
$ ) |
766 |
|
|
$ sr2 = CLSIGNAL(INDMAX(ic)+2) |
767 |
|
|
|
768 |
|
|
COG = 0. |
769 |
|
|
|
770 |
pam-fi |
1.6 |
c print*,'## ',sl2,sl1,sc,sr1,sr2 |
771 |
|
|
|
772 |
pam-fi |
1.14 |
c ============================================================== |
773 |
pam-fi |
1.4 |
if(ncog.eq.1)then |
774 |
|
|
COG = 0. |
775 |
pam-fi |
1.14 |
if(sr1.gt.sc)cog=1. !NEW |
776 |
|
|
if(sl1.gt.sc.and.sl1.gt.sr1)cog=-1. !NEW |
777 |
|
|
c ============================================================== |
778 |
pam-fi |
1.4 |
elseif(ncog.eq.2)then |
779 |
mocchiut |
1.1 |
if(sl1.gt.sr1)then |
780 |
pam-fi |
1.6 |
if((sl1+sc).ne.0)COG = -sl1/(sl1+sc) |
781 |
pam-fi |
1.14 |
elseif(sl1.lt.sr1)then |
782 |
|
|
if((sc+sr1).ne.0)COG = sr1/(sc+sr1) |
783 |
|
|
elseif( sl1.eq.sr1.and.sl1.ne.-9999.)then !NEW |
784 |
|
|
if( clsigma(indmax(ic)-1).lt.clsigma(indmax(ic)+1) |
785 |
|
|
$ .and.(sl1+sc).ne.0 )cog = -sl1/(sl1+sc) !NEW |
786 |
|
|
if( clsigma(indmax(ic)-1).gt.clsigma(indmax(ic)+1) |
787 |
|
|
$ .and.(sc+sr1).ne.0 )cog = sr1/(sc+sr1) !NEW |
788 |
|
|
endif |
789 |
pam-fi |
1.15 |
c if(cog==0)print*,'Strange cluster (2) - @maxs ',MAXS(ic) |
790 |
|
|
c $ ,' : ',sl2,sl1,sc,sr1,sr2 |
791 |
pam-fi |
1.14 |
c ============================================================== |
792 |
mocchiut |
1.1 |
elseif(ncog.eq.3)then |
793 |
pam-fi |
1.14 |
if( (sl1+sc+sr1).ne.0 )COG = (sr1-sl1)/(sl1+sc+sr1) |
794 |
pam-fi |
1.15 |
c if(cog==0)print*,'Strange cluster (3) - @maxs ',MAXS(ic) |
795 |
|
|
c $ ,' : ',sl2,sl1,sc,sr1,sr2 |
796 |
pam-fi |
1.14 |
c ============================================================== |
797 |
mocchiut |
1.1 |
elseif(ncog.eq.4)then |
798 |
|
|
if(sl2.gt.sr2)then |
799 |
pam-fi |
1.6 |
if((sl2+sl1+sc+sr1).ne.0) |
800 |
|
|
$ COG = (sr1-sl1-2*sl2)/(sl2+sl1+sc+sr1) |
801 |
pam-fi |
1.14 |
elseif(sl2.lt.sr2)then |
802 |
|
|
if((sr2+sl1+sc+sr1).ne.0) |
803 |
pam-fi |
1.12 |
$ COG = (2*sr2+sr1-sl1)/(sr2+sl1+sc+sr1) |
804 |
pam-fi |
1.14 |
elseif(sl2.eq.sr2.and.sl2.ne.-9999.)then !NEW |
805 |
|
|
if( clsigma(indmax(ic)-2).lt.clsigma(indmax(ic)+2) |
806 |
|
|
$ .and.(sl2+sl1+sc+sr1).ne.0 ) |
807 |
|
|
$ cog = (sr1-sl1-2*sl2)/(sl2+sl1+sc+sr1) !NEW |
808 |
|
|
if( clsigma(indmax(ic)-2).gt.clsigma(indmax(ic)+2) |
809 |
|
|
$ .and.(sr2+sl1+sc+sr1).ne.0 ) |
810 |
|
|
$ cog = (2*sr2+sr1-sl1)/(sr2+sl1+sc+sr1) !NEW |
811 |
mocchiut |
1.1 |
endif |
812 |
|
|
else |
813 |
|
|
print*,'function COG(NCOG,IC) ==> WARNING!! NCOG=',NCOG |
814 |
pam-fi |
1.7 |
$ ,' not implemented' |
815 |
mocchiut |
1.1 |
COG = 0. |
816 |
|
|
endif |
817 |
|
|
|
818 |
|
|
c print*,'NCOG ',ncog,ic,' @@@ ',sl1,sc,sr1,' @@@ ',cog |
819 |
|
|
|
820 |
|
|
elseif(ncog.eq.0)then |
821 |
|
|
* ========================= |
822 |
|
|
* COG computation |
823 |
|
|
* ========================= |
824 |
|
|
|
825 |
|
|
iv=VIEW(ic) |
826 |
|
|
if(mod(iv,2).eq.1)incut=incuty |
827 |
|
|
if(mod(iv,2).eq.0)incut=incutx |
828 |
pam-fi |
1.3 |
istart = INDSTART(IC) |
829 |
|
|
istop = TOTCLLENGTH |
830 |
mocchiut |
1.1 |
if(ic.lt.NCLSTR1)istop=INDSTART(IC+1)-1 |
831 |
pam-fi |
1.3 |
COG = 0 |
832 |
pam-fi |
1.9 |
SGN = 0. |
833 |
pam-fi |
1.3 |
mu = 0 |
834 |
pam-fi |
1.9 |
c print*,'-------' |
835 |
|
|
do i = INDMAX(IC),istart,-1 |
836 |
|
|
ipos = i-INDMAX(ic) |
837 |
|
|
cut = incut*CLSIGMA(i) |
838 |
|
|
if(CLSIGNAL(i).ge.cut)then |
839 |
|
|
COG = COG + ipos*CLSIGNAL(i) |
840 |
|
|
SGN = SGN + CLSIGNAL(i) |
841 |
|
|
mu = mu + 1 |
842 |
pam-fi |
1.12 |
c print*,ipos,CLSIGNAL(i) |
843 |
pam-fi |
1.9 |
else |
844 |
|
|
goto 10 |
845 |
|
|
endif |
846 |
|
|
enddo |
847 |
|
|
10 continue |
848 |
|
|
do i = INDMAX(IC)+1,istop |
849 |
pam-fi |
1.3 |
ipos = i-INDMAX(ic) |
850 |
pam-fi |
1.4 |
cut = incut*CLSIGMA(i) |
851 |
mocchiut |
1.1 |
if(CLSIGNAL(i).ge.cut)then |
852 |
|
|
COG = COG + ipos*CLSIGNAL(i) |
853 |
pam-fi |
1.9 |
SGN = SGN + CLSIGNAL(i) |
854 |
mocchiut |
1.1 |
mu = mu + 1 |
855 |
pam-fi |
1.12 |
c print*,ipos,CLSIGNAL(i) |
856 |
pam-fi |
1.9 |
else |
857 |
|
|
goto 20 |
858 |
mocchiut |
1.1 |
endif |
859 |
|
|
enddo |
860 |
pam-fi |
1.9 |
20 continue |
861 |
|
|
if(SGN.le.0)then |
862 |
pam-fi |
1.12 |
print*,'cog(0,ic) --> ic, dedx ',ic,SGN |
863 |
pam-fi |
1.3 |
print*,(CLSIGNAL(i)/CLSIGMA(i),i=istart,istop) |
864 |
|
|
print*,(CLSIGNAL(i),i=istart,istop) |
865 |
pam-fi |
1.9 |
c print*,'cog(0,ic) --> NOT EVALUATED ' |
866 |
pam-fi |
1.3 |
else |
867 |
pam-fi |
1.9 |
COG=COG/SGN |
868 |
pam-fi |
1.3 |
endif |
869 |
pam-fi |
1.9 |
c print*,'-------' |
870 |
mocchiut |
1.1 |
|
871 |
|
|
else |
872 |
|
|
|
873 |
|
|
COG=0 |
874 |
|
|
print*,'function COG(NCOG,IC) ==> WARNING!! NCOG=',NCOG |
875 |
|
|
print*,' (NCOG must be >= 0)' |
876 |
|
|
|
877 |
|
|
|
878 |
|
|
endif |
879 |
|
|
|
880 |
pam-fi |
1.6 |
c print *,'## cog ',ncog,ic,cog,'/////////////' |
881 |
mocchiut |
1.1 |
|
882 |
|
|
return |
883 |
|
|
end |
884 |
|
|
|
885 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
886 |
pam-fi |
1.9 |
|
887 |
mocchiut |
1.1 |
real function fbad_cog(ncog,ic) |
888 |
|
|
*------------------------------------------------------- |
889 |
|
|
* this function returns a factor that takes into |
890 |
|
|
* account deterioration of the spatial resolution |
891 |
|
|
* in the case BAD strips are included in the cluster. |
892 |
|
|
* This factor should multiply the nominal spatial |
893 |
|
|
* resolution. |
894 |
|
|
* |
895 |
|
|
*------------------------------------------------------- |
896 |
|
|
|
897 |
|
|
include 'commontracker.f' |
898 |
|
|
include 'level1.f' |
899 |
|
|
include 'calib.f' |
900 |
|
|
|
901 |
|
|
if(mod(int(VIEW(ic)),2).eq.1)then !Y-view |
902 |
pam-fi |
1.9 |
si = 8.4 !average good-strip noise |
903 |
|
|
f = 4. !average bad-strip noise: f*si |
904 |
mocchiut |
1.1 |
incut=incuty |
905 |
|
|
else !X-view |
906 |
pam-fi |
1.9 |
si = 3.9 !average good-strip noise |
907 |
|
|
f = 6. !average bad-strip noise: f*si |
908 |
mocchiut |
1.1 |
incut=incutx |
909 |
|
|
endif |
910 |
|
|
|
911 |
|
|
fbad_cog = 1. |
912 |
|
|
|
913 |
|
|
if (ncog.gt.0) then |
914 |
|
|
|
915 |
|
|
* --> signal of the central strip |
916 |
|
|
sc = CLSIGNAL(INDMAX(ic)) !center |
917 |
|
|
fsc = 1 |
918 |
pam-fi |
1.9 |
c if( CLBAD(INDMAX(ic)).eq.0 )fsc=f |
919 |
|
|
fsc = clsigma(INDMAX(ic))/si |
920 |
mocchiut |
1.1 |
* --> signal of adjacent strips |
921 |
|
|
sl1 = 0 !left 1 |
922 |
|
|
fsl1 = 1 !left 1 |
923 |
|
|
if( |
924 |
|
|
$ (INDMAX(ic)-1).ge.INDSTART(ic) |
925 |
|
|
$ )then |
926 |
|
|
sl1 = CLSIGNAL(INDMAX(ic)-1) |
927 |
pam-fi |
1.9 |
c if( CLBAD(INDMAX(ic)-1).eq.0)fsl1=f |
928 |
|
|
fsl1 = clsigma(INDMAX(ic)-1)/si |
929 |
mocchiut |
1.1 |
endif |
930 |
|
|
|
931 |
|
|
sl2 = 0 !left 2 |
932 |
|
|
fsl2 = 1 !left 2 |
933 |
|
|
if( |
934 |
|
|
$ (INDMAX(ic)-2).ge.INDSTART(ic) |
935 |
|
|
$ )then |
936 |
|
|
sl2 = CLSIGNAL(INDMAX(ic)-2) |
937 |
pam-fi |
1.9 |
c if(CLBAD(INDMAX(ic)-2).eq.0)fsl2=f |
938 |
|
|
fsl2 = clsigma(INDMAX(ic)-2)/si |
939 |
mocchiut |
1.1 |
endif |
940 |
|
|
sr1 = 0 !right 1 |
941 |
|
|
fsr1 = 1 !right 1 |
942 |
|
|
if( |
943 |
|
|
$ (ic.ne.NCLSTR1.and.(INDMAX(ic)+1).lt.INDSTART(ic+1)) |
944 |
|
|
$ .or. |
945 |
|
|
$ (ic.eq.NCLSTR1.and.(INDMAX(ic)+1).le.TOTCLLENGTH) |
946 |
|
|
$ )then |
947 |
|
|
sr1 = CLSIGNAL(INDMAX(ic)+1) |
948 |
pam-fi |
1.9 |
c if(CLBAD(INDMAX(ic)+1).eq.0)fsr1=f |
949 |
|
|
fsr1 = clsigma(INDMAX(ic)+1)/si |
950 |
mocchiut |
1.1 |
endif |
951 |
|
|
sr2 = 0 !right 2 |
952 |
|
|
fsr2 = 1 !right 2 |
953 |
|
|
if( |
954 |
|
|
$ (ic.ne.NCLSTR1.and.(INDMAX(ic)+2).lt.INDSTART(ic+1)) |
955 |
|
|
$ .or. |
956 |
|
|
$ (ic.eq.NCLSTR1.and.(INDMAX(ic)+2).le.TOTCLLENGTH) |
957 |
|
|
$ )then |
958 |
|
|
sr2 = CLSIGNAL(INDMAX(ic)+2) |
959 |
pam-fi |
1.9 |
c if(CLBAD(INDMAX(ic)+2).eq.0)fsr2=f |
960 |
|
|
fsr2 = clsigma(INDMAX(ic)+2)/si |
961 |
mocchiut |
1.1 |
endif |
962 |
|
|
|
963 |
|
|
|
964 |
|
|
|
965 |
|
|
************************************************************ |
966 |
pam-fi |
1.9 |
* COG2-3-4 computation |
967 |
mocchiut |
1.1 |
************************************************************ |
968 |
|
|
|
969 |
|
|
c print*,sl2,sl1,sc,sr1,sr2 |
970 |
|
|
|
971 |
pam-fi |
1.9 |
vCOG = cog(ncog,ic)!0. |
972 |
mocchiut |
1.1 |
|
973 |
|
|
if(ncog.eq.2)then |
974 |
|
|
if(sl1.gt.sr1)then |
975 |
pam-fi |
1.9 |
c COG = -sl1/(sl1+sc) |
976 |
|
|
fbad_cog = (fsl1*(-1-vCOG)**2+fsc*(-vCOG)**2) |
977 |
|
|
fbad_cog = fbad_cog / ((-1-vCOG)**2+(-vCOG)**2) |
978 |
mocchiut |
1.1 |
elseif(sl1.le.sr1)then |
979 |
pam-fi |
1.9 |
c COG = sr1/(sc+sr1) |
980 |
|
|
fbad_cog = (fsc*(-vCOG)**2+fsr1*(1-vCOG)**2) |
981 |
|
|
fbad_cog = fbad_cog / ((-vCOG)**2+(1-vCOG)**2) |
982 |
mocchiut |
1.1 |
endif |
983 |
|
|
elseif(ncog.eq.3)then |
984 |
pam-fi |
1.9 |
c COG = (sr1-sl1)/(sl1+sc+sr1) |
985 |
mocchiut |
1.1 |
fbad_cog = |
986 |
pam-fi |
1.9 |
$ (fsl1*(-1-vCOG)**2+fsc*(-vCOG)**2+fsr1*(1-vCOG)**2) |
987 |
mocchiut |
1.1 |
fbad_cog = |
988 |
pam-fi |
1.9 |
$ fbad_cog / ((-1-vCOG)**2+(-vCOG)**2+(1-vCOG)**2) |
989 |
mocchiut |
1.1 |
elseif(ncog.eq.4)then |
990 |
|
|
if(sl2.gt.sr2)then |
991 |
pam-fi |
1.9 |
c COG = (sr1-sl1-2*sl2)/(sl2+sl1+sc+sr1) |
992 |
mocchiut |
1.1 |
fbad_cog = |
993 |
pam-fi |
1.9 |
$ (fsl2*(-2-vCOG)**2+fsl1*(-1-vCOG)**2 |
994 |
|
|
$ +fsc*(-vCOG)**2+fsr1*(1-vCOG)**2) |
995 |
mocchiut |
1.1 |
fbad_cog = |
996 |
pam-fi |
1.9 |
$ fbad_cog / ((-2-vCOG)**2+(-1-vCOG)**2 |
997 |
|
|
$ +(-vCOG)**2+(1-vCOG)**2) |
998 |
mocchiut |
1.1 |
elseif(sl2.le.sr2)then |
999 |
pam-fi |
1.9 |
c COG = (2*sr2+sr1-sl1)/(sl2+sl1+sc+sr1) |
1000 |
mocchiut |
1.1 |
fbad_cog = |
1001 |
pam-fi |
1.9 |
$ (fsl1*(-1-vCOG)**2 |
1002 |
|
|
$ +fsc*(-vCOG)**2+fsr1*(1-vCOG)**2+fsr2*(2-vCOG)**2) |
1003 |
mocchiut |
1.1 |
fbad_cog = |
1004 |
pam-fi |
1.9 |
$ fbad_cog / ((-1-vCOG)**2 |
1005 |
|
|
$ +(-vCOG)**2+(1-vCOG)**2+(2-vCOG)**2) |
1006 |
mocchiut |
1.1 |
endif |
1007 |
|
|
else |
1008 |
|
|
print*,'function FBAD_COG(NCOG,IC) ==> WARNING!! NCOG=',NCOG |
1009 |
|
|
print*,' (NCOG must be <= 4)' |
1010 |
pam-fi |
1.9 |
c COG = 0. |
1011 |
mocchiut |
1.1 |
endif |
1012 |
|
|
|
1013 |
|
|
elseif(ncog.eq.0)then |
1014 |
pam-fi |
1.9 |
* ========================= |
1015 |
|
|
* COG computation |
1016 |
|
|
* ========================= |
1017 |
|
|
|
1018 |
|
|
vCOG = cog(0,ic) |
1019 |
mocchiut |
1.1 |
|
1020 |
pam-fi |
1.9 |
iv = VIEW(ic) |
1021 |
|
|
istart = INDSTART(IC) |
1022 |
|
|
istop = TOTCLLENGTH |
1023 |
|
|
if(ic.lt.NCLSTR1)istop = INDSTART(IC+1)-1 |
1024 |
|
|
SGN = 0. |
1025 |
|
|
SNU = 0. |
1026 |
|
|
SDE = 0. |
1027 |
|
|
c$$$ do i=INDMAX(IC),istart,-1 |
1028 |
|
|
c$$$ ipos = i-INDMAX(ic) |
1029 |
|
|
c$$$ cut = incut*CLSIGMA(i) |
1030 |
|
|
c$$$ if(CLSIGNAL(i).gt.cut)then |
1031 |
|
|
c$$$ COG = COG + ipos*CLSIGNAL(i) |
1032 |
|
|
c$$$ SGN = SGN + CLSIGNAL(i) |
1033 |
|
|
c$$$ else |
1034 |
|
|
c$$$ goto 10 |
1035 |
|
|
c$$$ endif |
1036 |
|
|
c$$$ enddo |
1037 |
|
|
c$$$ 10 continue |
1038 |
|
|
c$$$ do i=INDMAX(IC)+1,istop |
1039 |
|
|
c$$$ ipos = i-INDMAX(ic) |
1040 |
|
|
c$$$ cut = incut*CLSIGMA(i) |
1041 |
|
|
c$$$ if(CLSIGNAL(i).gt.cut)then |
1042 |
|
|
c$$$ COG = COG + ipos*CLSIGNAL(i) |
1043 |
|
|
c$$$ SGN = SGN + CLSIGNAL(i) |
1044 |
|
|
c$$$ else |
1045 |
|
|
c$$$ goto 20 |
1046 |
|
|
c$$$ endif |
1047 |
|
|
c$$$ enddo |
1048 |
|
|
c$$$ 20 continue |
1049 |
|
|
c$$$ if(SGN.le.0)then |
1050 |
|
|
c$$$ print*,'fbad_cog(0,ic) --> ic, dedx ',ic,SGN |
1051 |
|
|
c$$$ print*,(CLSIGNAL(i)/CLSIGMA(i),i=istart,istop) |
1052 |
|
|
c$$$ print*,(CLSIGNAL(i),i=istart,istop) |
1053 |
|
|
c$$$ print*,'fbad_cog(0,ic) --> NOT EVALUATED ' |
1054 |
|
|
c$$$ else |
1055 |
|
|
c$$$ COG=COG/SGN |
1056 |
|
|
c$$$ endif |
1057 |
|
|
|
1058 |
|
|
do i=INDMAX(IC),istart,-1 |
1059 |
|
|
ipos = i-INDMAX(ic) |
1060 |
|
|
cut = incut*CLSIGMA(i) |
1061 |
mocchiut |
1.1 |
if(CLSIGNAL(i).gt.cut)then |
1062 |
pam-fi |
1.9 |
fs = clsigma(i)/si |
1063 |
|
|
SNU = SNU + fs*(ipos-vCOG)**2 |
1064 |
|
|
SDE = SDE + (ipos-vCOG)**2 |
1065 |
|
|
else |
1066 |
|
|
goto 10 |
1067 |
|
|
endif |
1068 |
mocchiut |
1.1 |
enddo |
1069 |
pam-fi |
1.9 |
10 continue |
1070 |
|
|
do i=INDMAX(IC)+1,istop |
1071 |
|
|
ipos = i-INDMAX(ic) |
1072 |
|
|
cut = incut*CLSIGMA(i) |
1073 |
mocchiut |
1.1 |
if(CLSIGNAL(i).gt.cut)then |
1074 |
pam-fi |
1.9 |
fs = clsigma(i)/si |
1075 |
|
|
SNU = SNU + fs*(ipos-vCOG)**2 |
1076 |
|
|
SDE = SDE + (ipos-vCOG)**2 |
1077 |
|
|
else |
1078 |
|
|
goto 20 |
1079 |
mocchiut |
1.1 |
endif |
1080 |
|
|
enddo |
1081 |
pam-fi |
1.9 |
20 continue |
1082 |
|
|
if(SDE.ne.0)then |
1083 |
|
|
FBAD_COG=SNU/SDE |
1084 |
|
|
else |
1085 |
|
|
|
1086 |
|
|
endif |
1087 |
mocchiut |
1.1 |
|
1088 |
|
|
else |
1089 |
|
|
|
1090 |
|
|
FBAD_COG=0 |
1091 |
|
|
print*,'function FBAD_COG(NCOG,IC) ==> WARNING!! NCOG=',NCOG |
1092 |
|
|
print*,' (NCOG must be >= 0)' |
1093 |
|
|
|
1094 |
|
|
|
1095 |
|
|
endif |
1096 |
|
|
|
1097 |
|
|
|
1098 |
|
|
fbad_cog = sqrt(fbad_cog) |
1099 |
|
|
|
1100 |
|
|
return |
1101 |
|
|
end |
1102 |
|
|
|
1103 |
|
|
|
1104 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
1105 |
|
|
real function fbad_cog0(ncog,ic) |
1106 |
|
|
*------------------------------------------------------- |
1107 |
|
|
* this function returns a factor that takes into |
1108 |
|
|
* account deterioration of the spatial resolution |
1109 |
|
|
* in the case BAD strips are included in the cluster. |
1110 |
|
|
* This factor should multiply the nominal spatial |
1111 |
|
|
* resolution. |
1112 |
|
|
* |
1113 |
|
|
* NB!!! |
1114 |
|
|
* (this is the old version. It consider only the two |
1115 |
|
|
* strips with the greatest signal. The new one is |
1116 |
|
|
* fbad_cog(ncog,ic) ) |
1117 |
|
|
* |
1118 |
|
|
*------------------------------------------------------- |
1119 |
|
|
|
1120 |
|
|
include 'commontracker.f' |
1121 |
|
|
include 'level1.f' |
1122 |
|
|
include 'calib.f' |
1123 |
|
|
|
1124 |
|
|
* --> signal of the central strip |
1125 |
|
|
sc = CLSIGNAL(INDMAX(ic)) !center |
1126 |
|
|
|
1127 |
|
|
* signal of adjacent strips |
1128 |
|
|
* --> left |
1129 |
|
|
sl1 = 0 !left 1 |
1130 |
|
|
if( |
1131 |
|
|
$ (INDMAX(ic)-1).ge.INDSTART(ic) |
1132 |
|
|
$ ) |
1133 |
|
|
$ sl1 = max(0.,CLSIGNAL(INDMAX(ic)-1)) |
1134 |
|
|
|
1135 |
|
|
sl2 = 0 !left 2 |
1136 |
|
|
if( |
1137 |
|
|
$ (INDMAX(ic)-2).ge.INDSTART(ic) |
1138 |
|
|
$ ) |
1139 |
|
|
$ sl2 = max(0.,CLSIGNAL(INDMAX(ic)-2)) |
1140 |
|
|
|
1141 |
|
|
* --> right |
1142 |
|
|
sr1 = 0 !right 1 |
1143 |
|
|
if( |
1144 |
|
|
$ (ic.ne.NCLSTR1.and.(INDMAX(ic)+1).lt.INDSTART(ic+1)) |
1145 |
|
|
$ .or. |
1146 |
|
|
$ (ic.eq.NCLSTR1.and.(INDMAX(ic)+1).le.TOTCLLENGTH) |
1147 |
|
|
$ ) |
1148 |
|
|
$ sr1 = max(0.,CLSIGNAL(INDMAX(ic)+1)) |
1149 |
|
|
|
1150 |
|
|
sr2 = 0 !right 2 |
1151 |
|
|
if( |
1152 |
|
|
$ (ic.ne.NCLSTR1.and.(INDMAX(ic)+2).lt.INDSTART(ic+1)) |
1153 |
|
|
$ .or. |
1154 |
|
|
$ (ic.eq.NCLSTR1.and.(INDMAX(ic)+2).le.TOTCLLENGTH) |
1155 |
|
|
$ ) |
1156 |
|
|
$ sr2 = max(0.,CLSIGNAL(INDMAX(ic)+2)) |
1157 |
|
|
|
1158 |
|
|
|
1159 |
|
|
if(mod(int(VIEW(ic)),2).eq.1)then !Y-view |
1160 |
|
|
f = 4. |
1161 |
|
|
si = 8.4 |
1162 |
|
|
else !X-view |
1163 |
|
|
f = 6. |
1164 |
|
|
si = 3.9 |
1165 |
|
|
endif |
1166 |
|
|
|
1167 |
|
|
fbad_cog = 1. |
1168 |
|
|
f0 = 1 |
1169 |
|
|
f1 = 1 |
1170 |
|
|
f2 = 1 |
1171 |
|
|
f3 = 1 |
1172 |
|
|
if(sl1.gt.sr1.and.sl1.gt.0.)then |
1173 |
|
|
|
1174 |
|
|
if(BAD(VIEW(ic),nvk(MAXS(ic)),nst(MAXS(ic)) ).eq.0)f0=f |
1175 |
|
|
if(BAD(VIEW(ic),nvk(MAXS(ic)),nst(MAXS(ic)-1)).eq.0)f1=f |
1176 |
|
|
c if(BAD(VIEW(ic),nvk(MAXS(ic)),nst(MAXS(ic)+1)).eq.0)f3=f |
1177 |
|
|
|
1178 |
|
|
if(ncog.eq.2.and.sl1.ne.0)then |
1179 |
|
|
fbad_cog = (f1**2*sc**2/sl1**2+f0**2)/(sc**2/sl1**2+1.) |
1180 |
|
|
elseif(ncog.eq.3.and.sl1.ne.0.and.sr1.ne.0)then |
1181 |
|
|
fbad_cog = 1. |
1182 |
|
|
elseif(ncog.eq.4.and.sl1.ne.0.and.sr1.ne.0.and.sl2.ne.0)then |
1183 |
|
|
fbad_cog = 1. |
1184 |
|
|
else |
1185 |
|
|
fbad_cog = 1. |
1186 |
|
|
endif |
1187 |
|
|
|
1188 |
|
|
elseif(sl1.le.sr1.and.sr1.gt.0.)then |
1189 |
|
|
|
1190 |
|
|
|
1191 |
|
|
if(BAD(VIEW(ic),nvk(MAXS(ic)),nst(MAXS(ic)) ).eq.0)f0=f |
1192 |
|
|
if(BAD(VIEW(ic),nvk(MAXS(ic)),nst(MAXS(ic)+1)).eq.0)f1=f |
1193 |
|
|
c if(BAD(VIEW(ic),nvk(MAXS(ic)),nst(MAXS(ic)-1)).eq.0)f3=f |
1194 |
|
|
|
1195 |
|
|
if(ncog.eq.2.and.sr1.ne.0)then |
1196 |
|
|
fbad_cog = (f1**2*sc**2/sr1**2+f0**2)/(sc**2/sr1**2+1.) |
1197 |
|
|
elseif(ncog.eq.3.and.sr1.ne.0.and.sl1.ne.0)then |
1198 |
|
|
fbad_cog = 1. |
1199 |
|
|
elseif(ncog.eq.4.and.sr1.ne.0.and.sl1.ne.0.and.sr2.ne.0)then |
1200 |
|
|
fbad_cog = 1. |
1201 |
|
|
else |
1202 |
|
|
fbad_cog = 1. |
1203 |
|
|
endif |
1204 |
|
|
|
1205 |
|
|
endif |
1206 |
|
|
|
1207 |
|
|
fbad_cog0 = sqrt(fbad_cog) |
1208 |
|
|
|
1209 |
|
|
return |
1210 |
|
|
end |
1211 |
|
|
|
1212 |
|
|
|
1213 |
|
|
|
1214 |
|
|
|
1215 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
1216 |
|
|
|
1217 |
pam-fi |
1.13 |
FUNCTION risxeta2(x) |
1218 |
mocchiut |
1.1 |
|
1219 |
|
|
DOUBLE PRECISION V( 1) |
1220 |
|
|
INTEGER NPAR, NDIM, IMQFUN, I, J |
1221 |
|
|
DOUBLE PRECISION HQDJ, VV, VCONST |
1222 |
|
|
DOUBLE PRECISION SIGVMI( 1), SIGVT( 1) |
1223 |
|
|
DOUBLE PRECISION SIGV( 18, 1) |
1224 |
|
|
DOUBLE PRECISION SIGDEL( 18) |
1225 |
|
|
DOUBLE PRECISION SIGA( 18) |
1226 |
|
|
DATA NPAR, NDIM, IMQFUN / 18, 1, 1/ |
1227 |
|
|
DATA VCONST / 0.000000000000 / |
1228 |
|
|
DATA SIGVMI / -20.50000000000 / |
1229 |
|
|
DATA SIGVT / 41.00000000000 / |
1230 |
|
|
DATA SIGV / 0.6097560748458E-01 |
1231 |
|
|
+, 0.1097560971975 |
1232 |
|
|
+, 0.1341463327408 |
1233 |
|
|
+, 0.1829268187284 |
1234 |
|
|
+, 0.2317073047161 |
1235 |
|
|
+, 0.4268292486668 |
1236 |
|
|
+, 0.4756097495556 |
1237 |
|
|
+, 0.4999999701977 |
1238 |
|
|
+, 0.5243902206421 |
1239 |
|
|
+, 0.5731707215309 |
1240 |
|
|
+, 0.7682926654816 |
1241 |
|
|
+, 0.8170731663704 |
1242 |
|
|
+, 0.8658536076546 |
1243 |
|
|
+, 0.8902438879013 |
1244 |
|
|
+, 0.9390243291855 |
1245 |
|
|
+, 0.000000000000 |
1246 |
|
|
+, 1.000000000000 |
1247 |
|
|
+, 0.3658536374569 |
1248 |
|
|
+/ |
1249 |
|
|
DATA SIGDEL / 0.4878048598766E-01 |
1250 |
|
|
+, 0.4878048598766E-01 |
1251 |
|
|
+, 0.4878048598766E-01 |
1252 |
|
|
+, 0.4878048598766E-01 |
1253 |
|
|
+, 0.4878048598766E-01 |
1254 |
|
|
+, 0.4878048598766E-01 |
1255 |
|
|
+, 0.4878048598766E-01 |
1256 |
|
|
+, 0.4878048598766E-01 |
1257 |
|
|
+, 0.4878048598766E-01 |
1258 |
|
|
+, 0.4878048598766E-01 |
1259 |
|
|
+, 0.4878048598766E-01 |
1260 |
|
|
+, 0.4878048598766E-01 |
1261 |
|
|
+, 0.4878048598766E-01 |
1262 |
|
|
+, 0.4878048598766E-01 |
1263 |
|
|
+, 0.4878048598766E-01 |
1264 |
|
|
+, 0.1999999994950E-05 |
1265 |
|
|
+, 0.1999999994950E-05 |
1266 |
|
|
+, 0.9756097197533E-01 |
1267 |
|
|
+/ |
1268 |
|
|
DATA SIGA / 51.65899502118 |
1269 |
|
|
+, -150.4733247841 |
1270 |
|
|
+, 143.0468613786 |
1271 |
|
|
+, -16.56096738997 |
1272 |
|
|
+, 5.149319798083 |
1273 |
|
|
+, 21.57149712673 |
1274 |
|
|
+, -39.46652322782 |
1275 |
|
|
+, 47.13181632948 |
1276 |
|
|
+, -32.93197883680 |
1277 |
|
|
+, 16.38645317092 |
1278 |
|
|
+, 1.453688482992 |
1279 |
|
|
+, -10.00547244421 |
1280 |
|
|
+, 131.3517670587 |
1281 |
|
|
+, -140.6351538257 |
1282 |
|
|
+, 49.05515749582 |
1283 |
|
|
+, -23.00028974788 |
1284 |
|
|
+, -22.58470403729 |
1285 |
|
|
+, -3.824682486418 |
1286 |
|
|
+/ |
1287 |
|
|
|
1288 |
|
|
V(1)= abs(x) |
1289 |
pam-fi |
1.9 |
if(V(1).gt.20.)V(1)=20. |
1290 |
mocchiut |
1.1 |
|
1291 |
|
|
HQUADF = 0. |
1292 |
|
|
DO 20 J = 1, NPAR |
1293 |
|
|
HQDJ = 0. |
1294 |
|
|
DO 10 I = 1, NDIM |
1295 |
|
|
VV = (V (I) - SIGVMI (I)) / SIGVT (I) |
1296 |
|
|
HQDJ = HQDJ + (VV - SIGV (J, I)) ** 2 |
1297 |
|
|
10 CONTINUE |
1298 |
|
|
HQDJ = HQDJ + SIGDEL (J) ** 2 |
1299 |
|
|
HQDJ = SQRT (HQDJ) |
1300 |
|
|
HQUADF = HQUADF + SIGA (J) * HQDJ |
1301 |
|
|
20 CONTINUE |
1302 |
|
|
IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) |
1303 |
|
|
|
1304 |
pam-fi |
1.13 |
risxeta2=HQUADF* 1e-4 |
1305 |
mocchiut |
1.1 |
|
1306 |
|
|
END |
1307 |
|
|
|
1308 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
1309 |
pam-fi |
1.13 |
FUNCTION risxeta3(x) |
1310 |
mocchiut |
1.1 |
DOUBLE PRECISION V( 1) |
1311 |
|
|
INTEGER NPAR, NDIM, IMQFUN, I, J |
1312 |
|
|
DOUBLE PRECISION HQDJ, VV, VCONST |
1313 |
|
|
DOUBLE PRECISION SIGVMI( 1), SIGVT( 1) |
1314 |
|
|
DOUBLE PRECISION SIGV( 18, 1) |
1315 |
|
|
DOUBLE PRECISION SIGDEL( 18) |
1316 |
|
|
DOUBLE PRECISION SIGA( 18) |
1317 |
|
|
DATA NPAR, NDIM, IMQFUN / 18, 1, 1/ |
1318 |
|
|
DATA VCONST / 0.000000000000 / |
1319 |
|
|
DATA SIGVMI / -20.50000000000 / |
1320 |
|
|
DATA SIGVT / 41.00000000000 / |
1321 |
|
|
DATA SIGV / 0.6097560748458E-01 |
1322 |
|
|
+, 0.1097560971975 |
1323 |
|
|
+, 0.1341463327408 |
1324 |
|
|
+, 0.1829268187284 |
1325 |
|
|
+, 0.2317073047161 |
1326 |
|
|
+, 0.4756097495556 |
1327 |
|
|
+, 0.4999999701977 |
1328 |
|
|
+, 0.5243902206421 |
1329 |
|
|
+, 0.7682926654816 |
1330 |
|
|
+, 0.8170731663704 |
1331 |
|
|
+, 0.8658536076546 |
1332 |
|
|
+, 0.8902438879013 |
1333 |
|
|
+, 0.9390243291855 |
1334 |
|
|
+, 0.000000000000 |
1335 |
|
|
+, 1.000000000000 |
1336 |
|
|
+, 0.3658536374569 |
1337 |
|
|
+, 0.4146341383457 |
1338 |
|
|
+, 0.6097560524940 |
1339 |
|
|
+/ |
1340 |
|
|
DATA SIGDEL / 0.4878048598766E-01 |
1341 |
|
|
+, 0.4878048598766E-01 |
1342 |
|
|
+, 0.4878048598766E-01 |
1343 |
|
|
+, 0.4878048598766E-01 |
1344 |
|
|
+, 0.4878048598766E-01 |
1345 |
|
|
+, 0.4878048598766E-01 |
1346 |
|
|
+, 0.4878048598766E-01 |
1347 |
|
|
+, 0.4878048598766E-01 |
1348 |
|
|
+, 0.4878048598766E-01 |
1349 |
|
|
+, 0.4878048598766E-01 |
1350 |
|
|
+, 0.4878048598766E-01 |
1351 |
|
|
+, 0.4878048598766E-01 |
1352 |
|
|
+, 0.4878048598766E-01 |
1353 |
|
|
+, 0.1999999994950E-05 |
1354 |
|
|
+, 0.1999999994950E-05 |
1355 |
|
|
+, 0.9756097197533E-01 |
1356 |
|
|
+, 0.9756097197533E-01 |
1357 |
|
|
+, 0.9756097197533E-01 |
1358 |
|
|
+/ |
1359 |
|
|
DATA SIGA / 55.18284054458 |
1360 |
|
|
+, -160.3358431242 |
1361 |
|
|
+, 144.6939185763 |
1362 |
|
|
+, -20.45200854118 |
1363 |
|
|
+, 5.223570087108 |
1364 |
|
|
+,-0.4171476953945 |
1365 |
|
|
+, -27.67911907462 |
1366 |
|
|
+, 17.70327157495 |
1367 |
|
|
+, -1.867165491707 |
1368 |
|
|
+, -8.884458169181 |
1369 |
|
|
+, 124.3526608791 |
1370 |
|
|
+, -143.3309398345 |
1371 |
|
|
+, 50.80345027122 |
1372 |
|
|
+, -16.44454904415 |
1373 |
|
|
+, -15.73785568450 |
1374 |
|
|
+, -22.71810502561 |
1375 |
|
|
+, 36.86170101430 |
1376 |
|
|
+, 2.437918198452 |
1377 |
|
|
+/ |
1378 |
|
|
|
1379 |
|
|
V(1) = abs(x) |
1380 |
pam-fi |
1.9 |
if(V(1).gt.20.)V(1)=20. |
1381 |
|
|
|
1382 |
mocchiut |
1.1 |
HQUADF = 0. |
1383 |
|
|
DO 20 J = 1, NPAR |
1384 |
|
|
HQDJ = 0. |
1385 |
|
|
DO 10 I = 1, NDIM |
1386 |
|
|
VV = (V (I) - SIGVMI (I)) / SIGVT (I) |
1387 |
|
|
HQDJ = HQDJ + (VV - SIGV (J, I)) ** 2 |
1388 |
|
|
10 CONTINUE |
1389 |
|
|
HQDJ = HQDJ + SIGDEL (J) ** 2 |
1390 |
|
|
HQDJ = SQRT (HQDJ) |
1391 |
|
|
HQUADF = HQUADF + SIGA (J) * HQDJ |
1392 |
|
|
20 CONTINUE |
1393 |
|
|
IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) |
1394 |
|
|
|
1395 |
pam-fi |
1.13 |
risxeta3 = HQUADF* 1e-4 |
1396 |
mocchiut |
1.1 |
|
1397 |
|
|
END |
1398 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
1399 |
pam-fi |
1.13 |
FUNCTION risxeta4(x) |
1400 |
mocchiut |
1.1 |
DOUBLE PRECISION V( 1) |
1401 |
|
|
INTEGER NPAR, NDIM, IMQFUN, I, J |
1402 |
|
|
DOUBLE PRECISION HQDJ, VV, VCONST |
1403 |
|
|
DOUBLE PRECISION SIGVMI( 1), SIGVT( 1) |
1404 |
|
|
DOUBLE PRECISION SIGV( 18, 1) |
1405 |
|
|
DOUBLE PRECISION SIGDEL( 18) |
1406 |
|
|
DOUBLE PRECISION SIGA( 18) |
1407 |
|
|
DATA NPAR, NDIM, IMQFUN / 18, 1, 1/ |
1408 |
|
|
DATA VCONST / 0.000000000000 / |
1409 |
|
|
DATA SIGVMI / -20.50000000000 / |
1410 |
|
|
DATA SIGVT / 41.00000000000 / |
1411 |
|
|
DATA SIGV / 0.3658536449075E-01 |
1412 |
|
|
+, 0.6097560748458E-01 |
1413 |
|
|
+, 0.1097560971975 |
1414 |
|
|
+, 0.1341463327408 |
1415 |
|
|
+, 0.4756097495556 |
1416 |
|
|
+, 0.5243902206421 |
1417 |
|
|
+, 0.8658536076546 |
1418 |
|
|
+, 0.8902438879013 |
1419 |
|
|
+, 0.9390243291855 |
1420 |
|
|
+, 0.9634146094322 |
1421 |
|
|
+, 0.000000000000 |
1422 |
|
|
+, 1.000000000000 |
1423 |
|
|
+, 0.3658536374569 |
1424 |
|
|
+, 0.4146341383457 |
1425 |
|
|
+, 0.6097560524940 |
1426 |
|
|
+, 0.6585365533829 |
1427 |
|
|
+, 0.7560975551605 |
1428 |
|
|
+, 0.2439024299383 |
1429 |
|
|
+/ |
1430 |
|
|
DATA SIGDEL / 0.4878048598766E-01 |
1431 |
|
|
+, 0.4878048598766E-01 |
1432 |
|
|
+, 0.4878048598766E-01 |
1433 |
|
|
+, 0.4878048598766E-01 |
1434 |
|
|
+, 0.4878048598766E-01 |
1435 |
|
|
+, 0.4878048598766E-01 |
1436 |
|
|
+, 0.4878048598766E-01 |
1437 |
|
|
+, 0.4878048598766E-01 |
1438 |
|
|
+, 0.4878048598766E-01 |
1439 |
|
|
+, 0.4878048598766E-01 |
1440 |
|
|
+, 0.1999999994950E-05 |
1441 |
|
|
+, 0.1999999994950E-05 |
1442 |
|
|
+, 0.9756097197533E-01 |
1443 |
|
|
+, 0.9756097197533E-01 |
1444 |
|
|
+, 0.9756097197533E-01 |
1445 |
|
|
+, 0.9756097197533E-01 |
1446 |
|
|
+, 0.9756097197533E-01 |
1447 |
|
|
+, 0.1951219439507 |
1448 |
|
|
+/ |
1449 |
|
|
DATA SIGA / -43.61551887895 |
1450 |
|
|
+, 57.88466995373 |
1451 |
|
|
+, -92.04113299504 |
1452 |
|
|
+, 74.08166649890 |
1453 |
|
|
+, -9.768686062558 |
1454 |
|
|
+, -4.304496875334 |
1455 |
|
|
+, 72.62237333937 |
1456 |
|
|
+, -91.21920840618 |
1457 |
|
|
+, 56.75519978630 |
1458 |
|
|
+, -43.21115751243 |
1459 |
|
|
+, 12.79984505413 |
1460 |
|
|
+, 12.10074868595 |
1461 |
|
|
+, -6.238587250860 |
1462 |
|
|
+, 23.43447356326 |
1463 |
|
|
+, 17.98221401495 |
1464 |
|
|
+, -7.980332610975 |
1465 |
|
|
+, -3.426733307051 |
1466 |
|
|
+, -8.683439558751 |
1467 |
|
|
+/ |
1468 |
|
|
|
1469 |
|
|
V(1)=abs(x) |
1470 |
pam-fi |
1.9 |
if(V(1).gt.20.)V(1)=20. |
1471 |
mocchiut |
1.1 |
|
1472 |
|
|
HQUADF = 0. |
1473 |
|
|
DO 20 J = 1, NPAR |
1474 |
|
|
HQDJ = 0. |
1475 |
|
|
DO 10 I = 1, NDIM |
1476 |
|
|
VV = (V (I) - SIGVMI (I)) / SIGVT (I) |
1477 |
|
|
HQDJ = HQDJ + (VV - SIGV (J, I)) ** 2 |
1478 |
|
|
10 CONTINUE |
1479 |
|
|
HQDJ = HQDJ + SIGDEL (J) ** 2 |
1480 |
|
|
HQDJ = SQRT (HQDJ) |
1481 |
|
|
HQUADF = HQUADF + SIGA (J) * HQDJ |
1482 |
|
|
20 CONTINUE |
1483 |
|
|
IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) |
1484 |
|
|
|
1485 |
pam-fi |
1.13 |
risxeta4=HQUADF* 1e-4 |
1486 |
mocchiut |
1.1 |
|
1487 |
|
|
END |
1488 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
1489 |
pam-fi |
1.13 |
FUNCTION risyeta2(x) |
1490 |
mocchiut |
1.1 |
DOUBLE PRECISION V( 1) |
1491 |
|
|
INTEGER NPAR, NDIM, IMQFUN, I, J |
1492 |
|
|
DOUBLE PRECISION HQDJ, VV, VCONST |
1493 |
|
|
DOUBLE PRECISION SIGVMI( 1), SIGVT( 1) |
1494 |
|
|
DOUBLE PRECISION SIGV( 12, 1) |
1495 |
|
|
DOUBLE PRECISION SIGDEL( 12) |
1496 |
|
|
DOUBLE PRECISION SIGA( 12) |
1497 |
|
|
DATA NPAR, NDIM, IMQFUN / 12, 1, 1/ |
1498 |
|
|
DATA VCONST / 0.000000000000 / |
1499 |
|
|
DATA SIGVMI / -20.50000000000 / |
1500 |
|
|
DATA SIGVT / 41.00000000000 / |
1501 |
|
|
DATA SIGV / 0.1585365831852 |
1502 |
|
|
+, 0.4024389982224 |
1503 |
|
|
+, 0.4756097495556 |
1504 |
|
|
+, 0.5243902206421 |
1505 |
|
|
+, 0.5975609421730 |
1506 |
|
|
+, 0.8414633870125 |
1507 |
|
|
+, 0.000000000000 |
1508 |
|
|
+, 1.000000000000 |
1509 |
|
|
+, 0.2682926654816 |
1510 |
|
|
+, 0.3170731663704 |
1511 |
|
|
+, 0.7073170542717 |
1512 |
|
|
+, 0.7560975551605 |
1513 |
|
|
+/ |
1514 |
|
|
DATA SIGDEL / 0.4878048598766E-01 |
1515 |
|
|
+, 0.4878048598766E-01 |
1516 |
|
|
+, 0.4878048598766E-01 |
1517 |
|
|
+, 0.4878048598766E-01 |
1518 |
|
|
+, 0.4878048598766E-01 |
1519 |
|
|
+, 0.4878048598766E-01 |
1520 |
|
|
+, 0.1999999994950E-05 |
1521 |
|
|
+, 0.1999999994950E-05 |
1522 |
|
|
+, 0.9756097197533E-01 |
1523 |
|
|
+, 0.9756097197533E-01 |
1524 |
|
|
+, 0.9756097197533E-01 |
1525 |
|
|
+, 0.9756097197533E-01 |
1526 |
|
|
+/ |
1527 |
|
|
DATA SIGA / 14.57433603529 |
1528 |
|
|
+, -15.93532436156 |
1529 |
|
|
+, -13.24628335221 |
1530 |
|
|
+, -14.31193855410 |
1531 |
|
|
+, -12.67339684488 |
1532 |
|
|
+, 18.19876051780 |
1533 |
|
|
+, -5.270493486725 |
1534 |
|
|
+, -5.107670990828 |
1535 |
|
|
+, -9.553262933901 |
1536 |
|
|
+, 43.34150727448 |
1537 |
|
|
+, 55.91366786432 |
1538 |
|
|
+, -29.38037318563 |
1539 |
|
|
+/ |
1540 |
|
|
|
1541 |
|
|
v(1)= abs(x) |
1542 |
pam-fi |
1.9 |
if(V(1).gt.20.)V(1)=20. |
1543 |
mocchiut |
1.1 |
|
1544 |
|
|
HQUADF = 0. |
1545 |
|
|
DO 20 J = 1, NPAR |
1546 |
|
|
HQDJ = 0. |
1547 |
|
|
DO 10 I = 1, NDIM |
1548 |
|
|
VV = (V (I) - SIGVMI (I)) / SIGVT (I) |
1549 |
|
|
HQDJ = HQDJ + (VV - SIGV (J, I)) ** 2 |
1550 |
|
|
10 CONTINUE |
1551 |
|
|
HQDJ = HQDJ + SIGDEL (J) ** 2 |
1552 |
|
|
HQDJ = SQRT (HQDJ) |
1553 |
|
|
HQUADF = HQUADF + SIGA (J) * HQDJ |
1554 |
|
|
20 CONTINUE |
1555 |
|
|
IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) |
1556 |
|
|
|
1557 |
pam-fi |
1.13 |
risyeta2=HQUADF* 1e-4 |
1558 |
mocchiut |
1.1 |
|
1559 |
|
|
END |
1560 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
1561 |
|
|
|
1562 |
|
|
FUNCTION risy_cog(x) |
1563 |
|
|
DOUBLE PRECISION V( 1) |
1564 |
|
|
INTEGER NPAR, NDIM, IMQFUN, I, J |
1565 |
|
|
DOUBLE PRECISION HQDJ, VV, VCONST |
1566 |
|
|
DOUBLE PRECISION SIGVMI( 1), SIGVT( 1) |
1567 |
|
|
DOUBLE PRECISION SIGV( 10, 1) |
1568 |
|
|
DOUBLE PRECISION SIGDEL( 10) |
1569 |
|
|
DOUBLE PRECISION SIGA( 10) |
1570 |
|
|
DATA NPAR, NDIM, IMQFUN / 10, 1, 1/ |
1571 |
|
|
DATA VCONST / 0.000000000000 / |
1572 |
|
|
DATA SIGVMI / -20.50000000000 / |
1573 |
|
|
DATA SIGVT / 41.00000000000 / |
1574 |
|
|
DATA SIGV / 0.1585365831852 |
1575 |
|
|
+, 0.8414633870125 |
1576 |
|
|
+, 0.000000000000 |
1577 |
|
|
+, 1.000000000000 |
1578 |
|
|
+, 0.4634146094322 |
1579 |
|
|
+, 0.5121951103210 |
1580 |
|
|
+, 0.5609756112099 |
1581 |
|
|
+, 0.6585365533829 |
1582 |
|
|
+, 0.7073170542717 |
1583 |
|
|
+, 0.3414633870125 |
1584 |
|
|
+/ |
1585 |
|
|
DATA SIGDEL / 0.4878048598766E-01 |
1586 |
|
|
+, 0.4878048598766E-01 |
1587 |
|
|
+, 0.1999999994950E-05 |
1588 |
|
|
+, 0.1999999994950E-05 |
1589 |
|
|
+, 0.9756097197533E-01 |
1590 |
|
|
+, 0.9756097197533E-01 |
1591 |
|
|
+, 0.9756097197533E-01 |
1592 |
|
|
+, 0.9756097197533E-01 |
1593 |
|
|
+, 0.9756097197533E-01 |
1594 |
|
|
+, 0.1951219439507 |
1595 |
|
|
+/ |
1596 |
|
|
DATA SIGA / 23.73833445988 |
1597 |
|
|
+, 24.10182100013 |
1598 |
|
|
+, 1.865894323190 |
1599 |
|
|
+, 1.706006262931 |
1600 |
|
|
+, -1.075607857202 |
1601 |
|
|
+, -22.11489493403 |
1602 |
|
|
+, 1.663100707801 |
1603 |
|
|
+, 4.089852595440 |
1604 |
|
|
+, -4.314993873697 |
1605 |
|
|
+, -2.174479487744 |
1606 |
|
|
+/ |
1607 |
|
|
|
1608 |
|
|
V(1)=abs(x) |
1609 |
pam-fi |
1.9 |
if(V(1).gt.20.)V(1)=20. |
1610 |
mocchiut |
1.1 |
|
1611 |
|
|
HQUADF = 0. |
1612 |
|
|
DO 20 J = 1, NPAR |
1613 |
|
|
HQDJ = 0. |
1614 |
|
|
DO 10 I = 1, NDIM |
1615 |
|
|
VV = (V (I) - SIGVMI (I)) / SIGVT (I) |
1616 |
|
|
HQDJ = HQDJ + (VV - SIGV (J, I)) ** 2 |
1617 |
|
|
10 CONTINUE |
1618 |
|
|
HQDJ = HQDJ + SIGDEL (J) ** 2 |
1619 |
|
|
HQDJ = SQRT (HQDJ) |
1620 |
|
|
HQUADF = HQUADF + SIGA (J) * HQDJ |
1621 |
|
|
20 CONTINUE |
1622 |
|
|
IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) |
1623 |
|
|
|
1624 |
|
|
risy_cog=HQUADF* 1e-4 |
1625 |
|
|
|
1626 |
|
|
END |
1627 |
|
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
1628 |
|
|
FUNCTION risx_cog(x) |
1629 |
|
|
DOUBLE PRECISION V( 1) |
1630 |
|
|
INTEGER NPAR, NDIM, IMQFUN, I, J |
1631 |
|
|
DOUBLE PRECISION HQDJ, VV, VCONST |
1632 |
|
|
DOUBLE PRECISION SIGVMI( 1), SIGVT( 1) |
1633 |
|
|
DOUBLE PRECISION SIGV( 15, 1) |
1634 |
|
|
DOUBLE PRECISION SIGDEL( 15) |
1635 |
|
|
DOUBLE PRECISION SIGA( 15) |
1636 |
|
|
DATA NPAR, NDIM, IMQFUN / 15, 1, 1/ |
1637 |
|
|
DATA VCONST / 0.000000000000 / |
1638 |
|
|
DATA SIGVMI / -20.50000000000 / |
1639 |
|
|
DATA SIGVT / 41.00000000000 / |
1640 |
|
|
DATA SIGV / 0.6097560748458E-01 |
1641 |
|
|
+, 0.8536584675312E-01 |
1642 |
|
|
+, 0.1341463327408 |
1643 |
|
|
+, 0.2317073047161 |
1644 |
|
|
+, 0.2804878056049 |
1645 |
|
|
+, 0.3780487775803 |
1646 |
|
|
+, 0.6219512224197 |
1647 |
|
|
+, 0.7195121645927 |
1648 |
|
|
+, 0.7682926654816 |
1649 |
|
|
+, 0.8658536076546 |
1650 |
|
|
+, 0.9146341085434 |
1651 |
|
|
+, 0.9390243291855 |
1652 |
|
|
+, 0.000000000000 |
1653 |
|
|
+, 1.000000000000 |
1654 |
|
|
+, 0.5121951103210 |
1655 |
|
|
+/ |
1656 |
|
|
DATA SIGDEL / 0.4878048598766E-01 |
1657 |
|
|
+, 0.4878048598766E-01 |
1658 |
|
|
+, 0.4878048598766E-01 |
1659 |
|
|
+, 0.4878048598766E-01 |
1660 |
|
|
+, 0.4878048598766E-01 |
1661 |
|
|
+, 0.4878048598766E-01 |
1662 |
|
|
+, 0.4878048598766E-01 |
1663 |
|
|
+, 0.4878048598766E-01 |
1664 |
|
|
+, 0.4878048598766E-01 |
1665 |
|
|
+, 0.4878048598766E-01 |
1666 |
|
|
+, 0.4878048598766E-01 |
1667 |
|
|
+, 0.4878048598766E-01 |
1668 |
|
|
+, 0.1999999994950E-05 |
1669 |
|
|
+, 0.1999999994950E-05 |
1670 |
|
|
+, 0.9756097197533E-01 |
1671 |
|
|
+/ |
1672 |
|
|
DATA SIGA / 31.95672945139 |
1673 |
|
|
+, -34.23286209245 |
1674 |
|
|
+, -6.298459168211 |
1675 |
|
|
+, 10.98847700545 |
1676 |
|
|
+,-0.3052213535054 |
1677 |
|
|
+, 13.10517991464 |
1678 |
|
|
+, 15.60290821679 |
1679 |
|
|
+, -1.956118448507 |
1680 |
|
|
+, 12.41453816720 |
1681 |
|
|
+, -7.354056408553 |
1682 |
|
|
+, -32.32512668778 |
1683 |
|
|
+, 30.61116178966 |
1684 |
|
|
+, 1.418505329236 |
1685 |
|
|
+, 1.583492573619 |
1686 |
|
|
+, -18.48799977042 |
1687 |
|
|
+/ |
1688 |
|
|
|
1689 |
|
|
V(1)=abs(x) |
1690 |
pam-fi |
1.9 |
if(V(1).gt.20.)V(1)=20. |
1691 |
mocchiut |
1.1 |
|
1692 |
|
|
HQUADF = 0. |
1693 |
|
|
DO 20 J = 1, NPAR |
1694 |
|
|
HQDJ = 0. |
1695 |
|
|
DO 10 I = 1, NDIM |
1696 |
|
|
VV = (V (I) - SIGVMI (I)) / SIGVT (I) |
1697 |
|
|
HQDJ = HQDJ + (VV - SIGV (J, I)) ** 2 |
1698 |
|
|
10 CONTINUE |
1699 |
|
|
HQDJ = HQDJ + SIGDEL (J) ** 2 |
1700 |
|
|
HQDJ = SQRT (HQDJ) |
1701 |
|
|
HQUADF = HQUADF + SIGA (J) * HQDJ |
1702 |
|
|
20 CONTINUE |
1703 |
|
|
IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) |
1704 |
|
|
|
1705 |
|
|
risx_cog = HQUADF * 1e-4 |
1706 |
|
|
|
1707 |
|
|
END |