| 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 |
| 173 |
endif |
endif |
| 174 |
c print*,'---- ANGULAR BINNING ----' |
if(DEBUG.EQ.1)THEN |
| 175 |
c print*,'Bin - angL - angR' |
print*,'---- ANGULAR BINNING ----' |
| 176 |
|
print*,'Bin - angL - angR' |
| 177 |
|
endif |
| 178 |
101 format(i2,' ',f6.2,' ',f6.2) |
101 format(i2,' ',f6.2,' ',f6.2) |
| 179 |
xnn=0 |
xnn=0 |
| 180 |
do ibin=1,nangmax |
do ibin=1,nangmax |
| 182 |
$ ,IOSTAT=iostat |
$ ,IOSTAT=iostat |
| 183 |
$ )xnn,angL(ibin),angR(ibin) |
$ )xnn,angL(ibin),angR(ibin) |
| 184 |
if(iostat.ne.0)goto 1000 |
if(iostat.ne.0)goto 1000 |
| 185 |
c write(*,101)int(xnn),angL(ibin),angR(ibin) |
if(DEBUG.EQ.1)write(*,101)int(xnn),angL(ibin),angR(ibin) |
| 186 |
enddo |
enddo |
| 187 |
1000 nangbin=int(xnn) |
1000 nangbin=int(xnn) |
| 188 |
close(10) |
close(10) |
| 189 |
if(nangbin.eq.0)c2f_error = 1 |
if(nangbin.eq.0)c2f_error = 1 |
| 190 |
c print*,'-------------------------' |
if(DEBUG.EQ.1)THEN |
| 191 |
c print*,nangbin |
print*,'-------------------------' |
| 192 |
|
print*,nangbin |
| 193 |
|
endif |
| 194 |
|
|
| 195 |
|
|
| 196 |
|
|
| 199 |
* ====================================================== |
* ====================================================== |
| 200 |
do ieta=2,4 !loop on eta 2,3,4 |
do ieta=2,4 !loop on eta 2,3,4 |
| 201 |
200 format(' Opening eta',i1,' files...') |
200 format(' Opening eta',i1,' files...') |
| 202 |
c if(C2F_DEBUG.eq.1)write(*,200)ieta |
c if(C2F_DEBUG.EQ.1.eq.1)write(*,200)ieta |
| 203 |
if(VERBOSE)write(*,200)ieta |
if(VERBOSE.EQ.1)write(*,200)ieta |
| 204 |
|
|
| 205 |
201 format('eta',i1,'-bin',i1,'-l',i1,'.dat') |
201 format('eta',i1,'-bin',i1,'-l',i1,'.dat') |
| 206 |
202 format('eta',i1,'-bin',i2,'-l',i1,'.dat') |
202 format('eta',i1,'-bin',i2,'-l',i1,'.dat') |
| 207 |
do iang=1,nangbin |
do iang=1,nangbin |
| 208 |
do ilad=1,nladders_view |
do ilad=1,nladders_view |
| 209 |
|
|
| 210 |
if(iang.lt.10)write(fname_param,201)ieta,iang,ilad |
if(iang.lt.10)write(fname_param,201)ieta,iang,ilad |
| 211 |
if(iang.ge.10)write(fname_param,202)ieta,iang,ilad |
if(iang.ge.10)write(fname_param,202)ieta,iang,ilad |
| 212 |
open(10, |
open(10, |
| 217 |
$ ,IOSTAT=iostat |
$ ,IOSTAT=iostat |
| 218 |
$ ) |
$ ) |
| 219 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
| 220 |
c if(C2F_DEBUG.eq.1) |
c if(DEBUG.EQ.1) |
| 221 |
if(DEBUG) |
if(.true.) |
| 222 |
$ print*,'READETAPARAM: ** Error opening file ** ' |
$ print*,'READETAPARAM: ** Error opening file ** ' |
| 223 |
$ ,c2f_path(1:c2f_pathlen) |
$ ,c2f_path(1:c2f_pathlen) |
| 224 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
| 225 |
c2f_error = 1 |
c c2f_error = 1 !! COMMENTATO TEMPORANEAMENTE |
| 226 |
c return |
c return |
| 227 |
goto 2001 |
goto 2001 |
| 228 |
endif |
endif |
| 245 |
$ (feta4(ival,iv,ilad,iang),iv=1,nviews) |
$ (feta4(ival,iv,ilad,iang),iv=1,nviews) |
| 246 |
if(iostat.ne.0)then |
if(iostat.ne.0)then |
| 247 |
if(netaval.eq.0)then |
if(netaval.eq.0)then |
| 248 |
c if(C2F_DEBUG.eq.1)print*,'READETAPARAM: ' |
c if(C2F_DEBUG.EQ.1.eq.1)print*,'READETAPARAM: ' |
| 249 |
if(DEBUG)print*,'READETAPARAM: ' |
c if(DEBUG.EQ.1) |
| 250 |
|
if(.true.) |
| 251 |
|
$ print*,'READETAPARAM: ' |
| 252 |
$ //'*** Error reading file *** ' |
$ //'*** Error reading file *** ' |
| 253 |
$ ,c2f_path(1:c2f_pathlen) |
$ ,c2f_path(1:c2f_pathlen) |
| 254 |
$ //fname_param(1:LNBLNK(fname_param)) |
$ //fname_param(1:LNBLNK(fname_param)) |
| 270 |
* ====================================================== |
* ====================================================== |
| 271 |
* read landi correction |
* read landi correction |
| 272 |
* ====================================================== |
* ====================================================== |
| 273 |
if(VERBOSE)print*,' Opening landi-correction files...' |
if(VERBOSE.eq.1)print*,' Opening landi-correction files...' |
| 274 |
|
|
| 275 |
301 format('lcorr-l',i1,'.dat') |
301 format('lcorr-l',i1,'.dat') |
| 276 |
do ilad=1,nladders_view |
do ilad=1,nladders_view |
| 297 |
read(10,*,IOSTAT=iostat) |
read(10,*,IOSTAT=iostat) |
| 298 |
$ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
$ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
| 299 |
|
|
| 300 |
write(*,*) |
c write(*,*) |
| 301 |
$ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
c $ ii,aal,aar,(fcorr(iv,ilad,iang),iv=1,nviews) |
| 302 |
|
|
| 303 |
if(ii.ne.iang)print*,'parametri eta incasinati' |
if(ii.ne.iang)print*,'parametri eta incasinati' |
| 304 |
if(aal.ne.angl(iang))print*,'parametri eta incasinati' |
if(aal.ne.angl(iang))print*,'parametri eta incasinati' |
| 319 |
3001 continue |
3001 continue |
| 320 |
|
|
| 321 |
enddo ! end loop on ladders |
enddo ! end loop on ladders |
| 322 |
|
|
| 323 |
return |
return |
| 324 |
end |
end |
| 325 |
|
|
| 351 |
do is=1,2 |
do is=1,2 |
| 352 |
|
|
| 353 |
write(fname_param,100)ilad,is |
write(fname_param,100)ilad,is |
| 354 |
c if(C2F_DEBUG.eq.1)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
| 355 |
if(VERBOSE)print * |
if(VERBOSE.EQ.1)print * |
| 356 |
$ ,c2f_path(1:c2f_pathlen) |
$ ,c2f_path(1:c2f_pathlen) |
| 357 |
$ //fname_param |
$ //fname_param |
| 358 |
|
|
| 428 |
|
|
| 429 |
c2f_error = 0 |
c2f_error = 0 |
| 430 |
|
|
| 431 |
c if(C2F_DEBUG.eq.1)print * |
c if(C2F_DEBUG.EQ.1.eq.1)print * |
| 432 |
if(VERBOSE)print * |
if(VERBOSE.EQ.1)print * |
| 433 |
$ ,c2f_path(1:c2f_pathlen)//'mech_pos.dat' |
$ ,c2f_path(1:c2f_pathlen)//'mech_pos.dat' |
| 434 |
open(10 |
open(10 |
| 435 |
$ ,FILE= |
$ ,FILE= |