271 |
*------------------------------------------------------------------------------- |
*------------------------------------------------------------------------------- |
272 |
ccc ntrk=0 !counter of identified physical tracks |
ccc ntrk=0 !counter of identified physical tracks |
273 |
|
|
274 |
11111 continue !<<<<<<< come here when performing a new search |
c11111 continue !<<<<<<< come here when performing a new search |
275 |
|
continue !<<<<<<< come here when performing a new search |
276 |
|
|
277 |
if(nclouds_xz.eq.0)goto 880 !go to next event |
if(nclouds_xz.eq.0)goto 880 !go to next event |
278 |
if(nclouds_yz.eq.0)goto 880 !go to next event |
if(nclouds_yz.eq.0)goto 880 !go to next event |
1582 |
integer iflag |
integer iflag |
1583 |
|
|
1584 |
integer badseed,badclx,badcly |
integer badseed,badclx,badcly |
1585 |
|
|
1586 |
|
iflag = iflag |
1587 |
if(DEBUG.EQ.1)print*,'cl_to_couples:' |
if(DEBUG.EQ.1)print*,'cl_to_couples:' |
1588 |
|
|
1589 |
cc if(RECOVER_SINGLETS.and..not.SECOND_SEARCH)goto 80 |
cc if(RECOVER_SINGLETS.and..not.SECOND_SEARCH)goto 80 |
1769 |
$ ,'( ',ncouplemax,' ) --> masked!' |
$ ,'( ',ncouplemax,' ) --> masked!' |
1770 |
c mask_view(nviewx(nplx)) = 2 |
c mask_view(nviewx(nplx)) = 2 |
1771 |
c mask_view(nviewy(nply)) = 2 |
c mask_view(nviewy(nply)) = 2 |
1772 |
mask_view(nviewx(nplx))= mask_view(nviewx(nplx))+ 2**1 |
mask_view(nviewx(nplx))= mask_view(nviewx(nplx))+ 2**1 |
1773 |
mask_view(nviewy(nply))= mask_view(nviewy(nply))+ 2**1 |
mask_view(nviewy(nply))= mask_view(nviewy(nply))+ 2**1 |
1774 |
goto 10 |
goto 10 |
1775 |
endif |
endif |
1776 |
|
|
1798 |
endif |
endif |
1799 |
enddo |
enddo |
1800 |
|
|
1801 |
80 continue |
c 80 continue |
1802 |
|
continue |
1803 |
|
|
1804 |
|
|
1805 |
if(DEBUG.EQ.1)then |
if(DEBUG.EQ.1)then |
2127 |
SZX=SZX+ZP(I)*XX |
SZX=SZX+ZP(I)*XX |
2128 |
SSX=SSX+XX |
SSX=SSX+XX |
2129 |
SZ=SZ+ZP(I) |
SZ=SZ+ZP(I) |
2130 |
S1=S1+1. |
S1=S1+1. |
2131 |
ENDDO |
ENDDO |
2132 |
DET=SZZ*S1-SZ*SZ |
DET=SZZ*S1-SZ*SZ |
2133 |
AX=(SZX*S1-SZ*SSX)/DET |
AX=(SZX*S1-SZ*SSX)/DET |
2213 |
enddo !end loop on planes - COPPIA 3 |
enddo !end loop on planes - COPPIA 3 |
2214 |
|
|
2215 |
31 continue |
31 continue |
2216 |
1 enddo !end loop on COPPIA 2 |
c 1 enddo !end loop on COPPIA 2 |
2217 |
|
enddo !end loop on COPPIA 2 |
2218 |
enddo !end loop on sensors - COPPIA 2 |
enddo !end loop on sensors - COPPIA 2 |
2219 |
20 continue |
20 continue |
2220 |
enddo !end loop on planes - COPPIA 2 |
enddo !end loop on planes - COPPIA 2 |
2221 |
|
|
2222 |
11 continue |
c 11 continue |
2223 |
|
continue |
2224 |
enddo !end loop on COPPIA1 |
enddo !end loop on COPPIA1 |
2225 |
enddo !end loop on sensors - COPPIA 1 |
enddo !end loop on sensors - COPPIA 1 |
2226 |
10 continue |
10 continue |
2327 |
* doublet distance in parameter space |
* doublet distance in parameter space |
2328 |
distance= |
distance= |
2329 |
$ ((alfayz1(idbref)-alfayz1(idb2))/Dalfayz1)**2 |
$ ((alfayz1(idbref)-alfayz1(idb2))/Dalfayz1)**2 |
2330 |
$ +((alfayz2(idbref)-alfayz2(idb2))/Dalfayz2)**2 |
$ +((alfayz2(idbref)-alfayz2(idb2))/Dalfayz2)**2 |
2331 |
distance = sqrt(distance) |
distance = sqrt(distance) |
2332 |
|
|
2333 |
if(distance.lt.cutdistyz)then |
if(distance.lt.cutdistyz)then |
2352 |
1118 continue |
1118 continue |
2353 |
enddo !end loop (2) on DOUBLETS |
enddo !end loop (2) on DOUBLETS |
2354 |
|
|
2355 |
1188 continue |
c 1188 continue |
2356 |
|
continue |
2357 |
enddo !end loop on... bo? |
enddo !end loop on... bo? |
2358 |
|
|
2359 |
nptloop=npv |
nptloop=npv |
2541 |
* solo i due parametri spaziali per il momemnto |
* solo i due parametri spaziali per il momemnto |
2542 |
distance= |
distance= |
2543 |
$ ((alfaxz1(itrref)-alfaxz1(itr2))/Dalfaxz1)**2 |
$ ((alfaxz1(itrref)-alfaxz1(itr2))/Dalfaxz1)**2 |
2544 |
$ +((alfaxz2(itrref)-alfaxz2(itr2))/Dalfaxz2)**2 |
$ +((alfaxz2(itrref)-alfaxz2(itr2))/Dalfaxz2)**2 |
2545 |
distance = sqrt(distance) |
distance = sqrt(distance) |
2546 |
|
|
2547 |
|
|
2580 |
11188 continue |
11188 continue |
2581 |
enddo !end loop (2) on TRIPLETS |
enddo !end loop (2) on TRIPLETS |
2582 |
|
|
2583 |
11888 continue |
c11888 continue |
2584 |
|
continue |
2585 |
enddo !end loop on... bo? |
enddo !end loop on... bo? |
2586 |
|
|
2587 |
nptloop=npv |
nptloop=npv |
2646 |
npt_tot=npt_tot+npt |
npt_tot=npt_tot+npt |
2647 |
|
|
2648 |
if(DEBUG.EQ.1)then |
if(DEBUG.EQ.1)then |
2649 |
print*,'>>>> cloud ',nclouds_xz,' --- ',npt,' points' |
print*,'>>>> cloud ',nclouds_xz,' --- ',npt,' points' |
2650 |
print*,'- alfaxz1 ',alfaxz1_av(nclouds_xz) |
print*,'- alfaxz1 ',alfaxz1_av(nclouds_xz) |
2651 |
print*,'- alfaxz2 ',alfaxz2_av(nclouds_xz) |
print*,'- alfaxz2 ',alfaxz2_av(nclouds_xz) |
2652 |
print*,'- alfaxz3 ',alfaxz3_av(nclouds_xz) |
print*,'- alfaxz3 ',alfaxz3_av(nclouds_xz) |
2949 |
xm(nplanes-ip+1)=xPAM |
xm(nplanes-ip+1)=xPAM |
2950 |
ym(nplanes-ip+1)=yPAM |
ym(nplanes-ip+1)=yPAM |
2951 |
zm(nplanes-ip+1)=zPAM |
zm(nplanes-ip+1)=zPAM |
2952 |
resx(nplanes-ip+1)=resxPAM |
resx(nplanes-ip+1)=resxPAM |
2953 |
resy(nplanes-ip+1)=resyPAM |
resy(nplanes-ip+1)=resyPAM |
2954 |
if(DEBUG.EQ.1)print*,'(X,Y)' |
if(DEBUG.EQ.1)print*,'(X,Y)' |
2955 |
$ ,nplanes-ip+1,xPAM,yPAM |
$ ,nplanes-ip+1,xPAM,yPAM |
2960 |
ym_B(nplanes-ip+1) = yPAM_B |
ym_B(nplanes-ip+1) = yPAM_B |
2961 |
zm(nplanes-ip+1) |
zm(nplanes-ip+1) |
2962 |
$ = (zPAM_A+zPAM_B)/2. |
$ = (zPAM_A+zPAM_B)/2. |
2963 |
resx(nplanes-ip+1) = resxPAM |
resx(nplanes-ip+1) = resxPAM |
2964 |
resy(nplanes-ip+1) = resyPAM |
resy(nplanes-ip+1) = resyPAM |
2965 |
if(icx.eq.0.and.icy.gt.0)then |
if(icx.eq.0.and.icy.gt.0)then |
2966 |
xgood(nplanes-ip+1)=0. |
xgood(nplanes-ip+1)=0. |
3047 |
|
|
3048 |
XV_STORE(ip,ntracks)=sngl(xv(ip)) |
XV_STORE(ip,ntracks)=sngl(xv(ip)) |
3049 |
YV_STORE(ip,ntracks)=sngl(yv(ip)) |
YV_STORE(ip,ntracks)=sngl(yv(ip)) |
3050 |
ZV_STORE(ip,ntracks)=sngl(zv(ip)) |
ZV_STORE(ip,ntracks)=sngl(zv(ip)) |
3051 |
XM_STORE(ip,ntracks)=sngl(xm(ip)) |
XM_STORE(ip,ntracks)=sngl(xm(ip)) |
3052 |
YM_STORE(ip,ntracks)=sngl(ym(ip)) |
YM_STORE(ip,ntracks)=sngl(ym(ip)) |
3053 |
ZM_STORE(ip,ntracks)=sngl(zm(ip)) |
ZM_STORE(ip,ntracks)=sngl(zm(ip)) |
3891 |
|
|
3892 |
cl_used(cltrx(ip,ntr)) = 1 !tag used clusters |
cl_used(cltrx(ip,ntr)) = 1 !tag used clusters |
3893 |
|
|
3894 |
xbad(ip,ntr)= nbadstrips(4,clx(nplanes-ip+1,icp_cp(id))) |
xbad(ip,ntr)= nbadstrips(4,clx(nplanes-ip+1,icp_cp(id))) |
3895 |
|
|
3896 |
if(nsatstrips(clx(nplanes-ip+1,icp_cp(id))).gt.0) |
if(nsatstrips(clx(nplanes-ip+1,icp_cp(id))).gt.0) |
3897 |
$ dedx_x(ip,ntr)=-dedx_x(ip,ntr) |
$ dedx_x(ip,ntr)=-dedx_x(ip,ntr) |
4112 |
alfayz2_av_nt(iyz)=alfayz2_av(iyz) |
alfayz2_av_nt(iyz)=alfayz2_av(iyz) |
4113 |
nnn=nnn+ptcloud_yz(iyz) |
nnn=nnn+ptcloud_yz(iyz) |
4114 |
enddo |
enddo |
4115 |
do ipt=1,nnn |
do ipt=1,min(ndblt_max_nt,nnn) |
4116 |
db_cloud_nt(ipt)=db_cloud(ipt) |
db_cloud_nt(ipt)=db_cloud(ipt) |
4117 |
enddo |
enddo |
4118 |
endif |
endif |
4125 |
alfaxz3_av_nt(ixz)=alfaxz3_av(ixz) |
alfaxz3_av_nt(ixz)=alfaxz3_av(ixz) |
4126 |
nnn=nnn+ptcloud_xz(ixz) |
nnn=nnn+ptcloud_xz(ixz) |
4127 |
enddo |
enddo |
4128 |
do ipt=1,nnn |
do ipt=1,min(ntrpt_max_nt,nnn) |
4129 |
tr_cloud_nt(ipt)=tr_cloud(ipt) |
tr_cloud_nt(ipt)=tr_cloud(ipt) |
4130 |
enddo |
enddo |
4131 |
endif |
endif |