--- DarthVader/TrackerLevel2/src/F77/reductionflight.f 2008/10/22 15:17:40 1.25 +++ DarthVader/TrackerLevel2/src/F77/reductionflight.f 2008/11/25 14:41:38 1.26 @@ -243,7 +243,7 @@ if(.not.flag_shower)then call savecluster(iv) - if(debug.eq.1)print*,'view ',iv,' #clusters ', nclstr_view +c$$$ if(debug.eq.1)print*,' view ',iv,' #clusters ', nclstr_view else fshower(iv) = 1 c GOOD1(DSPnumber(iv)) = 11 !AHAHAHAHA ORRORE!! @@ -393,6 +393,9 @@ c----------------------------------------- c possible SEED... c----------------------------------------- +c$$$ if(debug.eq.1)print*,'|||| ',value(is),' @',is +c$$$ $ ,' cut ',clseedcut(is) + itemp = is fsat = 0 ! first saturated strip lsat = 0 ! last saturated strip @@ -404,6 +407,8 @@ $ value(itemp).le.value(itemp+1) $ .and.value(itemp+1).gt.clseedcut(itemp+1)) itemp = itemp+1 +c$$$ if(debug.eq.1)print*,'|||| ',value(itemp),' @',is +c$$$ $ ,' cut ',clseedcut(itemp) if(itemp.eq.last) goto 230 !stops if reaches last strip if(sat(itemp).eq.1) goto 230 !stop if reaches a saturated strip enddo ! of the ladder @@ -415,7 +420,10 @@ fsat = itemp lsat = itemp if(itemp.eq.last) goto 231 !estremo... - do while( sat(itemp+1).eq.1 ) + do while( + $ sat(itemp+1).eq.1 .and. + $ value(itemp+1).gt.clseedcut(itemp+1) .and. + $ .true.) itemp = itemp+1 lsat = itemp if(itemp.eq.last) goto 231 !stops if reaches last strip @@ -430,13 +438,18 @@ iseed = itemp ! <<< SEED else iseed = int((lsat+fsat)/2) ! <<< SEED -c$$$ print*,'saturated strips ',fsat,lsat,iseed + if(debug.eq.1) + $ print*,'saturated strips (first,last) ',fsat,lsat c$$$ print*,'--> ',(value(ii),ii=fsat,lsat) endif c--------------------------------------------------------------- c after finding a cluster seed, checks also adjacent strips, C and tags the ones exceeding clinclcut c--------------------------------------------------------------- + + if(debug.eq.1)print*,'SEED ',value(iseed),' @',iseed + $ ,' cut ',clseedcut(iseed) + ir=iseed !indici destro il=iseed ! e sinistro @@ -558,6 +571,9 @@ $ mult_view(nclstr_view) = mult_view(nclstr_view)+1 enddo +c$$$ print*,(value(ii),ii=lmax,rmax) +c$$$ print*,(clinclcut(ii),ii=lmax,rmax) +c$$$ print*,(clseedcut(ii),ii=lmax,rmax) c$$$ if(rmax-lmax+1.gt.25) c$$$ $ print*,'view ',iv @@ -668,10 +684,14 @@ $ sgnl(nclstr1) = sgnl(nclstr1) + value(j) !cluster charge enddo -c$$$ print*,'view ',iv,' -- savecluster -- nclstr1: ' -c$$$ $ ,nclstr1,maxs(nclstr1),mult(nclstr1),sgnl(nclstr1) -c$$$ print*,'----------------------' - + if(debug.eq.1)then + print*,'view ',iv,' -- ' + $ ,' n.cl: ',nclstr1 + $ ,' maxs: ',maxs(nclstr1) + $ ,' mult: ',mult(nclstr1) + $ ,' sign: ',sgnl(nclstr1) + print*,'----------------------' + endif enddo return @@ -748,7 +768,8 @@ clinclcut(is)=incuty*sigma(iv,nvk(is),nst(is)) $ *mask(iv,nvk(is),nst(is)) sat(is)=0 - if( adc(iv,nvk(is),nst(is)).lt.adc_saty )sat(is)=1 + if( adc(iv,nvk(is),nst(is)).lt.adc_saty ) + $ sat(is)=mask(iv,nvk(is),nst(is)) else C=== > X view value(is)= (DBLE(adc(iv,nvk(is),nst(is))) @@ -759,7 +780,8 @@ clinclcut(is)=incutx*sigma(iv,nvk(is),nst(is)) $ *mask(iv,nvk(is),nst(is)) sat(is)=0 - if( adc(iv,nvk(is),nst(is)).gt.adc_satx )sat(is)=1 + if( adc(iv,nvk(is),nst(is)).gt.adc_satx ) + $ sat(is)=mask(iv,nvk(is),nst(is)) endif enddo !end loop on strips (1)