| 25 |
* STRIP MASK |
* STRIP MASK |
| 26 |
* ------------------------------------------------------- |
* ------------------------------------------------------- |
| 27 |
|
|
| 28 |
call stripmask |
c call stripmask !called later, after CN computation |
| 29 |
call init_level1 |
call init_level1 |
| 30 |
|
|
| 31 |
good1=good0 |
good1 = good0 |
| 32 |
c-------------------------------------------------- |
c-------------------------------------------------- |
| 33 |
c read the variable DATATRACKER from LEVEL0 |
c read the variable DATATRACKER from LEVEL0 |
| 34 |
c and fill the variable ADC (inverting view 11) |
c and fill the variable ADC (inverting view 11) |
| 37 |
if(iflag.ne.0)then |
if(iflag.ne.0)then |
| 38 |
good1=0 |
good1=0 |
| 39 |
c if(DEBUG)print*,'event ',eventn(1),' >>>>> decode ERROR' |
c if(DEBUG)print*,'event ',eventn(1),' >>>>> decode ERROR' |
| 40 |
ierror = 220 |
ierror = 220 |
| 41 |
goto 200 |
goto 200 |
| 42 |
endif |
endif |
| 43 |
|
|
| 48 |
c-------------------------------------------------- |
c-------------------------------------------------- |
| 49 |
do iv=1,nviews |
do iv=1,nviews |
| 50 |
do ik=1,nva1_view |
do ik=1,nva1_view |
| 51 |
cn(iv,ik)=0 !initializes cn variable |
cn(iv,ik)=0 |
| 52 |
|
mask_vk_ev(iv,ik)=1 |
| 53 |
iflag=0 |
iflag=0 |
| 54 |
if(mask_vk(iv,ik).eq.1)call cncomp(iv,ik,iflag) |
if(mask_vk(iv,ik).eq.1)call cncomp(iv,ik,iflag) |
| 55 |
if(iflag.ne.0)good1=0 |
c if(iflag.ne.0)good1=0 |
| 56 |
|
if(iflag.ne.0)then |
| 57 |
|
mask_vk_ev(iv,ik)=0 |
| 58 |
|
ierror = 220 |
| 59 |
|
endif |
| 60 |
enddo |
enddo |
| 61 |
enddo |
enddo |
| 62 |
if(good1.eq.0)then |
c if(good1.eq.0)then |
| 63 |
ierror = 220 |
c ierror = 220 |
| 64 |
c if(WARNING) |
c endif |
|
c $ print*,' WARNING - cncomp: CN computation failure ' |
|
|
endif |
|
| 65 |
|
|
| 66 |
|
call stripmask !compute mask(i,j,k) |
| 67 |
c--------------------------------------------- |
c--------------------------------------------- |
| 68 |
c loops on views, VA1 and strips, |
c loops on views, VA1 and strips, |
| 69 |
c and computes strips signals using |
c and computes strips signals using |
| 94 |
clinclcut(is)=incutx*sigma(iv,nvk(is),nst(is)) |
clinclcut(is)=incutx*sigma(iv,nvk(is),nst(is)) |
| 95 |
$ *mask(iv,nvk(is),nst(is)) |
$ *mask(iv,nvk(is),nst(is)) |
| 96 |
endif |
endif |
| 97 |
|
c$$$ print*,iv,is,' --- ',adc(iv,nvk(is),nst(is)),cn(iv,nvk(is)) |
| 98 |
|
c$$$ $ ,pedestal(iv,nvk(is),nst(is)),value(is) |
| 99 |
|
c$$$ $ ,sigma(iv,nvk(is),nst(is)) |
| 100 |
|
c if(value(is).gt.clseedcut(is)) |
| 101 |
|
c $ print*,iv,is,' --- (ADC_PED_CN) ',value(is),clseedcut(is) |
| 102 |
enddo !end loop on strips (1) |
enddo !end loop on strips (1) |
| 103 |
call search_cluster(iv) |
call search_cluster(iv) |
| 104 |
if(flag_shower.eqv..true.)then |
if(flag_shower.eqv..true.)then |
| 110 |
do iv=1,nviews |
do iv=1,nviews |
| 111 |
do ik=1,nva1_view |
do ik=1,nva1_view |
| 112 |
cnev(iv,ik)=cn(iv,ik) !assigns computed CN to ntuple variables |
cnev(iv,ik)=cn(iv,ik) !assigns computed CN to ntuple variables |
| 113 |
|
cnevflag(iv,ik)=cnflag(iv,ik) !assigns computed CN to ntuple variables |
| 114 |
ccc print*,"cnev(",iv,",",ik,")(reduction)= ",cnev(iv,ik) |
ccc print*,"cnev(",iv,",",ik,")(reduction)= ",cnev(iv,ik) |
| 115 |
enddo |
enddo |
| 116 |
enddo |
enddo |
| 471 |
250 continue |
250 continue |
| 472 |
|
|
| 473 |
c-------------------------------------------------------- |
c-------------------------------------------------------- |
| 474 |
c fills ntuple variables |
c fills cluster variables |
| 475 |
c-------------------------------------------------------- |
c-------------------------------------------------------- |
| 476 |
nclstr1=nclstr1+1 !cluster number |
nclstr1=nclstr1+1 !cluster number |
| 477 |
ccc print*,nclstr1,multtemp |
ccc print*,nclstr1,multtemp |
| 478 |
if(nclstr1.gt.nclstrmax) then !too many clusters for the event: |
if(nclstr1.gt.nclstrmax) then !too many clusters for the event: |
| 479 |
|
if(verbose)print*,'Event ',eventn(1), |
| 480 |
|
$ ': more than ',nclstrmax,' clusters' |
| 481 |
good1=0 ! event |
good1=0 ! event |
| 482 |
nclstr1=0 |
nclstr1=0 |
| 483 |
totCLlength=0 |
totCLlength=0 |
| 484 |
flag_shower = .true. |
flag_shower = .true. |
|
if(verbose)print*,'Event ',eventn(1), |
|
|
$ ': more than ',nclstrmax,' clusters' |
|
| 485 |
goto 2000 |
goto 2000 |
| 486 |
endif |
endif |
| 487 |
view(nclstr1)=iv !vista del cluster |
view(nclstr1)=iv !vista del cluster |
| 535 |
* mask_vk(nviews,nva1_view) !VA1 mask |
* mask_vk(nviews,nva1_view) !VA1 mask |
| 536 |
* |
* |
| 537 |
include 'commontracker.f' |
include 'commontracker.f' |
| 538 |
include 'level1.f' |
c include 'level1.f' |
| 539 |
|
include 'common_reduction.f' |
| 540 |
include 'calib.f' |
include 'calib.f' |
| 541 |
|
|
| 542 |
* init mask |
* init mask |
| 543 |
do iv=1,nviews |
do iv=1,nviews |
| 544 |
do ivk=1,nva1_view |
do ivk=1,nva1_view |
| 545 |
do is=1,nstrips_va1 |
do is=1,nstrips_va1 |
| 546 |
mask(iv,ivk,is) = mask_vk(iv,ivk) |
c mask(iv,ivk,is) = mask_vk(iv,ivk) |
| 547 |
|
mask(iv,ivk,is) = mask_vk(iv,ivk) * mask_vk_ev(iv,ivk) |
| 548 |
enddo |
enddo |
| 549 |
enddo |
enddo |
| 550 |
enddo |
enddo |