23 |
integer ierror |
integer ierror |
24 |
ierror = 0 |
ierror = 0 |
25 |
|
|
|
* ------------------------------------------------------- |
|
|
* STRIP MASK |
|
|
* ------------------------------------------------------- |
|
|
|
|
|
c call stripmask !called later, after CN computation |
|
26 |
call init_level1 |
call init_level1 |
27 |
|
|
28 |
c good1 = good0 |
c good1 = good0 |
108 |
cn(iv,ik) = 0 |
cn(iv,ik) = 0 |
109 |
cnrms(iv,ik) = 0 |
cnrms(iv,ik) = 0 |
110 |
cnn(iv,ik) = -1 |
cnn(iv,ik) = -1 |
|
mask_vk_ev(iv,ik)=1 |
|
111 |
iflag=0 |
iflag=0 |
112 |
if(mask_vk(iv,ik).eq.1)call cncomp(iv,ik,iflag) |
mask_vk_ev(iv,ik)=1 |
113 |
|
call stripmask(iv,ik) !compute mask(i,j,k), combining VA1-masks |
114 |
|
c NBNBNBNBNB mask per la striscia 1 !!!!!!!! |
115 |
|
if(mask(iv,ik,1).eq.1)call cncomp(iv,ik,iflag) |
116 |
if(iflag.ne.0)then |
if(iflag.ne.0)then |
117 |
ima=ima+1 |
ima=ima+1 |
118 |
mask_vk_ev(iv,ik)=0 |
mask_vk_ev(iv,ik)=0 |
119 |
ierror = 220 |
ierror = 220 |
120 |
endif |
endif |
121 |
|
call stripmask(iv,ik) !compute mask(i,j,k), combining VA1-masks |
122 |
|
|
123 |
enddo |
enddo |
124 |
100 format(' * WARNING * Event ',i7,' view',i3,': VK MASK ',24i1) |
100 format(' * WARNING * Event ',i7,' view',i3,': VK MASK ',24i1) |
125 |
if(ima.ne.0.and.debug)write(*,100)eventn(1),iv |
if(ima.ne.0.and.debug)write(*,100)eventn(1),iv |
126 |
$ ,(mask_vk_ev(iv,ik),ik=1,nva1_view) |
$ ,(mask_vk_ev(iv,ik),ik=1,nva1_view) |
127 |
enddo |
enddo |
128 |
|
|
129 |
call stripmask !compute mask(i,j,k), combining mask_vk_ev and mask_vk |
cc call stripmask !compute mask(i,j,k), combining mask_vk_ev and mask_vk |
130 |
|
|
131 |
c--------------------------------------------- |
c--------------------------------------------- |
132 |
c loops on views, VA1 and strips, |
c loops on views, VA1 and strips, |
577 |
*---***---***---***---***---***---***---***---*** |
*---***---***---***---***---***---***---***---*** |
578 |
|
|
579 |
|
|
580 |
subroutine stripmask |
c$$$ subroutine stripmask |
581 |
|
c$$$ |
582 |
|
c$$$* this routine set va1 and single-strip masks, |
583 |
|
c$$$* on the basis of the VA1 mask saved in the DB |
584 |
|
c$$$* |
585 |
|
c$$$* mask(nviews,nva1_view,nstrips_va1) !strip mask |
586 |
|
c$$$* mask_vk(nviews,nva1_view) !VA1 mask |
587 |
|
c$$$* |
588 |
|
c$$$ include 'commontracker.f' |
589 |
|
c$$$ include 'level1.f' |
590 |
|
c$$$ include 'common_reduction.f' |
591 |
|
c$$$ include 'calib.f' |
592 |
|
c$$$ |
593 |
|
c$$$* init mask |
594 |
|
c$$$ do iv=1,nviews |
595 |
|
c$$$ do ivk=1,nva1_view |
596 |
|
c$$$ do is=1,nstrips_va1 |
597 |
|
c$$$c mask(iv,ivk,is) = mask_vk(iv,ivk) |
598 |
|
c$$$ if( mask_vk(iv,ivk) .ne. -1)then |
599 |
|
c$$$ mask(iv,ivk,is) = 1 |
600 |
|
c$$$ $ * mask_vk(iv,ivk) !from DB |
601 |
|
c$$$ $ * mask_vk_ev(iv,ivk) !from <SIG> |
602 |
|
c$$$ $ * mask_vk_run(iv,ivk) !from CN |
603 |
|
c$$$ else |
604 |
|
c$$$ mask(iv,ivk,is) = -1 |
605 |
|
c$$$ $ * mask_vk(iv,ivk) !from DB |
606 |
|
c$$$ $ * mask_vk_ev(iv,ivk) !from CN |
607 |
|
c$$$ endif |
608 |
|
c$$$ enddo |
609 |
|
c$$$ enddo |
610 |
|
c$$$ enddo |
611 |
|
c$$$ |
612 |
|
c$$$ |
613 |
|
c$$$ return |
614 |
|
c$$$ end |
615 |
|
|
616 |
|
subroutine stripmask(iv,ivk) |
617 |
|
|
618 |
* this routine set va1 and single-strip masks, |
* this routine set va1 and single-strip masks, |
619 |
* on the basis of the VA1 mask saved in the DB |
* on the basis of the VA1 mask saved in the DB |
627 |
include 'calib.f' |
include 'calib.f' |
628 |
|
|
629 |
* init mask |
* init mask |
630 |
do iv=1,nviews |
do is=1,nstrips_va1 |
631 |
do ivk=1,nva1_view |
if( mask_vk(iv,ivk) .ne. -1)then |
632 |
do is=1,nstrips_va1 |
mask(iv,ivk,is) = 1 |
633 |
c mask(iv,ivk,is) = mask_vk(iv,ivk) |
$ * mask_vk(iv,ivk) !from DB |
634 |
mask(iv,ivk,is) = mask_vk(iv,ivk) * mask_vk_ev(iv,ivk) |
$ * mask_vk_ev(iv,ivk) !from <SIG> |
635 |
enddo |
$ * mask_vk_run(iv,ivk) !from CN |
636 |
enddo |
else |
637 |
|
mask(iv,ivk,is) = -1 |
638 |
|
$ * mask_vk(iv,ivk) !from DB |
639 |
|
$ * mask_vk_ev(iv,ivk) !from CN |
640 |
|
endif |
641 |
enddo |
enddo |
642 |
|
|
643 |
|
|
644 |
return |
return |
645 |
end |
end |
|
|
|