243 |
|
|
244 |
if(.not.flag_shower)then |
if(.not.flag_shower)then |
245 |
call savecluster(iv) |
call savecluster(iv) |
246 |
c$$$ if(debug.eq.1)print*,' view ',iv,' #clusters ', nclstr_view |
if(debug.eq.1)print*,'view ',iv,' #clusters ', nclstr_view |
247 |
else |
else |
248 |
fshower(iv) = 1 |
fshower(iv) = 1 |
249 |
c GOOD1(DSPnumber(iv)) = 11 !AHAHAHAHA ORRORE!! |
c GOOD1(DSPnumber(iv)) = 11 !AHAHAHAHA ORRORE!! |
393 |
c----------------------------------------- |
c----------------------------------------- |
394 |
c possible SEED... |
c possible SEED... |
395 |
c----------------------------------------- |
c----------------------------------------- |
|
c$$$ if(debug.eq.1)print*,'|||| ',value(is),' @',is |
|
|
c$$$ $ ,' cut ',clseedcut(is) |
|
|
|
|
396 |
itemp = is |
itemp = is |
397 |
fsat = 0 ! first saturated strip |
fsat = 0 ! first saturated strip |
398 |
lsat = 0 ! last saturated strip |
lsat = 0 ! last saturated strip |
404 |
$ value(itemp).le.value(itemp+1) |
$ value(itemp).le.value(itemp+1) |
405 |
$ .and.value(itemp+1).gt.clseedcut(itemp+1)) |
$ .and.value(itemp+1).gt.clseedcut(itemp+1)) |
406 |
itemp = itemp+1 |
itemp = itemp+1 |
|
c$$$ if(debug.eq.1)print*,'|||| ',value(itemp),' @',is |
|
|
c$$$ $ ,' cut ',clseedcut(itemp) |
|
407 |
if(itemp.eq.last) goto 230 !stops if reaches last strip |
if(itemp.eq.last) goto 230 !stops if reaches last strip |
408 |
if(sat(itemp).eq.1) goto 230 !stop if reaches a saturated strip |
if(sat(itemp).eq.1) goto 230 !stop if reaches a saturated strip |
409 |
enddo ! of the ladder |
enddo ! of the ladder |
415 |
fsat = itemp |
fsat = itemp |
416 |
lsat = itemp |
lsat = itemp |
417 |
if(itemp.eq.last) goto 231 !estremo... |
if(itemp.eq.last) goto 231 !estremo... |
418 |
do while( |
do while( sat(itemp+1).eq.1 ) |
|
$ sat(itemp+1).eq.1 .and. |
|
|
$ value(itemp+1).gt.clseedcut(itemp+1) .and. |
|
|
$ .true.) |
|
419 |
itemp = itemp+1 |
itemp = itemp+1 |
420 |
lsat = itemp |
lsat = itemp |
421 |
if(itemp.eq.last) goto 231 !stops if reaches last strip |
if(itemp.eq.last) goto 231 !stops if reaches last strip |
430 |
iseed = itemp ! <<< SEED |
iseed = itemp ! <<< SEED |
431 |
else |
else |
432 |
iseed = int((lsat+fsat)/2) ! <<< SEED |
iseed = int((lsat+fsat)/2) ! <<< SEED |
433 |
if(debug.eq.1) |
c$$$ print*,'saturated strips ',fsat,lsat,iseed |
|
$ print*,'saturated strips (first,last) ',fsat,lsat |
|
434 |
c$$$ print*,'--> ',(value(ii),ii=fsat,lsat) |
c$$$ print*,'--> ',(value(ii),ii=fsat,lsat) |
435 |
endif |
endif |
436 |
c--------------------------------------------------------------- |
c--------------------------------------------------------------- |
437 |
c after finding a cluster seed, checks also adjacent strips, |
c after finding a cluster seed, checks also adjacent strips, |
438 |
C and tags the ones exceeding clinclcut |
C and tags the ones exceeding clinclcut |
439 |
c--------------------------------------------------------------- |
c--------------------------------------------------------------- |
|
|
|
|
if(debug.eq.1)print*,'SEED ',value(iseed),' @',iseed |
|
|
$ ,' cut ',clseedcut(iseed) |
|
|
|
|
440 |
ir=iseed !indici destro |
ir=iseed !indici destro |
441 |
il=iseed ! e sinistro |
il=iseed ! e sinistro |
442 |
|
|
558 |
$ mult_view(nclstr_view) = mult_view(nclstr_view)+1 |
$ mult_view(nclstr_view) = mult_view(nclstr_view)+1 |
559 |
enddo |
enddo |
560 |
|
|
|
c$$$ print*,(value(ii),ii=lmax,rmax) |
|
|
c$$$ print*,(clinclcut(ii),ii=lmax,rmax) |
|
|
c$$$ print*,(clseedcut(ii),ii=lmax,rmax) |
|
561 |
|
|
562 |
c$$$ if(rmax-lmax+1.gt.25) |
c$$$ if(rmax-lmax+1.gt.25) |
563 |
c$$$ $ print*,'view ',iv |
c$$$ $ print*,'view ',iv |
668 |
$ sgnl(nclstr1) = sgnl(nclstr1) + value(j) !cluster charge |
$ sgnl(nclstr1) = sgnl(nclstr1) + value(j) !cluster charge |
669 |
enddo |
enddo |
670 |
|
|
671 |
if(debug.eq.1)then |
c$$$ print*,'view ',iv,' -- savecluster -- nclstr1: ' |
672 |
print*,'view ',iv,' -- ' |
c$$$ $ ,nclstr1,maxs(nclstr1),mult(nclstr1),sgnl(nclstr1) |
673 |
$ ,' n.cl: ',nclstr1 |
c$$$ print*,'----------------------' |
674 |
$ ,' maxs: ',maxs(nclstr1) |
|
|
$ ,' mult: ',mult(nclstr1) |
|
|
$ ,' sign: ',sgnl(nclstr1) |
|
|
print*,'----------------------' |
|
|
endif |
|
675 |
enddo |
enddo |
676 |
|
|
677 |
return |
return |
748 |
clinclcut(is)=incuty*sigma(iv,nvk(is),nst(is)) |
clinclcut(is)=incuty*sigma(iv,nvk(is),nst(is)) |
749 |
$ *mask(iv,nvk(is),nst(is)) |
$ *mask(iv,nvk(is),nst(is)) |
750 |
sat(is)=0 |
sat(is)=0 |
751 |
if( adc(iv,nvk(is),nst(is)).lt.adc_saty ) |
if( adc(iv,nvk(is),nst(is)).lt.adc_saty )sat(is)=1 |
|
$ sat(is)=mask(iv,nvk(is),nst(is)) |
|
752 |
else |
else |
753 |
C=== > X view |
C=== > X view |
754 |
value(is)= (DBLE(adc(iv,nvk(is),nst(is))) |
value(is)= (DBLE(adc(iv,nvk(is),nst(is))) |
759 |
clinclcut(is)=incutx*sigma(iv,nvk(is),nst(is)) |
clinclcut(is)=incutx*sigma(iv,nvk(is),nst(is)) |
760 |
$ *mask(iv,nvk(is),nst(is)) |
$ *mask(iv,nvk(is),nst(is)) |
761 |
sat(is)=0 |
sat(is)=0 |
762 |
if( adc(iv,nvk(is),nst(is)).gt.adc_satx ) |
if( adc(iv,nvk(is),nst(is)).gt.adc_satx )sat(is)=1 |
|
$ sat(is)=mask(iv,nvk(is),nst(is)) |
|
763 |
endif |
endif |
764 |
enddo !end loop on strips (1) |
enddo !end loop on strips (1) |
765 |
|
|