| 702 |
endif |
endif |
| 703 |
|
|
| 704 |
endif |
endif |
| 705 |
|
c if(icy.eq.0.and.icx.ne.0) |
| 706 |
|
c $ print*,PFAx,icx,angx,stripx,resxPAM,'***' |
| 707 |
|
|
| 708 |
* ----------------- |
* ----------------- |
| 709 |
* CLUSTER Y |
* CLUSTER Y |
| 775 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
| 776 |
c (xi,yi,zi) = mechanical coordinates in the silicon sensor frame |
c (xi,yi,zi) = mechanical coordinates in the silicon sensor frame |
| 777 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
| 778 |
|
if(((mod(int(stripx+0.5)-1,1024)+1).le.3) |
| 779 |
|
$ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... |
| 780 |
|
print*,'xyz_PAM (couple):', |
| 781 |
|
$ ' WARNING: false X strip: strip ',stripx |
| 782 |
|
endif |
| 783 |
xi = acoordsi(stripx,viewx) |
xi = acoordsi(stripx,viewx) |
| 784 |
yi = acoordsi(stripy,viewy) |
yi = acoordsi(stripy,viewy) |
| 785 |
zi = 0. |
zi = 0. |
| 866 |
nldy = nldx |
nldy = nldx |
| 867 |
viewy = viewx - 1 |
viewy = viewx - 1 |
| 868 |
|
|
| 869 |
|
c print*,'X-singlet ',icx,nplx,nldx,viewx,stripx |
| 870 |
|
c if((stripx.le.3).or.(stripx.ge.1022)) then !X has 1018 strips... |
| 871 |
|
if(((mod(int(stripx+0.5)-1,1024)+1).le.3) |
| 872 |
|
$ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... |
| 873 |
|
print*,'xyz_PAM (X-singlet):', |
| 874 |
|
$ ' WARNING: false X strip: strip ',stripx |
| 875 |
|
endif |
| 876 |
xi = acoordsi(stripx,viewx) |
xi = acoordsi(stripx,viewx) |
| 877 |
|
|
| 878 |
xi_A = xi |
xi_A = xi |
| 1151 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
| 1152 |
c (xi,yi,zi) = mechanical coordinates in the silicon sensor frame |
c (xi,yi,zi) = mechanical coordinates in the silicon sensor frame |
| 1153 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
| 1154 |
|
if(((mod(int(stripx+0.5)-1,1024)+1).le.3) |
| 1155 |
|
$ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... |
| 1156 |
|
c if((stripx.le.3).or.(stripx.ge.1022)) then !X has 1018 strips... |
| 1157 |
|
print*,'whichsensor: ', |
| 1158 |
|
$ ' WARNING: false X strip: strip ',stripx |
| 1159 |
|
endif |
| 1160 |
xi = acoordsi(stripx,viewx) |
xi = acoordsi(stripx,viewx) |
| 1161 |
yi = acoordsi(stripy,viewy) |
yi = acoordsi(stripy,viewy) |
| 1162 |
zi = 0. |
zi = 0. |
| 1702 |
|
|
| 1703 |
* ---------------------------------------------------- |
* ---------------------------------------------------- |
| 1704 |
* cut on charge (X VIEW) |
* cut on charge (X VIEW) |
| 1705 |
|
* ---------------------------------------------------- |
| 1706 |
if(dedx(icx).lt.dedx_x_min)then |
if(dedx(icx).lt.dedx_x_min)then |
| 1707 |
cl_single(icx)=0 |
cl_single(icx)=0 |
| 1708 |
goto 10 |
goto 10 |
| 1709 |
endif |
endif |
| 1710 |
|
* ---------------------------------------------------- |
| 1711 |
* cut BAD (X VIEW) |
* cut BAD (X VIEW) |
| 1712 |
|
* ---------------------------------------------------- |
| 1713 |
badseed=BAD(VIEW(icx),nvk(MAXS(icx)),nst(MAXS(icx))) |
badseed=BAD(VIEW(icx),nvk(MAXS(icx)),nst(MAXS(icx))) |
| 1714 |
ifirst=INDSTART(icx) |
ifirst=INDSTART(icx) |
| 1715 |
if(icx.ne.nclstr1) then |
if(icx.ne.nclstr1) then |
| 1729 |
endif |
endif |
| 1730 |
badcl=badcl*ibad |
badcl=badcl*ibad |
| 1731 |
enddo |
enddo |
| 1732 |
|
* ---------------------------------------------------- |
| 1733 |
|
* >>> eliminato il taglio sulle BAD <<< |
| 1734 |
|
* ---------------------------------------------------- |
| 1735 |
c if(badcl.eq.0)then |
c if(badcl.eq.0)then |
| 1736 |
c cl_single(icx)=0 |
c cl_single(icx)=0 |
| 1737 |
c goto 10 |
c goto 10 |
| 1747 |
|
|
| 1748 |
* ---------------------------------------------------- |
* ---------------------------------------------------- |
| 1749 |
* cut on charge (Y VIEW) |
* cut on charge (Y VIEW) |
| 1750 |
|
* ---------------------------------------------------- |
| 1751 |
if(dedx(icy).lt.dedx_y_min)then |
if(dedx(icy).lt.dedx_y_min)then |
| 1752 |
cl_single(icy)=0 |
cl_single(icy)=0 |
| 1753 |
goto 20 |
goto 20 |
| 1754 |
endif |
endif |
| 1755 |
|
* ---------------------------------------------------- |
| 1756 |
* cut BAD (Y VIEW) |
* cut BAD (Y VIEW) |
| 1757 |
|
* ---------------------------------------------------- |
| 1758 |
badseed=BAD(VIEW(icy),nvk(MAXS(icy)),nst(MAXS(icy))) |
badseed=BAD(VIEW(icy),nvk(MAXS(icy)),nst(MAXS(icy))) |
| 1759 |
ifirst=INDSTART(icy) |
ifirst=INDSTART(icy) |
| 1760 |
if(icy.ne.nclstr1) then |
if(icy.ne.nclstr1) then |
| 1773 |
$ nst(MAXS(icy)+igood)) |
$ nst(MAXS(icy)+igood)) |
| 1774 |
badcl=badcl*ibad |
badcl=badcl*ibad |
| 1775 |
enddo |
enddo |
| 1776 |
|
* ---------------------------------------------------- |
| 1777 |
|
* >>> eliminato il taglio sulle BAD <<< |
| 1778 |
|
* ---------------------------------------------------- |
| 1779 |
c if(badcl.eq.0)then |
c if(badcl.eq.0)then |
| 1780 |
c cl_single(icy)=0 |
c cl_single(icy)=0 |
| 1781 |
c goto 20 |
c goto 20 |
| 1782 |
c endif |
c endif |
| 1783 |
* ---------------------------------------------------- |
* ---------------------------------------------------- |
| 1784 |
|
|
|
|
|
| 1785 |
cl_good(icy)=1 |
cl_good(icy)=1 |
| 1786 |
nply=npl(VIEW(icy)) |
nply=npl(VIEW(icy)) |
| 1787 |
nldy=nld(MAXS(icy),VIEW(icy)) |
nldy=nld(MAXS(icy),VIEW(icy)) |
| 1792 |
* geometrical consistency (same plane and ladder) |
* geometrical consistency (same plane and ladder) |
| 1793 |
if(nply.eq.nplx.and.nldy.eq.nldx)then |
if(nply.eq.nplx.and.nldy.eq.nldx)then |
| 1794 |
* charge correlation |
* charge correlation |
| 1795 |
ddd=(dedx(icy) |
* (modified to be applied only below saturation... obviously) |
| 1796 |
$ -kch(nplx,nldx)*dedx(icx)-cch(nplx,nldx)) |
|
| 1797 |
ddd=ddd/sqrt(kch(nplx,nldx)**2+1) |
* ------------------------------------------------------------- |
| 1798 |
cut=chcut*sch(nplx,nldx) |
* >>> eliminata (TEMPORANEAMENTE) la correlazione di carica <<< |
| 1799 |
if(abs(ddd).gt.cut)goto 20 !charge not consistent |
* ------------------------------------------------------------- |
| 1800 |
|
c$$$ if(dedx(icy).lt.chsaty.or.dedx(icx).lt.chsatx)then |
| 1801 |
|
c$$$ ddd=(dedx(icy) |
| 1802 |
|
c$$$ $ -kch(nplx,nldx)*dedx(icx)-cch(nplx,nldx)) |
| 1803 |
|
c$$$ ddd=ddd/sqrt(kch(nplx,nldx)**2+1) |
| 1804 |
|
c$$$ cut=chcut*sch(nplx,nldx) |
| 1805 |
|
c$$$ if(abs(ddd).gt.cut)goto 20 !charge not consistent |
| 1806 |
|
c$$$ endif |
| 1807 |
|
|
| 1808 |
* ------------------> COUPLE <------------------ |
* ------------------> COUPLE <------------------ |
| 1809 |
* check to do not overflow vector dimentions |
* check to do not overflow vector dimentions |
| 1819 |
return |
return |
| 1820 |
endif |
endif |
| 1821 |
|
|
| 1822 |
if(ncp_plane(nplx).eq.ncouplemax)then |
c$$$ if(ncp_plane(nplx).eq.ncouplemax)then |
| 1823 |
if(DEBUG)print*, |
c$$$ if(DEBUG)print*, |
| 1824 |
$ '** warning ** number of identified '// |
c$$$ $ '** warning ** number of identified '// |
| 1825 |
$ 'couples on plane ',nplx, |
c$$$ $ 'couples on plane ',nplx, |
| 1826 |
$ 'exceeds vector dimention ' |
c$$$ $ 'exceeds vector dimention ' |
| 1827 |
$ ,'( ',ncouplemax,' )' |
c$$$ $ ,'( ',ncouplemax,' )' |
| 1828 |
c good2=.false. |
c$$$c good2=.false. |
| 1829 |
c goto 880 !fill ntp and go to next event |
c$$$c goto 880 !fill ntp and go to next event |
| 1830 |
iflag=1 |
c$$$ iflag=1 |
| 1831 |
return |
c$$$ return |
| 1832 |
endif |
c$$$ endif |
| 1833 |
|
|
| 1834 |
ncp_plane(nplx) = ncp_plane(nplx) + 1 |
ncp_plane(nplx) = ncp_plane(nplx) + 1 |
| 1835 |
clx(nplx,ncp_plane(nplx))=icx |
clx(nplx,ncp_plane(nplx))=icx |
| 2039 |
return |
return |
| 2040 |
endif |
endif |
| 2041 |
|
|
| 2042 |
if(ncp_plane(nplx).eq.ncouplemax)then |
c$$$ if(ncp_plane(nplx).eq.ncouplemax)then |
| 2043 |
if(DEBUG)print*, |
c$$$ if(DEBUG)print*, |
| 2044 |
$ '** warning ** number of identified '// |
c$$$ $ '** warning ** number of identified '// |
| 2045 |
$ 'couples on plane ',nplx, |
c$$$ $ 'couples on plane ',nplx, |
| 2046 |
$ 'exceeds vector dimention ' |
c$$$ $ 'exceeds vector dimention ' |
| 2047 |
$ ,'( ',ncouplemax,' )' |
c$$$ $ ,'( ',ncouplemax,' )' |
| 2048 |
c good2=.false. |
c$$$c good2=.false. |
| 2049 |
c goto 880 !fill ntp and go to next event |
c$$$c goto 880 !fill ntp and go to next event |
| 2050 |
iflag=1 |
c$$$ iflag=1 |
| 2051 |
return |
c$$$ return |
| 2052 |
endif |
c$$$ endif |
| 2053 |
|
|
| 2054 |
ncp_plane(nplx) = ncp_plane(nplx) + 1 |
ncp_plane(nplx) = ncp_plane(nplx) + 1 |
| 2055 |
clx(nplx,ncp_plane(nplx))=icx |
clx(nplx,ncp_plane(nplx))=icx |
| 3837 |
include 'level2.f' |
include 'level2.f' |
| 3838 |
include 'level1.f' |
include 'level1.f' |
| 3839 |
|
|
| 3840 |
|
do i=1,nviews |
| 3841 |
|
good2(i)=good1(i) |
| 3842 |
|
enddo |
| 3843 |
|
|
| 3844 |
|
c good2 = 0!.false. |
|
good2 = 0!.false. |
|
| 3845 |
c$$$ nev2 = nev1 |
c$$$ nev2 = nev1 |
| 3846 |
|
|
| 3847 |
c$$$# ifndef TEST2003 |
c$$$# ifndef TEST2003 |
| 3943 |
real sinth,phi,pig !(4) |
real sinth,phi,pig !(4) |
| 3944 |
pig=acos(-1.) |
pig=acos(-1.) |
| 3945 |
|
|
| 3946 |
good2=1!.true. |
c good2=1!.true. |
| 3947 |
chi2_nt(ntr) = sngl(chi2) |
chi2_nt(ntr) = sngl(chi2) |
| 3948 |
|
nstep_nt(ntr) = 0!nstep |
| 3949 |
|
|
| 3950 |
phi = al(4) !(4) |
phi = al(4) !(4) |
| 3951 |
sinth = al(3) !(4) |
sinth = al(3) !(4) |
| 4029 |
include 'common_xyzPAM.f' |
include 'common_xyzPAM.f' |
| 4030 |
|
|
| 4031 |
* count #cluster per plane not associated to any track |
* count #cluster per plane not associated to any track |
| 4032 |
good2=1!.true. |
c good2=1!.true. |
| 4033 |
nclsx = 0 |
nclsx = 0 |
| 4034 |
nclsy = 0 |
nclsy = 0 |
| 4035 |
|
|