| 164 |
end |
end |
| 165 |
|
|
| 166 |
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
| 167 |
real function ris_eta(ic,angle) |
c real function riseta(ic,angle) |
| 168 |
|
real function riseta(iview,angle) |
| 169 |
*-------------------------------------------------------------- |
*-------------------------------------------------------------- |
| 170 |
* this function returns the average spatial resolution |
* this function returns the average spatial resolution |
| 171 |
* (in cm) for the ETA algorithm (function pfaeta(ic,angle)) |
* (in cm) for the ETA algorithm (function pfaeta(ic,angle)) |
| 180 |
include 'level1.f' |
include 'level1.f' |
| 181 |
include 'calib.f' |
include 'calib.f' |
| 182 |
|
|
| 183 |
ris_eta = 0 |
riseta = 0 |
| 184 |
|
|
| 185 |
if(mod(int(VIEW(ic)),2).eq.1)then !Y-view |
c if(mod(int(VIEW(ic)),2).eq.1)then !Y-view |
| 186 |
|
if(mod(iview,2).eq.1)then !Y-view |
| 187 |
|
|
| 188 |
|
|
| 189 |
if( abs(angle).ge.e2fay.and.abs(angle).le.e2tay )then |
if( abs(angle).ge.e2fay.and.abs(angle).le.e2tay )then |
| 190 |
ris_eta = risy_eta2(angle) |
riseta = risy_eta2(angle) |
| 191 |
elseif( abs(angle).ge.e3fay.and.abs(angle).le.e3tay )then |
elseif( abs(angle).ge.e3fay.and.abs(angle).le.e3tay )then |
| 192 |
ris_eta = risy_cog(angle) !ATTENZIONE!! |
riseta = risy_cog(angle) !ATTENZIONE!! |
| 193 |
elseif( abs(angle).ge.e4fay.and.abs(angle).le.e4tay )then |
elseif( abs(angle).ge.e4fay.and.abs(angle).le.e4tay )then |
| 194 |
ris_eta = risy_cog(angle) !ATTENZIONE!! |
riseta = risy_cog(angle) !ATTENZIONE!! |
| 195 |
else |
else |
| 196 |
ris_eta = risy_cog(angle) |
riseta = risy_cog(angle) |
| 197 |
endif |
endif |
| 198 |
|
|
| 199 |
else !X-view |
else !X-view |
| 200 |
|
|
| 201 |
if( abs(angle).ge.e2fax.and.abs(angle).le.e2tax )then |
if( abs(angle).ge.e2fax.and.abs(angle).le.e2tax )then |
| 202 |
ris_eta = risx_eta2(angle) |
riseta = risx_eta2(angle) |
| 203 |
elseif( abs(angle).ge.e3fax.and.abs(angle).le.e3tax )then |
elseif( abs(angle).ge.e3fax.and.abs(angle).le.e3tax )then |
| 204 |
ris_eta = risx_eta3(angle) |
riseta = risx_eta3(angle) |
| 205 |
elseif( abs(angle).ge.e4fax.and.abs(angle).le.e4tax )then |
elseif( abs(angle).ge.e4fax.and.abs(angle).le.e4tax )then |
| 206 |
ris_eta = risx_eta4(angle) |
riseta = risx_eta4(angle) |
| 207 |
else |
else |
| 208 |
ris_eta = risx_cog(angle) |
riseta = risx_cog(angle) |
| 209 |
endif |
endif |
| 210 |
|
|
| 211 |
endif |
endif |
| 212 |
|
|
| 213 |
|
print*,'---- ',riseta,iview,angle |
| 214 |
|
|
| 215 |
100 return |
100 return |
| 216 |
end |
end |
| 217 |
|
|
| 785 |
if((sl2+sl1+sc+sr1).ne.0) |
if((sl2+sl1+sc+sr1).ne.0) |
| 786 |
$ COG = (sr1-sl1-2*sl2)/(sl2+sl1+sc+sr1) |
$ COG = (sr1-sl1-2*sl2)/(sl2+sl1+sc+sr1) |
| 787 |
elseif(sl2.le.sr2)then |
elseif(sl2.le.sr2)then |
| 788 |
if((sl2+sl1+sc+sr1).ne.0) |
if((sr2+sl1+sc+sr1).ne.0) |
| 789 |
$ COG = (2*sr2+sr1-sl1)/(sl2+sl1+sc+sr1) |
$ COG = (2*sr2+sr1-sl1)/(sr2+sl1+sc+sr1) |
| 790 |
endif |
endif |
| 791 |
else |
else |
| 792 |
print*,'function COG(NCOG,IC) ==> WARNING!! NCOG=',NCOG |
print*,'function COG(NCOG,IC) ==> WARNING!! NCOG=',NCOG |
| 818 |
COG = COG + ipos*CLSIGNAL(i) |
COG = COG + ipos*CLSIGNAL(i) |
| 819 |
SGN = SGN + CLSIGNAL(i) |
SGN = SGN + CLSIGNAL(i) |
| 820 |
mu = mu + 1 |
mu = mu + 1 |
| 821 |
print*,ipos,CLSIGNAL(i) |
c print*,ipos,CLSIGNAL(i) |
| 822 |
else |
else |
| 823 |
goto 10 |
goto 10 |
| 824 |
endif |
endif |
| 831 |
COG = COG + ipos*CLSIGNAL(i) |
COG = COG + ipos*CLSIGNAL(i) |
| 832 |
SGN = SGN + CLSIGNAL(i) |
SGN = SGN + CLSIGNAL(i) |
| 833 |
mu = mu + 1 |
mu = mu + 1 |
| 834 |
print*,ipos,CLSIGNAL(i) |
c print*,ipos,CLSIGNAL(i) |
| 835 |
else |
else |
| 836 |
goto 20 |
goto 20 |
| 837 |
endif |
endif |
| 838 |
enddo |
enddo |
| 839 |
20 continue |
20 continue |
| 840 |
if(SGN.le.0)then |
if(SGN.le.0)then |
| 841 |
c print*,'cog(0,ic) --> ic, dedx ',ic,SGN |
print*,'cog(0,ic) --> ic, dedx ',ic,SGN |
| 842 |
print*,(CLSIGNAL(i)/CLSIGMA(i),i=istart,istop) |
print*,(CLSIGNAL(i)/CLSIGMA(i),i=istart,istop) |
| 843 |
print*,(CLSIGNAL(i),i=istart,istop) |
print*,(CLSIGNAL(i),i=istart,istop) |
| 844 |
c print*,'cog(0,ic) --> NOT EVALUATED ' |
c print*,'cog(0,ic) --> NOT EVALUATED ' |