| 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 |
| 303 |
* 1st) decreasing n.points |
* 1st) decreasing n.points |
| 304 |
* 2nd) increasing chi**2 |
* 2nd) increasing chi**2 |
| 305 |
* ------------------------------------------------------- |
* ------------------------------------------------------- |
| 306 |
rchi2best=1000000000. |
rchi2best=1000000000. |
| 307 |
ndofbest=0 |
ndofbest=0 |
| 308 |
do i=1,ntracks |
do i=1,ntracks |
| 309 |
ndof=0 |
ndof=0 |
| 528 |
|
|
| 529 |
|
|
| 530 |
* --- and store the results -------------------------------- |
* --- and store the results -------------------------------- |
|
ntrk = ntrk + 1 !counter of found tracks |
|
|
if(.not.FIMAGE |
|
|
$ .and.iimage.eq.0) image(ntrk)= 0 |
|
|
if(.not.FIMAGE |
|
|
$ .and.iimage.ne.0)image(ntrk)=ntrk+1 !this is the image of the next |
|
|
if(FIMAGE) image(ntrk)=ntrk-1 !this is the image of the previous |
|
|
call fill_level2_tracks(ntrk) !==> good2=.true. |
|
|
|
|
| 531 |
if(ntrk.eq.NTRKMAX)then |
if(ntrk.eq.NTRKMAX)then |
| 532 |
if(verbose.eq.1) |
if(verbose.eq.1) |
| 533 |
$ print*, |
$ print*, |
| 537 |
cc good2=.false. |
cc good2=.false. |
| 538 |
goto 880 !fill ntp and go to next event |
goto 880 !fill ntp and go to next event |
| 539 |
endif |
endif |
| 540 |
|
|
| 541 |
|
ntrk = ntrk + 1 !counter of found tracks |
| 542 |
|
if(.not.FIMAGE |
| 543 |
|
$ .and.iimage.eq.0) image(ntrk)= 0 |
| 544 |
|
if(.not.FIMAGE |
| 545 |
|
$ .and.iimage.ne.0)image(ntrk)=ntrk+1 !this is the image of the next |
| 546 |
|
if(FIMAGE) image(ntrk)=ntrk-1 !this is the image of the previous |
| 547 |
|
call fill_level2_tracks(ntrk) !==> good2=.true. |
| 548 |
|
|
| 549 |
|
c$$$ if(ntrk.eq.NTRKMAX)then |
| 550 |
|
c$$$ if(verbose.eq.1) |
| 551 |
|
c$$$ $ print*, |
| 552 |
|
c$$$ $ '** warning ** number of identified '// |
| 553 |
|
c$$$ $ 'tracks exceeds vector dimension ' |
| 554 |
|
c$$$ $ ,'( ',NTRKMAX,' )' |
| 555 |
|
c$$$cc good2=.false. |
| 556 |
|
c$$$ goto 880 !fill ntp and go to next event |
| 557 |
|
c$$$ endif |
| 558 |
if(iimage.ne.0)then |
if(iimage.ne.0)then |
| 559 |
FIMAGE=.true. ! |
FIMAGE=.true. ! |
| 560 |
goto 1212 !>>> fit image-track |
goto 1212 !>>> fit image-track |
| 716 |
stripx = stripx + corr |
stripx = stripx + corr |
| 717 |
resxPAM = res |
resxPAM = res |
| 718 |
|
|
| 719 |
10 endif |
10 continue |
| 720 |
|
endif |
| 721 |
|
|
| 722 |
* ----------------- |
* ----------------- |
| 723 |
* CLUSTER Y |
* CLUSTER Y |
| 763 |
stripy = stripy + corr |
stripy = stripy + corr |
| 764 |
resyPAM = res |
resyPAM = res |
| 765 |
|
|
| 766 |
20 endif |
20 continue |
| 767 |
|
endif |
| 768 |
|
|
| 769 |
|
|
| 770 |
c=========================================================== |
c=========================================================== |
| 1379 |
iv1=iside |
iv1=iside |
| 1380 |
iv2=mod(iside,4)+1 |
iv2=mod(iside,4)+1 |
| 1381 |
* straight line passing trhough two consecutive vertexes |
* straight line passing trhough two consecutive vertexes |
| 1382 |
AA = (yvv(iv1)-yvv(iv2))/(xvv(iv1)-xvv(iv2)) |
AA = REAL((yvv(iv1)-yvv(iv2))/(xvv(iv1)-xvv(iv2))) !EM GCC4.7 |
| 1383 |
BB = yvv(iv1) - AA*xvv(iv1) |
BB = REAL(yvv(iv1) - AA*xvv(iv1)) !EM GCC4.7 |
| 1384 |
* point along the straight line closer to the track |
* point along the straight line closer to the track |
| 1385 |
xoo = (xPAM+AA*yPAM-AA*BB)/(1+AA**2) |
xoo = (xPAM+AA*yPAM-AA*BB)/(1+AA**2) |
| 1386 |
yoo = AA*xoo + BB |
yoo = AA*xoo + BB |
| 1392 |
iv1=iside |
iv1=iside |
| 1393 |
iv2=mod(iside,4)+1 |
iv2=mod(iside,4)+1 |
| 1394 |
* straight line passing trhough two consecutive vertexes |
* straight line passing trhough two consecutive vertexes |
| 1395 |
AA = (xvv(iv1)-xvv(iv2))/(yvv(iv1)-yvv(iv2)) |
AA = REAL((xvv(iv1)-xvv(iv2))/(yvv(iv1)-yvv(iv2))) !EM GCC4.7 |
| 1396 |
BB = xvv(iv1) - AA*yvv(iv1) |
BB = REAL(xvv(iv1) - AA*yvv(iv1)) !EM GCC4.7 |
| 1397 |
* point along the straight line closer to the track |
* point along the straight line closer to the track |
| 1398 |
yoo = (yPAM+AA*xPAM-AA*BB)/(1+AA**2) |
yoo = (yPAM+AA*xPAM-AA*BB)/(1+AA**2) |
| 1399 |
xoo = AA*yoo + BB |
xoo = AA*yoo + BB |
| 1594 |
integer iflag |
integer iflag |
| 1595 |
|
|
| 1596 |
integer badseed,badclx,badcly |
integer badseed,badclx,badcly |
| 1597 |
|
|
| 1598 |
|
iflag = iflag |
| 1599 |
if(DEBUG.EQ.1)print*,'cl_to_couples:' |
if(DEBUG.EQ.1)print*,'cl_to_couples:' |
| 1600 |
|
|
| 1601 |
cc if(RECOVER_SINGLETS.and..not.SECOND_SEARCH)goto 80 |
cc if(RECOVER_SINGLETS.and..not.SECOND_SEARCH)goto 80 |
| 1781 |
$ ,'( ',ncouplemax,' ) --> masked!' |
$ ,'( ',ncouplemax,' ) --> masked!' |
| 1782 |
c mask_view(nviewx(nplx)) = 2 |
c mask_view(nviewx(nplx)) = 2 |
| 1783 |
c mask_view(nviewy(nply)) = 2 |
c mask_view(nviewy(nply)) = 2 |
| 1784 |
mask_view(nviewx(nplx))= mask_view(nviewx(nplx))+ 2**1 |
mask_view(nviewx(nplx))= mask_view(nviewx(nplx))+ 2**1 |
| 1785 |
mask_view(nviewy(nply))= mask_view(nviewy(nply))+ 2**1 |
mask_view(nviewy(nply))= mask_view(nviewy(nply))+ 2**1 |
| 1786 |
goto 10 |
goto 10 |
| 1787 |
endif |
endif |
| 1788 |
|
|
| 1810 |
endif |
endif |
| 1811 |
enddo |
enddo |
| 1812 |
|
|
| 1813 |
80 continue |
c 80 continue |
| 1814 |
|
continue |
| 1815 |
|
|
| 1816 |
|
|
| 1817 |
if(DEBUG.EQ.1)then |
if(DEBUG.EQ.1)then |
| 1976 |
c call xyz_PAM(icx1,icy1,is1,'COG2','COG2',0.,0.)!(1) |
c call xyz_PAM(icx1,icy1,is1,'COG2','COG2',0.,0.)!(1) |
| 1977 |
c call xyz_PAM(icx1,icy1,is1,PFAdef,PFAdef,0.,0.) !(1) |
c call xyz_PAM(icx1,icy1,is1,PFAdef,PFAdef,0.,0.) !(1) |
| 1978 |
call xyz_PAM(icx1,icy1,is1,PFAdef,PFAdef,0.,0.,0.,0.) |
call xyz_PAM(icx1,icy1,is1,PFAdef,PFAdef,0.,0.,0.,0.) |
| 1979 |
xm1=xPAM |
xm1=REAL(xPAM) !EM GCC4.7 |
| 1980 |
ym1=yPAM |
ym1=REAL(yPAM) !EM GCC4.7 |
| 1981 |
zm1=zPAM |
zm1=REAL(zPAM) !EM GCC4.7 |
| 1982 |
|
|
| 1983 |
do ip2=(ip1+1),nplanes !loop on planes - COPPIA 2 |
do ip2=(ip1+1),nplanes !loop on planes - COPPIA 2 |
| 1984 |
c$$$ print*,'(2) ip ',ip2 |
c$$$ print*,'(2) ip ',ip2 |
| 1999 |
c $ (icx2,icy2,is2,PFAdef,PFAdef,0.,0.) !(1) |
c $ (icx2,icy2,is2,PFAdef,PFAdef,0.,0.) !(1) |
| 2000 |
call xyz_PAM |
call xyz_PAM |
| 2001 |
$ (icx2,icy2,is2,PFAdef,PFAdef,0.,0.,0.,0.) |
$ (icx2,icy2,is2,PFAdef,PFAdef,0.,0.,0.,0.) |
| 2002 |
xm2=xPAM |
xm2=REAL(xPAM) !EM GCC4.7 |
| 2003 |
ym2=yPAM |
ym2=REAL(yPAM) !EM GCC4.7 |
| 2004 |
zm2=zPAM |
zm2=REAL(zPAM) !EM GCC4.7 |
| 2005 |
|
|
| 2006 |
* --------------------------------------------------- |
* --------------------------------------------------- |
| 2007 |
* both couples must have a y-cluster |
* both couples must have a y-cluster |
| 2042 |
* tg(th_yz) |
* tg(th_yz) |
| 2043 |
alfayz2(ndblt)=(ym1-ym2)/(zm1-zm2) |
alfayz2(ndblt)=(ym1-ym2)/(zm1-zm2) |
| 2044 |
* y0 (cm) |
* y0 (cm) |
| 2045 |
alfayz1(ndblt)=alfayz2(ndblt)*(zini-zm1)+ym1 |
alfayz1(ndblt)=alfayz2(ndblt)*(REAL(zini)-zm1)+ym1 ! EM GCC4.7 zm1, ym1 and alfayz1/2 are REAL |
| 2046 |
|
|
| 2047 |
**** -----------------------------------------------**** |
**** -----------------------------------------------**** |
| 2048 |
**** reject non phisical couples **** |
**** reject non phisical couples **** |
| 2105 |
call xyz_PAM |
call xyz_PAM |
| 2106 |
$ (icx3,icy3,is3,PFAdef,PFAdef |
$ (icx3,icy3,is3,PFAdef,PFAdef |
| 2107 |
$ ,0.,0.,0.,0.) |
$ ,0.,0.,0.,0.) |
| 2108 |
xm3=xPAM |
xm3=REAL(xPAM) !EM GCC4.7 |
| 2109 |
ym3=yPAM |
ym3=REAL(yPAM) !EM GCC4.7 |
| 2110 |
zm3=zPAM |
zm3=REAL(zPAM) !EM GCC4.7 |
| 2111 |
|
|
| 2112 |
|
|
| 2113 |
* find the circle passing through the three points |
* find the circle passing through the three points |
| 2139 |
SZX=SZX+ZP(I)*XX |
SZX=SZX+ZP(I)*XX |
| 2140 |
SSX=SSX+XX |
SSX=SSX+XX |
| 2141 |
SZ=SZ+ZP(I) |
SZ=SZ+ZP(I) |
| 2142 |
S1=S1+1. |
S1=S1+1. |
| 2143 |
ENDDO |
ENDDO |
| 2144 |
DET=SZZ*S1-SZ*SZ |
DET=SZZ*S1-SZ*SZ |
| 2145 |
AX=(SZX*S1-SZ*SSX)/DET |
AX=(SZX*S1-SZ*SSX)/DET |
| 2146 |
BX=(SZZ*SSX-SZX*SZ)/DET |
BX=(SZZ*SSX-SZX*SZ)/DET |
| 2147 |
X0 = AX*ZINI+BX |
X0 = AX*REAL(ZINI)+BX ! EM GCC4.7 |
| 2148 |
|
|
| 2149 |
endif |
endif |
| 2150 |
|
|
| 2183 |
|
|
| 2184 |
if(radius.ne.0.and.xc.lt.0)then |
if(radius.ne.0.and.xc.lt.0)then |
| 2185 |
*************POSITIVE DEFLECTION |
*************POSITIVE DEFLECTION |
| 2186 |
alfaxz1(ntrpt) = xc+sqrt(radius**2-(ZINI-zc)**2) |
alfaxz1(ntrpt) = xc+sqrt(radius**2-(REAL(ZINI)-zc)**2) !EM GCC4.7 |
| 2187 |
alfaxz2(ntrpt) = (ZINI-zc)/sqrt(radius**2-(ZINI-zc)**2) |
alfaxz2(ntrpt) = (REAL(ZINI)-zc)/ |
| 2188 |
alfaxz3(ntrpt) = 1/radius |
$ sqrt(radius**2-(REAL(ZINI)-zc)**2) !EM GCC4.7 |
| 2189 |
|
alfaxz3(ntrpt) = 1/radius |
| 2190 |
else if(radius.ne.0.and.xc.ge.0)then |
else if(radius.ne.0.and.xc.ge.0)then |
| 2191 |
*************NEGATIVE DEFLECTION |
*************NEGATIVE DEFLECTION |
| 2192 |
alfaxz1(ntrpt) = xc-sqrt(radius**2-(ZINI-zc)**2) |
alfaxz1(ntrpt) = xc-sqrt(radius**2-(REAL(ZINI)-zc)**2) |
| 2193 |
alfaxz2(ntrpt) = -(ZINI-zc)/sqrt(radius**2-(ZINI-zc)**2) |
alfaxz2(ntrpt) = -(REAL(ZINI)-zc)/ |
| 2194 |
alfaxz3(ntrpt) = -1/radius |
$ sqrt(radius**2-(REAL(ZINI)-zc)**2) !EM GCC4.7 |
| 2195 |
|
alfaxz3(ntrpt) = -1/radius |
| 2196 |
else if(radius.eq.0)then |
else if(radius.eq.0)then |
| 2197 |
*************straight fit |
*************straight fit |
| 2198 |
alfaxz1(ntrpt) = X0 |
alfaxz1(ntrpt) = X0 |
| 2227 |
enddo !end loop on planes - COPPIA 3 |
enddo !end loop on planes - COPPIA 3 |
| 2228 |
|
|
| 2229 |
31 continue |
31 continue |
| 2230 |
1 enddo !end loop on COPPIA 2 |
c 1 enddo !end loop on COPPIA 2 |
| 2231 |
|
enddo !end loop on COPPIA 2 |
| 2232 |
enddo !end loop on sensors - COPPIA 2 |
enddo !end loop on sensors - COPPIA 2 |
| 2233 |
20 continue |
20 continue |
| 2234 |
enddo !end loop on planes - COPPIA 2 |
enddo !end loop on planes - COPPIA 2 |
| 2235 |
|
|
| 2236 |
11 continue |
c 11 continue |
| 2237 |
|
continue |
| 2238 |
enddo !end loop on COPPIA1 |
enddo !end loop on COPPIA1 |
| 2239 |
enddo !end loop on sensors - COPPIA 1 |
enddo !end loop on sensors - COPPIA 1 |
| 2240 |
10 continue |
10 continue |
| 2341 |
* doublet distance in parameter space |
* doublet distance in parameter space |
| 2342 |
distance= |
distance= |
| 2343 |
$ ((alfayz1(idbref)-alfayz1(idb2))/Dalfayz1)**2 |
$ ((alfayz1(idbref)-alfayz1(idb2))/Dalfayz1)**2 |
| 2344 |
$ +((alfayz2(idbref)-alfayz2(idb2))/Dalfayz2)**2 |
$ +((alfayz2(idbref)-alfayz2(idb2))/Dalfayz2)**2 |
| 2345 |
distance = sqrt(distance) |
distance = sqrt(distance) |
| 2346 |
|
|
| 2347 |
if(distance.lt.cutdistyz)then |
if(distance.lt.cutdistyz)then |
| 2366 |
1118 continue |
1118 continue |
| 2367 |
enddo !end loop (2) on DOUBLETS |
enddo !end loop (2) on DOUBLETS |
| 2368 |
|
|
| 2369 |
1188 continue |
c 1188 continue |
| 2370 |
|
continue |
| 2371 |
enddo !end loop on... bo? |
enddo !end loop on... bo? |
| 2372 |
|
|
| 2373 |
nptloop=npv |
nptloop=npv |
| 2555 |
* solo i due parametri spaziali per il momemnto |
* solo i due parametri spaziali per il momemnto |
| 2556 |
distance= |
distance= |
| 2557 |
$ ((alfaxz1(itrref)-alfaxz1(itr2))/Dalfaxz1)**2 |
$ ((alfaxz1(itrref)-alfaxz1(itr2))/Dalfaxz1)**2 |
| 2558 |
$ +((alfaxz2(itrref)-alfaxz2(itr2))/Dalfaxz2)**2 |
$ +((alfaxz2(itrref)-alfaxz2(itr2))/Dalfaxz2)**2 |
| 2559 |
distance = sqrt(distance) |
distance = sqrt(distance) |
| 2560 |
|
|
| 2561 |
|
|
| 2594 |
11188 continue |
11188 continue |
| 2595 |
enddo !end loop (2) on TRIPLETS |
enddo !end loop (2) on TRIPLETS |
| 2596 |
|
|
| 2597 |
11888 continue |
c11888 continue |
| 2598 |
|
continue |
| 2599 |
enddo !end loop on... bo? |
enddo !end loop on... bo? |
| 2600 |
|
|
| 2601 |
nptloop=npv |
nptloop=npv |
| 2660 |
npt_tot=npt_tot+npt |
npt_tot=npt_tot+npt |
| 2661 |
|
|
| 2662 |
if(DEBUG.EQ.1)then |
if(DEBUG.EQ.1)then |
| 2663 |
print*,'>>>> cloud ',nclouds_xz,' --- ',npt,' points' |
print*,'>>>> cloud ',nclouds_xz,' --- ',npt,' points' |
| 2664 |
print*,'- alfaxz1 ',alfaxz1_av(nclouds_xz) |
print*,'- alfaxz1 ',alfaxz1_av(nclouds_xz) |
| 2665 |
print*,'- alfaxz2 ',alfaxz2_av(nclouds_xz) |
print*,'- alfaxz2 ',alfaxz2_av(nclouds_xz) |
| 2666 |
print*,'- alfaxz3 ',alfaxz3_av(nclouds_xz) |
print*,'- alfaxz3 ',alfaxz3_av(nclouds_xz) |
| 2963 |
xm(nplanes-ip+1)=xPAM |
xm(nplanes-ip+1)=xPAM |
| 2964 |
ym(nplanes-ip+1)=yPAM |
ym(nplanes-ip+1)=yPAM |
| 2965 |
zm(nplanes-ip+1)=zPAM |
zm(nplanes-ip+1)=zPAM |
| 2966 |
resx(nplanes-ip+1)=resxPAM |
resx(nplanes-ip+1)=resxPAM |
| 2967 |
resy(nplanes-ip+1)=resyPAM |
resy(nplanes-ip+1)=resyPAM |
| 2968 |
if(DEBUG.EQ.1)print*,'(X,Y)' |
if(DEBUG.EQ.1)print*,'(X,Y)' |
| 2969 |
$ ,nplanes-ip+1,xPAM,yPAM |
$ ,nplanes-ip+1,xPAM,yPAM |
| 2974 |
ym_B(nplanes-ip+1) = yPAM_B |
ym_B(nplanes-ip+1) = yPAM_B |
| 2975 |
zm(nplanes-ip+1) |
zm(nplanes-ip+1) |
| 2976 |
$ = (zPAM_A+zPAM_B)/2. |
$ = (zPAM_A+zPAM_B)/2. |
| 2977 |
resx(nplanes-ip+1) = resxPAM |
resx(nplanes-ip+1) = resxPAM |
| 2978 |
resy(nplanes-ip+1) = resyPAM |
resy(nplanes-ip+1) = resyPAM |
| 2979 |
if(icx.eq.0.and.icy.gt.0)then |
if(icx.eq.0.and.icy.gt.0)then |
| 2980 |
xgood(nplanes-ip+1)=0. |
xgood(nplanes-ip+1)=0. |
| 3061 |
|
|
| 3062 |
XV_STORE(ip,ntracks)=sngl(xv(ip)) |
XV_STORE(ip,ntracks)=sngl(xv(ip)) |
| 3063 |
YV_STORE(ip,ntracks)=sngl(yv(ip)) |
YV_STORE(ip,ntracks)=sngl(yv(ip)) |
| 3064 |
ZV_STORE(ip,ntracks)=sngl(zv(ip)) |
ZV_STORE(ip,ntracks)=sngl(zv(ip)) |
| 3065 |
XM_STORE(ip,ntracks)=sngl(xm(ip)) |
XM_STORE(ip,ntracks)=sngl(xm(ip)) |
| 3066 |
YM_STORE(ip,ntracks)=sngl(ym(ip)) |
YM_STORE(ip,ntracks)=sngl(ym(ip)) |
| 3067 |
ZM_STORE(ip,ntracks)=sngl(zm(ip)) |
ZM_STORE(ip,ntracks)=sngl(zm(ip)) |
| 3106 |
enddo |
enddo |
| 3107 |
enddo |
enddo |
| 3108 |
|
|
| 3109 |
RCHI2_STORE(ntracks)=chi2 |
RCHI2_STORE(ntracks)=REAL(chi2) |
| 3110 |
|
|
| 3111 |
* -------------------------------- |
* -------------------------------- |
| 3112 |
* STORE candidate TRACK INFO - end |
* STORE candidate TRACK INFO - end |
| 3174 |
character*10 PFA |
character*10 PFA |
| 3175 |
common/FINALPFA/PFA |
common/FINALPFA/PFA |
| 3176 |
|
|
| 3177 |
|
double precision xmm,rxmm,xmm_A,xmm_B !EM GCC4.7 |
| 3178 |
|
double precision ymm,rymm,ymm_A,ymm_B !EM GCC4.7 |
| 3179 |
|
double precision zmm,zmm_A,zmm_B !EM GCC4.7 |
| 3180 |
|
double precision clincnewc !EM GCC4.7 |
| 3181 |
|
double precision clincnew !EM GCC4.7 |
| 3182 |
|
|
| 3183 |
real k(6) |
real k(6) |
| 3184 |
DATA k/1.099730,0.418900,0.220939,0.220907,0.418771,1.100674/ |
DATA k/1.099730,0.418900,0.220939,0.220907,0.418771,1.100674/ |
| 3185 |
|
|
| 3398 |
idm = id |
idm = id |
| 3399 |
dedxmmx = sgnl(icx)/mip(VIEW(icx),LADDER(icx)) !(1)(2) |
dedxmmx = sgnl(icx)/mip(VIEW(icx),LADDER(icx)) !(1)(2) |
| 3400 |
dedxmmy = sgnl(icy)/mip(VIEW(icy),LADDER(icy)) !(1)(2) |
dedxmmy = sgnl(icy)/mip(VIEW(icy),LADDER(icy)) !(1)(2) |
| 3401 |
clincnewc=10*sqrt(rymm**2+rxmm**2 |
clincnewc=10.*dsqrt(rymm**2+rxmm**2 |
| 3402 |
$ +RCHI2_STORE(ibest)*k(ip)*(cov(1,1)+cov(2,2))) |
$ +DBLE(RCHI2_STORE(ibest)*k(ip)*(cov(1,1)+cov(2,2)))) ! EM GCC4.7 |
| 3403 |
endif |
endif |
| 3404 |
1188 continue |
1188 continue |
| 3405 |
enddo !end loop on couples on plane icp |
enddo !end loop on couples on plane icp |
| 3567 |
if(iclm.ne.0)then |
if(iclm.ne.0)then |
| 3568 |
if(mod(VIEW(iclm),2).eq.0)then |
if(mod(VIEW(iclm),2).eq.0)then |
| 3569 |
clincnew= |
clincnew= |
| 3570 |
$ 20* |
$ 20.* !EM GCC4.7 |
| 3571 |
$ sqrt(rxmm**2+RCHI2_STORE(ibest)*k(ip)*cov(1,1)) |
$ dsqrt(rxmm**2 + |
| 3572 |
|
$ DBLE(RCHI2_STORE(ibest)*k(ip))*cov(1,1)) |
| 3573 |
else if(mod(VIEW(iclm),2).ne.0)then |
else if(mod(VIEW(iclm),2).ne.0)then |
| 3574 |
clincnew= |
clincnew= |
| 3575 |
$ 10* |
$ 10.* !EM GCC4.7 |
| 3576 |
$ sqrt(rymm**2+RCHI2_STORE(ibest)*k(ip)*cov(2,2)) |
$ dsqrt(rymm**2 + |
| 3577 |
|
$ DBLE(RCHI2_STORE(ibest)*k(ip))*cov(2,2)) |
| 3578 |
endif |
endif |
| 3579 |
|
|
| 3580 |
if(distmin.le.clincnew)then |
if(distmin.le.clincnew)then |
| 3823 |
character*10 PFA |
character*10 PFA |
| 3824 |
common/FINALPFA/PFA |
common/FINALPFA/PFA |
| 3825 |
|
|
| 3826 |
real sinth,phi,pig |
real sinth,phi,pig, npig ! EM GCC4.7 |
| 3827 |
integer ssensor,sladder |
integer ssensor,sladder |
| 3828 |
pig=acos(-1.) |
pig=acos(-1.) |
| 3829 |
|
|
| 3833 |
chi2_nt(ntr) = sngl(chi2) |
chi2_nt(ntr) = sngl(chi2) |
| 3834 |
nstep_nt(ntr) = nstep |
nstep_nt(ntr) = nstep |
| 3835 |
* ------------------------------------- |
* ------------------------------------- |
| 3836 |
phi = al(4) |
phi = REAL(al(4)) |
| 3837 |
sinth = al(3) |
sinth = REAL(al(3)) |
| 3838 |
if(sinth.lt.0)then |
if(sinth.lt.0)then |
| 3839 |
sinth = -sinth |
sinth = -sinth |
| 3840 |
phi = phi + pig |
phi = phi + pig |
| 3904 |
if(ip.eq.6.and.ssensor.ne.0)ssensor = 3 - ssensor !notazione paolo x align |
if(ip.eq.6.and.ssensor.ne.0)ssensor = 3 - ssensor !notazione paolo x align |
| 3905 |
LS(IP,ntr) = ssensor+10*sladder |
LS(IP,ntr) = ssensor+10*sladder |
| 3906 |
|
|
| 3907 |
if(id.ne.0)then |
c if(id.ne.0)then |
| 3908 |
|
CCCCCC(10 novembre 2009) PATCH X NUCLEI |
| 3909 |
|
C non ho capito perche', ma durante il ritracciamento dei nuclei |
| 3910 |
|
C (quando una traccia viene trovata ma non e' buona) c'e' qualche variabile |
| 3911 |
|
C che non viene reinizializzata correttamente e i cluster esclusi |
| 3912 |
|
C dal fit risultano ancora inclusi... |
| 3913 |
|
C |
| 3914 |
|
cltrx(ip,ntr) = 0 |
| 3915 |
|
cltry(ip,ntr) = 0 |
| 3916 |
|
c$$$ if( |
| 3917 |
|
c$$$ $ xgood_nt(ip,ntr).eq.1.and.ygood_nt(ip,ntr).eq.1 |
| 3918 |
|
c$$$ $ .and. |
| 3919 |
|
c$$$ $ id.ne.0)then |
| 3920 |
|
if(id.ne.0)then !patch 30/12/09 |
| 3921 |
|
|
| 3922 |
c >>> is a couple |
c >>> is a couple |
| 3923 |
cltrx(ip,ntr) = clx(nplanes-ip+1,icp_cp(id)) |
cltrx(ip,ntr) = clx(nplanes-ip+1,icp_cp(id)) |
| 3924 |
cltry(ip,ntr) = cly(nplanes-ip+1,icp_cp(id)) |
cltry(ip,ntr) = cly(nplanes-ip+1,icp_cp(id)) |
| 3927 |
|
|
| 3928 |
cl_used(cltrx(ip,ntr)) = 1 !tag used clusters |
cl_used(cltrx(ip,ntr)) = 1 !tag used clusters |
| 3929 |
|
|
| 3930 |
xbad(ip,ntr)= nbadstrips(4,clx(nplanes-ip+1,icp_cp(id))) |
xbad(ip,ntr)= nbadstrips(4,clx(nplanes-ip+1,icp_cp(id))) |
| 3931 |
|
|
| 3932 |
if(nsatstrips(clx(nplanes-ip+1,icp_cp(id))).gt.0) |
if(nsatstrips(clx(nplanes-ip+1,icp_cp(id))).gt.0) |
| 3933 |
$ dedx_x(ip,ntr)=-dedx_x(ip,ntr) |
$ dedx_x(ip,ntr)=-dedx_x(ip,ntr) |
| 3957 |
ypu(ip,ntr) = corr |
ypu(ip,ntr) = corr |
| 3958 |
endif |
endif |
| 3959 |
|
|
| 3960 |
elseif(icl.ne.0)then |
c$$$ elseif(icl.ne.0)then |
| 3961 |
|
endif !patch 30/12/09 |
| 3962 |
|
if(icl.ne.0)then !patch 30/12/09 |
| 3963 |
|
|
| 3964 |
cl_used(icl) = 1 !tag used clusters |
cl_used(icl) = 1 !tag used clusters |
| 3965 |
|
|
| 4057 |
do is=1,2 |
do is=1,2 |
| 4058 |
c call xyz_PAM(icl,0,is,'COG1',' ',0.,0.) |
c call xyz_PAM(icl,0,is,'COG1',' ',0.,0.) |
| 4059 |
c call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.) |
c call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.) |
| 4060 |
call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.,0.,0.) |
call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.,0.,0.) |
| 4061 |
xs(is,nclsx) = (xPAM_A+xPAM_B)/2 |
xs(is,nclsx) = REAL((xPAM_A+xPAM_B)/2.) ! EM GCC4.7 |
| 4062 |
enddo |
enddo |
| 4063 |
else !=== Y views |
else !=== Y views |
| 4064 |
nclsy = nclsy + 1 |
nclsy = nclsy + 1 |
| 4073 |
do is=1,2 |
do is=1,2 |
| 4074 |
c call xyz_PAM(0,icl,is,' ','COG1',0.,0.) |
c call xyz_PAM(0,icl,is,' ','COG1',0.,0.) |
| 4075 |
c call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.) |
c call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.) |
| 4076 |
call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.,0.,0.) |
call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.,0.,0.) |
| 4077 |
ys(is,nclsy) = (yPAM_A+yPAM_B)/2 |
ys(is,nclsy) = REAL((yPAM_A+yPAM_B)/2.) ! EM GCC4.7 |
| 4078 |
enddo |
enddo |
| 4079 |
endif |
endif |
| 4080 |
endif |
endif |