9 |
|
|
10 |
c2f_error = 0 |
c2f_error = 0 |
11 |
|
|
12 |
c if(C2F_DEBUG.eq.1)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
13 |
if(verbose)print * |
if(verbose.eq.1)print * |
14 |
$ ,c2f_path(1:c2f_pathlen)//'trk-maskvk.dat' |
$ ,c2f_path(1:c2f_pathlen)//'trk-maskvk.dat' |
15 |
open(10, |
open(10, |
16 |
$ FILE=c2f_path(1:c2f_pathlen)//'trk-maskvk.dat' !<<<< C2F |
$ FILE=c2f_path(1:c2f_pathlen)//'trk-maskvk.dat' !<<<< C2F |
18 |
$ ,IOSTAT=iostat |
$ ,IOSTAT=iostat |
19 |
$ ) |
$ ) |
20 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
21 |
c if(C2F_DEBUG.eq.1) |
c if(C2F_DEBUG.EQ.1.eq.1) |
22 |
if(debug) |
if(debug.eq.1) |
23 |
$ print*,'READVKMASK: *** Error opening file ***' |
$ print*,'READVKMASK: *** Error opening file ***' |
24 |
c2f_error = 1 |
c2f_error = 1 |
25 |
return |
return |
30 |
$ ) |
$ ) |
31 |
$ (mask_vk(iv,i),i=1,24) |
$ (mask_vk(iv,i),i=1,24) |
32 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
33 |
c if(C2F_DEBUG.eq.1) |
c if(C2F_DEBUG.EQ.1.eq.1) |
34 |
if(debug) |
if(debug.eq.1) |
35 |
$ print*,'READVKMASK: *** Error reading file ***' |
$ print*,'READVKMASK: *** Error reading file ***' |
36 |
c2f_error = 1 |
c2f_error = 1 |
37 |
goto 1000 |
goto 1000 |
56 |
201 format('trk-LADDER',i1,'-mip.dat') |
201 format('trk-LADDER',i1,'-mip.dat') |
57 |
do ilad=1,nladders_view |
do ilad=1,nladders_view |
58 |
write(fname_param,201)ilad |
write(fname_param,201)ilad |
59 |
c if(C2F_DEBUG.eq.1)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
60 |
if(VERBOSE)print * |
if(VERBOSE.EQ.1)print * |
61 |
$ ,c2f_path(1:c2f_pathlen)!<<<< C2F |
$ ,c2f_path(1:c2f_pathlen)!<<<< C2F |
62 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
63 |
open(10, |
open(10, |
67 |
$ ,IOSTAT=iostat |
$ ,IOSTAT=iostat |
68 |
$ ) |
$ ) |
69 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
70 |
c if(C2F_DEBUG.eq.1)print* |
c if(C2F_DEBUG.EQ.1.eq.1)print* |
71 |
if(DEBUG)print* |
if(DEBUG.EQ.1)print* |
72 |
$ ,'READMIPPARAM: *** Error opening file *** ' |
$ ,'READMIPPARAM: *** Error opening file *** ' |
73 |
c2f_error = 1 |
c2f_error = 1 |
74 |
return |
return |
100 |
201 format('charge-l',i1,'.dat') |
201 format('charge-l',i1,'.dat') |
101 |
do ilad=1,nladders_view |
do ilad=1,nladders_view |
102 |
write(fname_param,201)ilad |
write(fname_param,201)ilad |
103 |
c if(C2F_DEBUG.eq.1)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
104 |
if(VERBOSE)print * |
if(VERBOSE.EQ.1)print * |
105 |
$ ,c2f_path(1:c2f_pathlen)!<<<< C2F |
$ ,c2f_path(1:c2f_pathlen)!<<<< C2F |
106 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
107 |
open(10, |
open(10, |
153 |
* read ANGULAR BINNING info |
* read ANGULAR BINNING info |
154 |
* ====================================================== |
* ====================================================== |
155 |
fname_binning='binning.dat' |
fname_binning='binning.dat' |
156 |
c if(C2F_DEBUG.eq.1) |
c if(C2F_DEBUG.EQ.1.eq.1) |
157 |
if(VERBOSE) |
if(VERBOSE.EQ.1) |
158 |
$ print * |
$ print * |
159 |
$ ,c2f_path(1:c2f_pathlen) !<<<< C2F |
$ ,c2f_path(1:c2f_pathlen) !<<<< C2F |
160 |
$ //fname_binning(1:LNBLNK(fname_binning)) |
$ //fname_binning(1:LNBLNK(fname_binning)) |
165 |
$ ,IOSTAT=iostat |
$ ,IOSTAT=iostat |
166 |
$ ) |
$ ) |
167 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
168 |
c if(C2F_DEBUG.eq.1) |
c if(C2F_DEBUG.EQ.1.eq.1) |
169 |
if(DEBUG) |
if(DEBUG.EQ.1) |
170 |
$ print*,'READETAPARAM: *** Error in opening file *** ' |
$ print*,'READETAPARAM: *** Error in opening file *** ' |
171 |
c2f_error = 1 |
c2f_error = 1 |
172 |
return |
return |
195 |
* ====================================================== |
* ====================================================== |
196 |
do ieta=2,4 !loop on eta 2,3,4 |
do ieta=2,4 !loop on eta 2,3,4 |
197 |
200 format(' Opening eta',i1,' files...') |
200 format(' Opening eta',i1,' files...') |
198 |
c if(C2F_DEBUG.eq.1)write(*,200)ieta |
c if(C2F_DEBUG.EQ.1.eq.1)write(*,200)ieta |
199 |
if(VERBOSE)write(*,200)ieta |
if(VERBOSE.EQ.1)write(*,200)ieta |
200 |
|
|
201 |
201 format('eta',i1,'-bin',i1,'-l',i1,'.dat') |
201 format('eta',i1,'-bin',i1,'-l',i1,'.dat') |
202 |
202 format('eta',i1,'-bin',i2,'-l',i1,'.dat') |
202 format('eta',i1,'-bin',i2,'-l',i1,'.dat') |
203 |
do iang=1,nangbin |
do iang=1,nangbin |
204 |
do ilad=1,nladders_view |
do ilad=1,nladders_view |
205 |
|
|
206 |
if(iang.lt.10)write(fname_param,201)ieta,iang,ilad |
if(iang.lt.10)write(fname_param,201)ieta,iang,ilad |
207 |
if(iang.ge.10)write(fname_param,202)ieta,iang,ilad |
if(iang.ge.10)write(fname_param,202)ieta,iang,ilad |
208 |
open(10, |
open(10, |
213 |
$ ,IOSTAT=iostat |
$ ,IOSTAT=iostat |
214 |
$ ) |
$ ) |
215 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
216 |
c if(C2F_DEBUG.eq.1) |
c if(DEBUG.EQ.1) |
217 |
if(DEBUG) |
if(.true.) |
218 |
$ print*,'READETAPARAM: ** Error opening file ** ' |
$ print*,'READETAPARAM: ** Error opening file ** ' |
219 |
$ ,c2f_path(1:c2f_pathlen) |
$ ,c2f_path(1:c2f_pathlen) |
220 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
241 |
$ (feta4(ival,iv,ilad,iang),iv=1,nviews) |
$ (feta4(ival,iv,ilad,iang),iv=1,nviews) |
242 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
243 |
if(netaval.eq.0)then |
if(netaval.eq.0)then |
244 |
c if(C2F_DEBUG.eq.1)print*,'READETAPARAM: ' |
c if(C2F_DEBUG.EQ.1.eq.1)print*,'READETAPARAM: ' |
245 |
if(DEBUG)print*,'READETAPARAM: ' |
c if(DEBUG.EQ.1) |
246 |
|
if(.true.) |
247 |
|
$ print*,'READETAPARAM: ' |
248 |
$ //'*** Error reading file *** ' |
$ //'*** Error reading file *** ' |
249 |
$ ,c2f_path(1:c2f_pathlen) |
$ ,c2f_path(1:c2f_pathlen) |
250 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
266 |
* ====================================================== |
* ====================================================== |
267 |
* read landi correction |
* read landi correction |
268 |
* ====================================================== |
* ====================================================== |
269 |
if(VERBOSE)print*,' Opening landi-correction files...' |
if(VERBOSE.eq.1)print*,' Opening landi-correction files...' |
270 |
|
|
271 |
301 format('lcorr-l',i1,'.dat') |
301 format('lcorr-l',i1,'.dat') |
272 |
do ilad=1,nladders_view |
do ilad=1,nladders_view |
293 |
read(10,*,IOSTAT=iostat) |
read(10,*,IOSTAT=iostat) |
294 |
$ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
$ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
295 |
|
|
296 |
write(*,*) |
c write(*,*) |
297 |
$ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
c $ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
298 |
|
|
299 |
if(ii.ne.iang)print*,'parametri eta incasinati' |
if(ii.ne.iang)print*,'parametri eta incasinati' |
300 |
if(aal.ne.angl(iang))print*,'parametri eta incasinati' |
if(aal.ne.angl(iang))print*,'parametri eta incasinati' |
315 |
3001 continue |
3001 continue |
316 |
|
|
317 |
enddo ! end loop on ladders |
enddo ! end loop on ladders |
318 |
|
|
319 |
return |
return |
320 |
end |
end |
321 |
|
|
347 |
do is=1,2 |
do is=1,2 |
348 |
|
|
349 |
write(fname_param,100)ilad,is |
write(fname_param,100)ilad,is |
350 |
c if(C2F_DEBUG.eq.1)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
351 |
if(VERBOSE)print * |
if(VERBOSE.EQ.1)print * |
352 |
$ ,c2f_path(1:c2f_pathlen) |
$ ,c2f_path(1:c2f_pathlen) |
353 |
$ //fname_param |
$ //fname_param |
354 |
|
|
424 |
|
|
425 |
c2f_error = 0 |
c2f_error = 0 |
426 |
|
|
427 |
c if(C2F_DEBUG.eq.1)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
428 |
if(VERBOSE)print * |
if(VERBOSE.EQ.1)print * |
429 |
$ ,c2f_path(1:c2f_pathlen)//'mech_pos.dat' |
$ ,c2f_path(1:c2f_pathlen)//'mech_pos.dat' |
430 |
open(10 |
open(10 |
431 |
$ ,FILE= |
$ ,FILE= |