| 23 |
integer ierror |
integer ierror |
| 24 |
ierror = 0 |
ierror = 0 |
| 25 |
|
|
| 26 |
|
c$$$ debug = .true. |
| 27 |
|
c$$$ verbose = .true. |
| 28 |
|
c$$$ warning = .true. |
| 29 |
|
|
| 30 |
call init_level1 |
call init_level1 |
| 31 |
|
|
| 32 |
|
if(debug)print*,'-- check LEVEL0 status' |
| 33 |
|
|
| 34 |
c good1 = good0 |
c good1 = good0 |
| 35 |
c-------------------------------------------------- |
c-------------------------------------------------- |
| 36 |
c check the LEVEL0 event status for missing |
c check the LEVEL0 event status for missing |
| 92 |
good_old(iv) = good1(iv) |
good_old(iv) = good1(iv) |
| 93 |
ngood = ngood + good1(iv) |
ngood = ngood + good1(iv) |
| 94 |
enddo |
enddo |
| 95 |
c if(ngood.ne.0)print*,'* WARNING * LEVEL0 event status: ' |
if(debug.and.ngood.ne.0)print*,'* WARNING * LEVEL0 event status: ' |
| 96 |
c $ ,(good1(i),i=1,nviews) |
$ ,(good1(i),i=1,nviews) |
| 97 |
c-------------------------------------------------- |
c-------------------------------------------------- |
| 98 |
c read the variable DATATRACKER from LEVEL0 |
c read the variable DATATRACKER from LEVEL0 |
| 99 |
c and fill the variable ADC (invertin view 11) |
c and fill the variable ADC (invertin view 11) |
| 100 |
c-------------------------------------------------- |
c-------------------------------------------------- |
| 101 |
|
|
| 102 |
|
if(debug)print*,'-- fill ADC vectors' |
| 103 |
|
|
| 104 |
call filladc(iflag) |
call filladc(iflag) |
| 105 |
if(iflag.ne.0)then |
if(iflag.ne.0)then |
| 106 |
ierror = 220 |
ierror = 220 |
| 111 |
c (excluding strips with signal, |
c (excluding strips with signal, |
| 112 |
c tagged with the flag CLSTR) |
c tagged with the flag CLSTR) |
| 113 |
c-------------------------------------------------- |
c-------------------------------------------------- |
| 114 |
|
if(debug)print*,'-- compute CN' |
| 115 |
|
|
| 116 |
do iv=1,nviews |
do iv=1,nviews |
| 117 |
ima=0 |
ima=0 |
| 118 |
do ik=1,nva1_view |
do ik=1,nva1_view |
| 147 |
c--------------------------------------------- |
c--------------------------------------------- |
| 148 |
ind=1 !clsignal array index |
ind=1 !clsignal array index |
| 149 |
|
|
| 150 |
|
if(debug)print*,'-- search clusters' |
| 151 |
do iv=1,nviews !loop on views |
do iv=1,nviews !loop on views |
| 152 |
do is=1,nstrips_view !loop on strips (1) |
do is=1,nstrips_view !loop on strips (1) |
| 153 |
if(mod(iv,2).eq.1) then |
if(mod(iv,2).eq.1) then |
| 178 |
|
|
| 179 |
if(.not.flag_shower)then |
if(.not.flag_shower)then |
| 180 |
call save_cluster(iv) |
call save_cluster(iv) |
| 181 |
|
if(debug)print*,'view ',iv,' #clusters ', nclstr_view |
| 182 |
else |
else |
| 183 |
fshower(iv) = 1 |
fshower(iv) = 1 |
| 184 |
c GOOD1(DSPnumber(iv)) = 11 !AHAHAHAHA ORRORE!! |
c GOOD1(DSPnumber(iv)) = 11 !AHAHAHAHA ORRORE!! |
| 185 |
GOOD1(iv) = 11 |
GOOD1(iv) = 11 |
| 186 |
|
101 format(' * WARNING * Event ',i7,' view',i3 |
| 187 |
|
$ ,' #clusters > ',i5,' --> MASKED') |
| 188 |
|
if(debug)write(*,101)eventn(1),iv,nclstrmax_view |
| 189 |
endif |
endif |
| 190 |
enddo ! end loop on views |
enddo ! end loop on views |
| 191 |
do iv=1,nviews |
do iv=1,nviews |
| 205 |
do iv = 1,nviews |
do iv = 1,nviews |
| 206 |
ngood = ngood + good1(iv) |
ngood = ngood + good1(iv) |
| 207 |
enddo |
enddo |
| 208 |
c$$$ if(ngood.ne.0)print*,'* WARNING * Event ',eventn(1) |
if(debug.and.ngood.ne.0)print*,'* WARNING * Event ',eventn(1) |
| 209 |
c$$$ $ ,':LEVEL1 event status: ' |
$ ,':LEVEL1 event status: ' |
| 210 |
c$$$ $ ,(good1(i),i=1,nviews) |
$ ,(good1(i),i=1,nviews) |
| 211 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
| 212 |
c |
c |
| 213 |
c closes files and exits |
c closes files and exits |