9 |
|
|
10 |
c2f_error = 0 |
c2f_error = 0 |
11 |
|
|
12 |
c if(C2F_DEBUG.eq.1)print * |
|
13 |
if(verbose)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
14 |
|
if(verbose.eq.1)print * |
15 |
$ ,c2f_path(1:c2f_pathlen)//'trk-maskvk.dat' |
$ ,c2f_path(1:c2f_pathlen)//'trk-maskvk.dat' |
16 |
open(10, |
open(10, |
17 |
$ FILE=c2f_path(1:c2f_pathlen)//'trk-maskvk.dat' !<<<< C2F |
$ FILE=c2f_path(1:c2f_pathlen)//'trk-maskvk.dat' !<<<< C2F |
19 |
$ ,IOSTAT=iostat |
$ ,IOSTAT=iostat |
20 |
$ ) |
$ ) |
21 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
22 |
c if(C2F_DEBUG.eq.1) |
c if(C2F_DEBUG.EQ.1.eq.1) |
23 |
if(debug) |
if(debug.eq.1) |
24 |
$ print*,'READVKMASK: *** Error opening file ***' |
$ print*,'READVKMASK: *** Error opening file ***' |
25 |
c2f_error = 1 |
c2f_error = 1 |
26 |
return |
return |
31 |
$ ) |
$ ) |
32 |
$ (mask_vk(iv,i),i=1,24) |
$ (mask_vk(iv,i),i=1,24) |
33 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
34 |
c if(C2F_DEBUG.eq.1) |
c if(C2F_DEBUG.EQ.1.eq.1) |
35 |
if(debug) |
if(debug.eq.1) |
36 |
$ print*,'READVKMASK: *** Error reading file ***' |
$ print*,'READVKMASK: *** Error reading file ***' |
37 |
c2f_error = 1 |
c2f_error = 1 |
38 |
goto 1000 |
goto 1000 |
39 |
endif |
endif |
40 |
|
if(verbose.eq.1)print*,'view ',iv,': ',(mask_vk(iv,i),i=1,24) |
41 |
enddo |
enddo |
42 |
1000 close(10) |
1000 close(10) |
43 |
1001 continue |
c 1001 continue |
44 |
return |
return |
45 |
end |
end |
46 |
|
|
58 |
201 format('trk-LADDER',i1,'-mip.dat') |
201 format('trk-LADDER',i1,'-mip.dat') |
59 |
do ilad=1,nladders_view |
do ilad=1,nladders_view |
60 |
write(fname_param,201)ilad |
write(fname_param,201)ilad |
61 |
c if(C2F_DEBUG.eq.1)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
62 |
if(VERBOSE)print * |
if(VERBOSE.EQ.1)print * |
63 |
$ ,c2f_path(1:c2f_pathlen)!<<<< C2F |
$ ,c2f_path(1:c2f_pathlen)!<<<< C2F |
64 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
65 |
open(10, |
open(10, |
69 |
$ ,IOSTAT=iostat |
$ ,IOSTAT=iostat |
70 |
$ ) |
$ ) |
71 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
72 |
c if(C2F_DEBUG.eq.1)print* |
c if(C2F_DEBUG.EQ.1.eq.1)print* |
73 |
if(DEBUG)print* |
if(DEBUG.EQ.1)print* |
74 |
$ ,'READMIPPARAM: *** Error opening file *** ' |
$ ,'READMIPPARAM: *** Error opening file *** ' |
75 |
c2f_error = 1 |
c2f_error = 1 |
76 |
return |
return |
102 |
201 format('charge-l',i1,'.dat') |
201 format('charge-l',i1,'.dat') |
103 |
do ilad=1,nladders_view |
do ilad=1,nladders_view |
104 |
write(fname_param,201)ilad |
write(fname_param,201)ilad |
105 |
c if(C2F_DEBUG.eq.1)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
106 |
if(VERBOSE)print * |
if(VERBOSE.EQ.1)print * |
107 |
$ ,c2f_path(1:c2f_pathlen)!<<<< C2F |
$ ,c2f_path(1:c2f_pathlen)!<<<< C2F |
108 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
109 |
open(10, |
open(10, |
155 |
* read ANGULAR BINNING info |
* read ANGULAR BINNING info |
156 |
* ====================================================== |
* ====================================================== |
157 |
fname_binning='binning.dat' |
fname_binning='binning.dat' |
158 |
c if(C2F_DEBUG.eq.1) |
c if(C2F_DEBUG.EQ.1.eq.1) |
159 |
if(VERBOSE) |
if(VERBOSE.EQ.1) |
160 |
$ print * |
$ print * |
161 |
$ ,c2f_path(1:c2f_pathlen) !<<<< C2F |
$ ,c2f_path(1:c2f_pathlen) !<<<< C2F |
162 |
$ //fname_binning(1:LNBLNK(fname_binning)) |
$ //fname_binning(1:LNBLNK(fname_binning)) |
167 |
$ ,IOSTAT=iostat |
$ ,IOSTAT=iostat |
168 |
$ ) |
$ ) |
169 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
170 |
c if(C2F_DEBUG.eq.1) |
c if(C2F_DEBUG.EQ.1.eq.1) |
171 |
if(DEBUG) |
if(DEBUG.EQ.1) |
172 |
$ print*,'READETAPARAM: *** Error in opening file *** ' |
$ print*,'READETAPARAM: *** Error in opening file *** ' |
173 |
c2f_error = 1 |
c2f_error = 1 |
174 |
return |
return |
175 |
endif |
endif |
176 |
c print*,'---- ANGULAR BINNING ----' |
if(DEBUG.EQ.1)THEN |
177 |
c print*,'Bin - angL - angR' |
print*,'---- ANGULAR BINNING ----' |
178 |
|
print*,'Bin - angL - angR' |
179 |
|
endif |
180 |
101 format(i2,' ',f6.2,' ',f6.2) |
101 format(i2,' ',f6.2,' ',f6.2) |
181 |
xnn=0 |
xnn=0 |
182 |
do ibin=1,nangmax |
do ibin=1,nangmax |
184 |
$ ,IOSTAT=iostat |
$ ,IOSTAT=iostat |
185 |
$ )xnn,angL(ibin),angR(ibin) |
$ )xnn,angL(ibin),angR(ibin) |
186 |
if(iostat.ne.0)goto 1000 |
if(iostat.ne.0)goto 1000 |
187 |
c write(*,101)int(xnn),angL(ibin),angR(ibin) |
if(DEBUG.EQ.1)write(*,101)int(xnn),angL(ibin),angR(ibin) |
188 |
enddo |
enddo |
189 |
1000 nangbin=int(xnn) |
1000 nangbin=int(xnn) |
190 |
close(10) |
close(10) |
191 |
if(nangbin.eq.0)c2f_error = 1 |
if(nangbin.eq.0)c2f_error = 1 |
192 |
c print*,'-------------------------' |
if(DEBUG.EQ.1)THEN |
193 |
c print*,nangbin |
print*,'-------------------------' |
194 |
|
print*,nangbin |
195 |
|
endif |
196 |
|
|
197 |
|
|
198 |
|
|
201 |
* ====================================================== |
* ====================================================== |
202 |
do ieta=2,4 !loop on eta 2,3,4 |
do ieta=2,4 !loop on eta 2,3,4 |
203 |
200 format(' Opening eta',i1,' files...') |
200 format(' Opening eta',i1,' files...') |
204 |
c if(C2F_DEBUG.eq.1)write(*,200)ieta |
c if(C2F_DEBUG.EQ.1.eq.1)write(*,200)ieta |
205 |
if(VERBOSE)write(*,200)ieta |
if(VERBOSE.EQ.1)write(*,200)ieta |
206 |
|
|
207 |
201 format('eta',i1,'-bin',i1,'-l',i1,'.dat') |
201 format('eta',i1,'-bin',i1,'-l',i1,'.dat') |
208 |
202 format('eta',i1,'-bin',i2,'-l',i1,'.dat') |
202 format('eta',i1,'-bin',i2,'-l',i1,'.dat') |
209 |
do iang=1,nangbin |
do iang=1,nangbin |
210 |
do ilad=1,nladders_view |
do ilad=1,nladders_view |
211 |
|
|
212 |
if(iang.lt.10)write(fname_param,201)ieta,iang,ilad |
if(iang.lt.10)write(fname_param,201)ieta,iang,ilad |
213 |
if(iang.ge.10)write(fname_param,202)ieta,iang,ilad |
if(iang.ge.10)write(fname_param,202)ieta,iang,ilad |
214 |
open(10, |
open(10, |
219 |
$ ,IOSTAT=iostat |
$ ,IOSTAT=iostat |
220 |
$ ) |
$ ) |
221 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
222 |
c if(C2F_DEBUG.eq.1) |
c if(DEBUG.EQ.1) |
223 |
if(DEBUG) |
if(.true.) |
224 |
$ print*,'READETAPARAM: ** Error opening file ** ' |
$ print*,'READETAPARAM: ** Error opening file ** ' |
225 |
$ ,c2f_path(1:c2f_pathlen) |
$ ,c2f_path(1:c2f_pathlen) |
226 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
227 |
c2f_error = 1 |
c c2f_error = 1 !! COMMENTATO TEMPORANEAMENTE |
228 |
c return |
c return |
229 |
goto 2001 |
goto 2001 |
230 |
endif |
endif |
247 |
$ (feta4(ival,iv,ilad,iang),iv=1,nviews) |
$ (feta4(ival,iv,ilad,iang),iv=1,nviews) |
248 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
249 |
if(netaval.eq.0)then |
if(netaval.eq.0)then |
250 |
c if(C2F_DEBUG.eq.1)print*,'READETAPARAM: ' |
c if(C2F_DEBUG.EQ.1.eq.1)print*,'READETAPARAM: ' |
251 |
if(DEBUG)print*,'READETAPARAM: ' |
c if(DEBUG.EQ.1) |
252 |
|
if(.true.) |
253 |
|
$ print*,'READETAPARAM: ' |
254 |
$ //'*** Error reading file *** ' |
$ //'*** Error reading file *** ' |
255 |
$ ,c2f_path(1:c2f_pathlen) |
$ ,c2f_path(1:c2f_pathlen) |
256 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
272 |
* ====================================================== |
* ====================================================== |
273 |
* read landi correction |
* read landi correction |
274 |
* ====================================================== |
* ====================================================== |
275 |
if(VERBOSE)print*,' Opening landi-correction files...' |
if(VERBOSE.eq.1)print*,' Opening landi-correction files...' |
276 |
|
|
277 |
301 format('lcorr-l',i1,'.dat') |
301 format('lcorr-l',i1,'.dat') |
278 |
do ilad=1,nladders_view |
do ilad=1,nladders_view |
289 |
$ print*,'READETAPARAM: ** Error opening file ** ' |
$ print*,'READETAPARAM: ** Error opening file ** ' |
290 |
$ ,c2f_path(1:c2f_pathlen) |
$ ,c2f_path(1:c2f_pathlen) |
291 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
292 |
c2f_error = 1 |
c c2f_error = 1 !tolto solo temporaneamente |
293 |
c return |
c return |
294 |
goto 3001 |
goto 3001 |
295 |
endif |
endif |
299 |
read(10,*,IOSTAT=iostat) |
read(10,*,IOSTAT=iostat) |
300 |
$ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
$ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
301 |
|
|
302 |
write(*,*) |
c write(*,*) |
303 |
$ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
c $ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
304 |
|
|
305 |
if(ii.ne.iang)print*,'parametri eta incasinati' |
if(ii.ne.iang)print*,'parametri eta incasinati' |
306 |
if(aal.ne.angl(iang))print*,'parametri eta incasinati' |
if(aal.ne.angl(iang))print*,'parametri eta incasinati' |
312 |
$ //'*** Error reading file *** ' |
$ //'*** Error reading file *** ' |
313 |
$ ,c2f_path(1:c2f_pathlen) |
$ ,c2f_path(1:c2f_pathlen) |
314 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
315 |
c2f_error = 1 |
c2f_error = 1 |
316 |
goto 3000 |
goto 3000 |
317 |
endif |
endif |
318 |
|
|
321 |
3001 continue |
3001 continue |
322 |
|
|
323 |
enddo ! end loop on ladders |
enddo ! end loop on ladders |
324 |
|
|
325 |
return |
return |
326 |
end |
end |
327 |
|
|
353 |
do is=1,2 |
do is=1,2 |
354 |
|
|
355 |
write(fname_param,100)ilad,is |
write(fname_param,100)ilad,is |
356 |
c if(C2F_DEBUG.eq.1)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
357 |
if(VERBOSE)print * |
if(VERBOSE.EQ.1)print * |
358 |
$ ,c2f_path(1:c2f_pathlen) |
$ ,c2f_path(1:c2f_pathlen) |
359 |
$ //fname_param |
$ //fname_param |
360 |
|
|
430 |
|
|
431 |
c2f_error = 0 |
c2f_error = 0 |
432 |
|
|
433 |
c if(C2F_DEBUG.eq.1)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
434 |
if(VERBOSE)print * |
if(VERBOSE.EQ.1)print * |
435 |
$ ,c2f_path(1:c2f_pathlen)//'mech_pos.dat' |
$ ,c2f_path(1:c2f_pathlen)//'mech_pos.dat' |
436 |
open(10 |
open(10 |
437 |
$ ,FILE= |
$ ,FILE= |