--- DarthVader/TrackerLevel2/src/F77/analysissubroutines.f 2006/09/05 12:52:20 1.3 +++ DarthVader/TrackerLevel2/src/F77/analysissubroutines.f 2006/09/28 14:04:40 1.4 @@ -702,6 +702,8 @@ endif endif +c if(icy.eq.0.and.icx.ne.0) +c $ print*,PFAx,icx,angx,stripx,resxPAM,'***' * ----------------- * CLUSTER Y @@ -773,6 +775,11 @@ c------------------------------------------------------------------------ c (xi,yi,zi) = mechanical coordinates in the silicon sensor frame c------------------------------------------------------------------------ + if(((mod(int(stripx+0.5)-1,1024)+1).le.3) + $ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... + print*,'xyz_PAM (couple):', + $ ' WARNING: false X strip: strip ',stripx + endif xi = acoordsi(stripx,viewx) yi = acoordsi(stripy,viewy) zi = 0. @@ -859,6 +866,13 @@ nldy = nldx viewy = viewx - 1 +c print*,'X-singlet ',icx,nplx,nldx,viewx,stripx +c if((stripx.le.3).or.(stripx.ge.1022)) then !X has 1018 strips... + if(((mod(int(stripx+0.5)-1,1024)+1).le.3) + $ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... + print*,'xyz_PAM (X-singlet):', + $ ' WARNING: false X strip: strip ',stripx + endif xi = acoordsi(stripx,viewx) xi_A = xi @@ -1137,6 +1151,12 @@ c------------------------------------------------------------------------ c (xi,yi,zi) = mechanical coordinates in the silicon sensor frame c------------------------------------------------------------------------ + if(((mod(int(stripx+0.5)-1,1024)+1).le.3) + $ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... +c if((stripx.le.3).or.(stripx.ge.1022)) then !X has 1018 strips... + print*,'whichsensor: ', + $ ' WARNING: false X strip: strip ',stripx + endif xi = acoordsi(stripx,viewx) yi = acoordsi(stripy,viewy) zi = 0. @@ -1682,11 +1702,14 @@ * ---------------------------------------------------- * cut on charge (X VIEW) +* ---------------------------------------------------- if(dedx(icx).lt.dedx_x_min)then cl_single(icx)=0 goto 10 endif +* ---------------------------------------------------- * cut BAD (X VIEW) +* ---------------------------------------------------- badseed=BAD(VIEW(icx),nvk(MAXS(icx)),nst(MAXS(icx))) ifirst=INDSTART(icx) if(icx.ne.nclstr1) then @@ -1706,6 +1729,9 @@ endif badcl=badcl*ibad enddo +* ---------------------------------------------------- +* >>> eliminato il taglio sulle BAD <<< +* ---------------------------------------------------- c if(badcl.eq.0)then c cl_single(icx)=0 c goto 10 @@ -1721,11 +1747,14 @@ * ---------------------------------------------------- * cut on charge (Y VIEW) +* ---------------------------------------------------- if(dedx(icy).lt.dedx_y_min)then cl_single(icy)=0 goto 20 endif +* ---------------------------------------------------- * cut BAD (Y VIEW) +* ---------------------------------------------------- badseed=BAD(VIEW(icy),nvk(MAXS(icy)),nst(MAXS(icy))) ifirst=INDSTART(icy) if(icy.ne.nclstr1) then @@ -1744,13 +1773,15 @@ $ nst(MAXS(icy)+igood)) badcl=badcl*ibad enddo +* ---------------------------------------------------- +* >>> eliminato il taglio sulle BAD <<< +* ---------------------------------------------------- c if(badcl.eq.0)then c cl_single(icy)=0 c goto 20 c endif * ---------------------------------------------------- - cl_good(icy)=1 nply=npl(VIEW(icy)) nldy=nld(MAXS(icy),VIEW(icy)) @@ -1761,12 +1792,18 @@ * geometrical consistency (same plane and ladder) if(nply.eq.nplx.and.nldy.eq.nldx)then * charge correlation - ddd=(dedx(icy) - $ -kch(nplx,nldx)*dedx(icx)-cch(nplx,nldx)) - ddd=ddd/sqrt(kch(nplx,nldx)**2+1) - cut=chcut*sch(nplx,nldx) - if(abs(ddd).gt.cut)goto 20 !charge not consistent - +* (modified to be applied only below saturation... obviously) + +* ------------------------------------------------------------- +* >>> eliminata (TEMPORANEAMENTE) la correlazione di carica <<< +* ------------------------------------------------------------- +c$$$ if(dedx(icy).lt.chsaty.or.dedx(icx).lt.chsatx)then +c$$$ ddd=(dedx(icy) +c$$$ $ -kch(nplx,nldx)*dedx(icx)-cch(nplx,nldx)) +c$$$ ddd=ddd/sqrt(kch(nplx,nldx)**2+1) +c$$$ cut=chcut*sch(nplx,nldx) +c$$$ if(abs(ddd).gt.cut)goto 20 !charge not consistent +c$$$ endif * ------------------> COUPLE <------------------ * check to do not overflow vector dimentions @@ -1782,17 +1819,17 @@ return endif - if(ncp_plane(nplx).eq.ncouplemax)then - if(DEBUG)print*, - $ '** warning ** number of identified '// - $ 'couples on plane ',nplx, - $ 'exceeds vector dimention ' - $ ,'( ',ncouplemax,' )' -c good2=.false. -c goto 880 !fill ntp and go to next event - iflag=1 - return - endif +c$$$ if(ncp_plane(nplx).eq.ncouplemax)then +c$$$ if(DEBUG)print*, +c$$$ $ '** warning ** number of identified '// +c$$$ $ 'couples on plane ',nplx, +c$$$ $ 'exceeds vector dimention ' +c$$$ $ ,'( ',ncouplemax,' )' +c$$$c good2=.false. +c$$$c goto 880 !fill ntp and go to next event +c$$$ iflag=1 +c$$$ return +c$$$ endif ncp_plane(nplx) = ncp_plane(nplx) + 1 clx(nplx,ncp_plane(nplx))=icx @@ -2002,17 +2039,17 @@ return endif - if(ncp_plane(nplx).eq.ncouplemax)then - if(DEBUG)print*, - $ '** warning ** number of identified '// - $ 'couples on plane ',nplx, - $ 'exceeds vector dimention ' - $ ,'( ',ncouplemax,' )' -c good2=.false. -c goto 880 !fill ntp and go to next event - iflag=1 - return - endif +c$$$ if(ncp_plane(nplx).eq.ncouplemax)then +c$$$ if(DEBUG)print*, +c$$$ $ '** warning ** number of identified '// +c$$$ $ 'couples on plane ',nplx, +c$$$ $ 'exceeds vector dimention ' +c$$$ $ ,'( ',ncouplemax,' )' +c$$$c good2=.false. +c$$$c goto 880 !fill ntp and go to next event +c$$$ iflag=1 +c$$$ return +c$$$ endif ncp_plane(nplx) = ncp_plane(nplx) + 1 clx(nplx,ncp_plane(nplx))=icx @@ -3800,9 +3837,11 @@ include 'level2.f' include 'level1.f' + do i=1,nviews + good2(i)=good1(i) + enddo - - good2 = 0!.false. +c good2 = 0!.false. c$$$ nev2 = nev1 c$$$# ifndef TEST2003 @@ -3904,8 +3943,9 @@ real sinth,phi,pig !(4) pig=acos(-1.) - good2=1!.true. +c good2=1!.true. chi2_nt(ntr) = sngl(chi2) + nstep_nt(ntr) = 0!nstep phi = al(4) !(4) sinth = al(3) !(4) @@ -3989,7 +4029,7 @@ include 'common_xyzPAM.f' * count #cluster per plane not associated to any track - good2=1!.true. +c good2=1!.true. nclsx = 0 nclsy = 0