/[PAMELA software]/DarthVader/TrackerLevel2/src/F77/reductionflight.f
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/src/F77/reductionflight.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by pam-fi, Thu Mar 15 12:17:10 2007 UTC revision 1.19 by pam-fi, Mon May 14 11:03:06 2007 UTC
# Line 27  c$$$      debug = .true. Line 27  c$$$      debug = .true.
27  c$$$      verbose = .true.  c$$$      verbose = .true.
28  c$$$      warning = .true.  c$$$      warning = .true.
29    
30    *     //////////////////////////
31    *     initialize some parameters
32    *     //////////////////////////
33    
34        call init_level1        call init_level1
35    
36        if(debug)print*,'-- check LEVEL0 status'        if(debug)print*,'-- check LEVEL0 status'
# Line 116  c--------------------------------------- Line 120  c---------------------------------------
120        do iv=1,nviews        do iv=1,nviews
121           ima=0           ima=0
122           do ik=1,nva1_view           do ik=1,nva1_view
123              cn(iv,ik)  = 0              cn(iv,ik)    = 0
124              cnrms(iv,ik)  = 0              cnrms(iv,ik) = 0
125              cnn(iv,ik) = -1              cnn(iv,ik)   = -1
126              iflag=0              iflag = 0
127              mask_vk_ev(iv,ik)=1              mask_vk_ev(iv,ik) = 1
128              call stripmask(iv,ik)      !compute mask(i,j,k), combining VA1-masks              call stripmask(iv,ik)      !compute mask(i,j,k), combining VA1-masks
129  c     NBNBNBNBNB mask per la striscia 1 !!!!!!!!  *           --------------------------------------
130              if(mask(iv,ik,1).eq.1)call cncomp(iv,ik,iflag)  *           if chip is not masked ---> evaluate CN
131              if(iflag.ne.0)then  *           --------------------------------------
132                 ima=ima+1              if( mask(iv,ik,1).eq.1 ) then !!!NBNB mask per la striscia 1 !!!!!!!!
133                 mask_vk_ev(iv,ik)=0                 call cncomp(iv,ik,iflag)
134                 ierror = 220                 if(iflag.ne.0)then
135                      ima=ima+1
136                      mask_vk_ev(iv,ik)=0
137                      ierror = 220
138                   endif
139                   call stripmask(iv,ik) !compute mask(i,j,k), combining VA1-masks
140              endif              endif
             call stripmask(iv,ik)      !compute mask(i,j,k), combining VA1-masks  
               
141           enddo           enddo
142   100     format(' * WARNING * Event ',i7,' view',i3,': VK MASK ',24i1)   100     format(' * WARNING * Event ',i7,' view',i3,': VK MASK ',24i1)
143           if(ima.ne.0.and.debug)write(*,100)eventn(1),iv           if(ima.ne.0.and.debug)write(*,100)eventn(1),iv
144       $        ,(mask_vk_ev(iv,ik),ik=1,nva1_view)       $        ,(mask_vk_ev(iv,ik),ik=1,nva1_view)
145    c         if(ima.ne.0)write(*,100)eventn(1),iv
146    c     $        ,(mask_vk_ev(iv,ik),ik=1,nva1_view)  
147        enddo        enddo
148    
149  cc      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
# Line 632  c$$$      end Line 641  c$$$      end
641    
642        subroutine stripmask(iv,ivk)        subroutine stripmask(iv,ivk)
643    
644    *     -----------------------------------------------
645  *     this routine set va1 and single-strip masks,  *     this routine set va1 and single-strip masks,
646  *     on the basis of the VA1 mask saved in the DB  *     on the basis of the VA1 mask saved in the DB
647  *  *
648  *     mask(nviews,nva1_view,nstrips_va1) !strip mask  *     mask(nviews,nva1_view,nstrips_va1) !strip mask
649  *     mask_vk(nviews,nva1_view)          !VA1 mask  *     mask_vk(nviews,nva1_view)          !VA1 mask
650  *  *     -----------------------------------------------
651        include 'commontracker.f'        include 'commontracker.f'
652        include 'level1.f'        include 'level1.f'
653        include 'common_reduction.f'        include 'common_reduction.f'
# Line 645  c$$$      end Line 655  c$$$      end
655    
656  *     init mask  *     init mask
657        do is=1,nstrips_va1        do is=1,nstrips_va1
658    *        --------------------------------------------------------
659    *        if VA1-mask from DB is 0 or 1, three masks are combined:
660    *        - from DB (a-priori mask)
661    *        - run-based (chip declared bad on the basis of <SIG>)
662    *        - event-based (failure in CN computation)
663    *        --------------------------------------------------------
664           if( mask_vk(iv,ivk) .ne. -1)then                       if( mask_vk(iv,ivk) .ne. -1)then            
665              mask(iv,ivk,is) = 1              mask(iv,ivk,is) = 1
666       $           * mask_vk(iv,ivk) !from DB       $           * mask_vk(iv,ivk)     !from DB
667       $           * mask_vk_ev(iv,ivk) !from <SIG>       $           * mask_vk_ev(iv,ivk)  !from <SIG>
668       $           * mask_vk_run(iv,ivk) !from CN       $           * mask_vk_run(iv,ivk) !from CN
669    *        -----------------------------------------------------------
670    *        if VA1-mask from DB is -1 only event-based mask is applied
671    *        -----------------------------------------------------------
672           else           else
673              mask(iv,ivk,is) = -1              mask(iv,ivk,is) = -1
674       $           * mask_vk(iv,ivk) !from DB       $           * mask_vk(iv,ivk)     !from DB
675       $           * mask_vk_ev(iv,ivk) !from CN       $           * mask_vk_ev(iv,ivk)  !from CN
676           endif           endif
677        enddo        enddo
678                

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.23