243 |
|
|
244 |
if(.not.flag_shower)then |
if(.not.flag_shower)then |
245 |
call savecluster(iv) |
call savecluster(iv) |
246 |
if(debug.eq.1)print*,'view ',iv,' #clusters ', nclstr_view |
c$$$ 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----------------------------------------- |
396 |
|
c$$$ if(debug.eq.1)print*,'|||| ',value(is),' @',is |
397 |
|
c$$$ $ ,' cut ',clseedcut(is) |
398 |
|
|
399 |
itemp = is |
itemp = is |
400 |
fsat = 0 ! first saturated strip |
fsat = 0 ! first saturated strip |
401 |
lsat = 0 ! last saturated strip |
lsat = 0 ! last saturated strip |
407 |
$ value(itemp).le.value(itemp+1) |
$ value(itemp).le.value(itemp+1) |
408 |
$ .and.value(itemp+1).gt.clseedcut(itemp+1)) |
$ .and.value(itemp+1).gt.clseedcut(itemp+1)) |
409 |
itemp = itemp+1 |
itemp = itemp+1 |
410 |
|
c$$$ if(debug.eq.1)print*,'|||| ',value(itemp),' @',is |
411 |
|
c$$$ $ ,' cut ',clseedcut(itemp) |
412 |
if(itemp.eq.last) goto 230 !stops if reaches last strip |
if(itemp.eq.last) goto 230 !stops if reaches last strip |
413 |
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 |
414 |
enddo ! of the ladder |
enddo ! of the ladder |
420 |
fsat = itemp |
fsat = itemp |
421 |
lsat = itemp |
lsat = itemp |
422 |
if(itemp.eq.last) goto 231 !estremo... |
if(itemp.eq.last) goto 231 !estremo... |
423 |
do while( sat(itemp+1).eq.1 ) |
do while( |
424 |
|
$ sat(itemp+1).eq.1 .and. |
425 |
|
$ value(itemp+1).gt.clseedcut(itemp+1) .and. |
426 |
|
$ .true.) |
427 |
itemp = itemp+1 |
itemp = itemp+1 |
428 |
lsat = itemp |
lsat = itemp |
429 |
if(itemp.eq.last) goto 231 !stops if reaches last strip |
if(itemp.eq.last) goto 231 !stops if reaches last strip |
438 |
iseed = itemp ! <<< SEED |
iseed = itemp ! <<< SEED |
439 |
else |
else |
440 |
iseed = int((lsat+fsat)/2) ! <<< SEED |
iseed = int((lsat+fsat)/2) ! <<< SEED |
441 |
c$$$ print*,'saturated strips ',fsat,lsat,iseed |
if(debug.eq.1) |
442 |
|
$ print*,'saturated strips (first,last) ',fsat,lsat |
443 |
c$$$ print*,'--> ',(value(ii),ii=fsat,lsat) |
c$$$ print*,'--> ',(value(ii),ii=fsat,lsat) |
444 |
endif |
endif |
445 |
c--------------------------------------------------------------- |
c--------------------------------------------------------------- |
446 |
c after finding a cluster seed, checks also adjacent strips, |
c after finding a cluster seed, checks also adjacent strips, |
447 |
C and tags the ones exceeding clinclcut |
C and tags the ones exceeding clinclcut |
448 |
c--------------------------------------------------------------- |
c--------------------------------------------------------------- |
449 |
|
|
450 |
|
if(debug.eq.1)print*,'SEED ',value(iseed),' @',iseed |
451 |
|
$ ,' cut ',clseedcut(iseed) |
452 |
|
|
453 |
ir=iseed !indici destro |
ir=iseed !indici destro |
454 |
il=iseed ! e sinistro |
il=iseed ! e sinistro |
455 |
|
|
571 |
$ mult_view(nclstr_view) = mult_view(nclstr_view)+1 |
$ mult_view(nclstr_view) = mult_view(nclstr_view)+1 |
572 |
enddo |
enddo |
573 |
|
|
574 |
|
c$$$ print*,(value(ii),ii=lmax,rmax) |
575 |
|
c$$$ print*,(clinclcut(ii),ii=lmax,rmax) |
576 |
|
c$$$ print*,(clseedcut(ii),ii=lmax,rmax) |
577 |
|
|
578 |
c$$$ if(rmax-lmax+1.gt.25) |
c$$$ if(rmax-lmax+1.gt.25) |
579 |
c$$$ $ print*,'view ',iv |
c$$$ $ print*,'view ',iv |
684 |
$ sgnl(nclstr1) = sgnl(nclstr1) + value(j) !cluster charge |
$ sgnl(nclstr1) = sgnl(nclstr1) + value(j) !cluster charge |
685 |
enddo |
enddo |
686 |
|
|
687 |
c$$$ print*,'view ',iv,' -- savecluster -- nclstr1: ' |
if(debug.eq.1)then |
688 |
c$$$ $ ,nclstr1,maxs(nclstr1),mult(nclstr1),sgnl(nclstr1) |
print*,'view ',iv,' -- ' |
689 |
c$$$ print*,'----------------------' |
$ ,' n.cl: ',nclstr1 |
690 |
|
$ ,' maxs: ',maxs(nclstr1) |
691 |
|
$ ,' mult: ',mult(nclstr1) |
692 |
|
$ ,' sign: ',sgnl(nclstr1) |
693 |
|
print*,'----------------------' |
694 |
|
endif |
695 |
enddo |
enddo |
696 |
|
|
697 |
return |
return |
768 |
clinclcut(is)=incuty*sigma(iv,nvk(is),nst(is)) |
clinclcut(is)=incuty*sigma(iv,nvk(is),nst(is)) |
769 |
$ *mask(iv,nvk(is),nst(is)) |
$ *mask(iv,nvk(is),nst(is)) |
770 |
sat(is)=0 |
sat(is)=0 |
771 |
if( adc(iv,nvk(is),nst(is)).lt.adc_saty )sat(is)=1 |
if( adc(iv,nvk(is),nst(is)).lt.adc_saty ) |
772 |
|
$ sat(is)=mask(iv,nvk(is),nst(is)) |
773 |
else |
else |
774 |
C=== > X view |
C=== > X view |
775 |
value(is)= (DBLE(adc(iv,nvk(is),nst(is))) |
value(is)= (DBLE(adc(iv,nvk(is),nst(is))) |
780 |
clinclcut(is)=incutx*sigma(iv,nvk(is),nst(is)) |
clinclcut(is)=incutx*sigma(iv,nvk(is),nst(is)) |
781 |
$ *mask(iv,nvk(is),nst(is)) |
$ *mask(iv,nvk(is),nst(is)) |
782 |
sat(is)=0 |
sat(is)=0 |
783 |
if( adc(iv,nvk(is),nst(is)).gt.adc_satx )sat(is)=1 |
if( adc(iv,nvk(is),nst(is)).gt.adc_satx ) |
784 |
|
$ sat(is)=mask(iv,nvk(is),nst(is)) |
785 |
endif |
endif |
786 |
enddo !end loop on strips (1) |
enddo !end loop on strips (1) |
787 |
|
|