| 10 |
if(ipfa.eq.2)CPFA='ETA2' |
if(ipfa.eq.2)CPFA='ETA2' |
| 11 |
if(ipfa.eq.3)CPFA='ETA3' |
if(ipfa.eq.3)CPFA='ETA3' |
| 12 |
if(ipfa.eq.4)CPFA='ETA4' |
if(ipfa.eq.4)CPFA='ETA4' |
| 13 |
|
if(ipfa.eq.5)CPFA='ETAL' |
| 14 |
if(ipfa.eq.10)CPFA='COG' |
if(ipfa.eq.10)CPFA='COG' |
| 15 |
if(ipfa.eq.11)CPFA='COG1' |
if(ipfa.eq.11)CPFA='COG1' |
| 16 |
if(ipfa.eq.12)CPFA='COG2' |
if(ipfa.eq.12)CPFA='COG2' |
| 165 |
end |
end |
| 166 |
|
|
| 167 |
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
| 168 |
|
real function pfaetal(ic,angle) |
| 169 |
|
*-------------------------------------------------------------- |
| 170 |
|
* this function returns the position (in strip units) |
| 171 |
|
* it calls: |
| 172 |
|
* - pfaeta2(ic,angle)+pfcorr(ic,angle) |
| 173 |
|
* - pfaeta3(ic,angle)+pfcorr(ic,angle) |
| 174 |
|
* - pfaeta4(ic,angle)+pfcorr(ic,angle) |
| 175 |
|
* according to the angle |
| 176 |
|
*-------------------------------------------------------------- |
| 177 |
|
include 'commontracker.f' |
| 178 |
|
include 'level1.f' |
| 179 |
|
include 'calib.f' |
| 180 |
|
|
| 181 |
|
pfaeta = 0 |
| 182 |
|
|
| 183 |
|
if(mod(int(VIEW(ic)),2).eq.1)then !Y-view |
| 184 |
|
|
| 185 |
|
if( abs(angle).ge.e2fay.and.abs(angle).le.e2tay )then |
| 186 |
|
pfaeta = pfaeta2(ic,angle)+pfacorr(ic,angle) |
| 187 |
|
elseif( abs(angle).ge.e3fay.and.abs(angle).le.e3tay )then |
| 188 |
|
pfaeta = pfaeta3(ic,angle)+pfacorr(ic,angle) |
| 189 |
|
elseif( abs(angle).ge.e4fay.and.abs(angle).le.e4tay )then |
| 190 |
|
pfaeta = pfaeta4(ic,angle)+pfacorr(ic,angle) |
| 191 |
|
else |
| 192 |
|
pfaeta = cog(4,ic) |
| 193 |
|
endif |
| 194 |
|
|
| 195 |
|
else !X-view |
| 196 |
|
|
| 197 |
|
if( abs(angle).ge.e2fax.and.abs(angle).le.e2tax )then |
| 198 |
|
pfaeta = pfaeta2(ic,angle)+pfacorr(ic,angle) |
| 199 |
|
elseif( abs(angle).ge.e3fax.and.abs(angle).le.e3tax )then |
| 200 |
|
pfaeta = pfaeta3(ic,angle)+pfacorr(ic,angle) |
| 201 |
|
elseif( abs(angle).ge.e4fax.and.abs(angle).le.e4tax )then |
| 202 |
|
pfaeta = pfaeta4(ic,angle)+pfacorr(ic,angle) |
| 203 |
|
else |
| 204 |
|
pfaeta = cog(4,ic) |
| 205 |
|
endif |
| 206 |
|
|
| 207 |
|
endif |
| 208 |
|
|
| 209 |
|
100 return |
| 210 |
|
end |
| 211 |
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
| 212 |
c real function riseta(ic,angle) |
c real function riseta(ic,angle) |
| 213 |
real function riseta(iview,angle) |
real function riseta(iview,angle) |
| 214 |
*-------------------------------------------------------------- |
*-------------------------------------------------------------- |
| 255 |
|
|
| 256 |
endif |
endif |
| 257 |
|
|
|
cc print*,'---- ',riseta,iview,angle |
|
| 258 |
|
|
| 259 |
100 return |
100 return |
| 260 |
end |
end |
| 831 |
if( clsigma(indmax(ic)-1).gt.clsigma(indmax(ic)+1) |
if( clsigma(indmax(ic)-1).gt.clsigma(indmax(ic)+1) |
| 832 |
$ .and.(sc+sr1).ne.0 )cog = sr1/(sc+sr1) !NEW |
$ .and.(sc+sr1).ne.0 )cog = sr1/(sc+sr1) !NEW |
| 833 |
endif |
endif |
| 834 |
c$$$ if(cog==0)print*,'Strange cluster (2) - @maxs ',MAXS(ic) |
c if(cog==0)print*,'Strange cluster (2) - @maxs ',MAXS(ic) |
| 835 |
c$$$ $ ,VIEW(ic),LADDER(ic) |
c $ ,' : ',sl2,sl1,sc,sr1,sr2 |
|
c$$$ $ ,' : ',sl2,sl1,sc,sr1,sr2 |
|
| 836 |
c ============================================================== |
c ============================================================== |
| 837 |
elseif(ncog.eq.3)then |
elseif(ncog.eq.3)then |
| 838 |
if( (sl1+sc+sr1).ne.0 )COG = (sr1-sl1)/(sl1+sc+sr1) |
if( (sl1+sc+sr1).ne.0 )COG = (sr1-sl1)/(sl1+sc+sr1) |
| 839 |
c$$$ if(cog==0)print*,'Strange cluster (3) - @maxs ',MAXS(ic) |
c if(cog==0)print*,'Strange cluster (3) - @maxs ',MAXS(ic) |
| 840 |
c$$$ $ ,VIEW(ic),LADDER(ic) |
c $ ,' : ',sl2,sl1,sc,sr1,sr2 |
|
c$$$ $ ,' : ',sl2,sl1,sc,sr1,sr2 |
|
| 841 |
c ============================================================== |
c ============================================================== |
| 842 |
elseif(ncog.eq.4)then |
elseif(ncog.eq.4)then |
| 843 |
if(sl2.gt.sr2)then |
if(sl2.gt.sr2)then |
| 854 |
$ .and.(sr2+sl1+sc+sr1).ne.0 ) |
$ .and.(sr2+sl1+sc+sr1).ne.0 ) |
| 855 |
$ cog = (2*sr2+sr1-sl1)/(sr2+sl1+sc+sr1) !NEW |
$ cog = (2*sr2+sr1-sl1)/(sr2+sl1+sc+sr1) !NEW |
| 856 |
endif |
endif |
|
c$$$ if(cog==0)print*,'Strange cluster (4) - @maxs ',MAXS(ic) |
|
|
c$$$ $ ,VIEW(ic),LADDER(ic) |
|
|
c$$$ $ ,' : ',sl2,sl1,sc,sr1,sr2 |
|
|
c ============================================================== |
|
| 857 |
else |
else |
| 858 |
print*,'function COG(NCOG,IC) ==> WARNING!! NCOG=',NCOG |
print*,'function COG(NCOG,IC) ==> WARNING!! NCOG=',NCOG |
| 859 |
$ ,' not implemented' |
$ ,' not implemented' |
| 1750 |
risx_cog = HQUADF * 1e-4 |
risx_cog = HQUADF * 1e-4 |
| 1751 |
|
|
| 1752 |
END |
END |
| 1753 |
|
|
| 1754 |
|
|
| 1755 |
|
*** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** |
| 1756 |
|
real function pfacorr(ic,angle) !(1) |
| 1757 |
|
*-------------------------------------------------------------- |
| 1758 |
|
* this function returns the landi correction for this cluster |
| 1759 |
|
*-------------------------------------------------------------- |
| 1760 |
|
include 'commontracker.f' |
| 1761 |
|
include 'calib.f' |
| 1762 |
|
include 'level1.f' |
| 1763 |
|
|
| 1764 |
|
real angle |
| 1765 |
|
integer iview,lad |
| 1766 |
|
|
| 1767 |
|
iview = VIEW(ic) |
| 1768 |
|
lad = nld(MAXS(ic),VIEW(ic)) |
| 1769 |
|
|
| 1770 |
|
* find angular bin |
| 1771 |
|
* (in futuro possiamo pensare di interpolare anche sull'angolo) |
| 1772 |
|
do iang=1,nangbin |
| 1773 |
|
if(angL(iang).lt.angle.and.angR(iang).ge.angle)then |
| 1774 |
|
iangle=iang |
| 1775 |
|
goto 98 |
| 1776 |
|
endif |
| 1777 |
|
enddo |
| 1778 |
|
if(DEBUG) |
| 1779 |
|
$ print*,'pfacorr *** warning *** angle out of range: ',angle |
| 1780 |
|
if(angle.lt.angL(1))iang=1 |
| 1781 |
|
if(angle.gt.angR(nangbin))iang=nangbin |
| 1782 |
|
98 continue !jump here if ok |
| 1783 |
|
|
| 1784 |
|
pfacorr = fcorr(iview,lad,iang) |
| 1785 |
|
|
| 1786 |
|
if(DEBUG)print*,'CORR (ic ',ic,' ang',angle,') -->',pfacorr |
| 1787 |
|
|
| 1788 |
|
|
| 1789 |
|
100 return |
| 1790 |
|
end |