/[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.10 by pam-fi, Thu Oct 26 16:22:38 2006 UTC revision 1.14 by pam-fi, Wed Nov 29 10:09:38 2006 UTC
# Line 23  Line 23 
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
# Line 113  c--------------------------------------- Line 108  c---------------------------------------
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,
# Line 169  C===  > X view Line 168  C===  > X view
168             call save_cluster(iv)             call save_cluster(iv)
169          else          else
170             fshower(iv) = 1             fshower(iv) = 1
171             GOOD1(DSPnumber(iv)) = 11  c           GOOD1(DSPnumber(iv)) = 11 !AHAHAHAHA ORRORE!!
172               GOOD1(iv) = 11
173          endif          endif
174        enddo                     ! end loop on views        enddo                     ! end loop on views
175        do iv=1,nviews        do iv=1,nviews
# Line 189  C--------------------------------------- Line 189  C---------------------------------------
189        do iv = 1,nviews        do iv = 1,nviews
190           ngood = ngood + good1(iv)           ngood = ngood + good1(iv)
191        enddo        enddo
192        if(ngood.ne.0)print*,'* WARNING * Event ',eventn(1)  c$$$      if(ngood.ne.0)print*,'* WARNING * Event ',eventn(1)
193       $     ,':LEVEL1 event status: '  c$$$     $     ,':LEVEL1 event status: '
194       $     ,(good1(i),i=1,nviews)  c$$$     $     ,(good1(i),i=1,nviews)
195  c------------------------------------------------------------------------  c------------------------------------------------------------------------
196  c  c
197  c     closes files and exits  c     closes files and exits
# Line 457  c$$$               if(rmax-lmax+1.gt.25) Line 457  c$$$               if(rmax-lmax+1.gt.25)
457  c$$$     $              print*,'view ',iv  c$$$     $              print*,'view ',iv
458  c$$$     $              ,' cl ',nclstr_view,' mult ',rmax-lmax+1  c$$$     $              ,' cl ',nclstr_view,' mult ',rmax-lmax+1
459  c------------------------------------------------------------------------  c------------------------------------------------------------------------
460  c     search for a dowble peak inside the cluster                                                                                                              c     search for a double peak inside the cluster                                                                                                            
461  c------------------------------------------------------------------------  c------------------------------------------------------------------------
462                 inext = rmax+1   !<< index where to start new-cluster search                 inext = rmax+1   !<< index where to start new-cluster search
463                                
# Line 578  c     $        ,nclstr1,maxs(nclstr1),mu Line 578  c     $        ,nclstr1,maxs(nclstr1),mu
578  *---***---***---***---***---***---***---***---***  *---***---***---***---***---***---***---***---***
579    
580    
581        subroutine stripmask  c$$$      subroutine stripmask
582    c$$$
583    c$$$*     this routine set va1 and single-strip masks,
584    c$$$*     on the basis of the VA1 mask saved in the DB
585    c$$$*
586    c$$$*     mask(nviews,nva1_view,nstrips_va1) !strip mask
587    c$$$*     mask_vk(nviews,nva1_view)          !VA1 mask
588    c$$$*
589    c$$$      include 'commontracker.f'
590    c$$$      include 'level1.f'
591    c$$$      include 'common_reduction.f'
592    c$$$      include 'calib.f'
593    c$$$
594    c$$$*     init mask
595    c$$$      do iv=1,nviews
596    c$$$         do ivk=1,nva1_view
597    c$$$            do is=1,nstrips_va1
598    c$$$c               mask(iv,ivk,is) = mask_vk(iv,ivk)
599    c$$$               if( mask_vk(iv,ivk) .ne. -1)then
600    c$$$                  mask(iv,ivk,is) = 1
601    c$$$     $                 * mask_vk(iv,ivk)     !from DB
602    c$$$     $                 * mask_vk_ev(iv,ivk)  !from <SIG>
603    c$$$     $                 * mask_vk_run(iv,ivk) !from CN
604    c$$$               else
605    c$$$                  mask(iv,ivk,is) = -1
606    c$$$     $                 * mask_vk(iv,ivk)     !from DB
607    c$$$     $                 * mask_vk_ev(iv,ivk)  !from CN
608    c$$$               endif
609    c$$$            enddo
610    c$$$         enddo
611    c$$$      enddo
612    c$$$
613    c$$$
614    c$$$      return
615    c$$$      end
616    
617          subroutine stripmask(iv,ivk)
618    
619  *     this routine set va1 and single-strip masks,  *     this routine set va1 and single-strip masks,
620  *     on the basis of the VA1 mask saved in the DB  *     on the basis of the VA1 mask saved in the DB
# Line 592  c     $        ,nclstr1,maxs(nclstr1),mu Line 628  c     $        ,nclstr1,maxs(nclstr1),mu
628        include 'calib.f'        include 'calib.f'
629    
630  *     init mask  *     init mask
631        do iv=1,nviews        do is=1,nstrips_va1
632           do ivk=1,nva1_view           if( mask_vk(iv,ivk) .ne. -1)then            
633              do is=1,nstrips_va1              mask(iv,ivk,is) = 1
634  c               mask(iv,ivk,is) = mask_vk(iv,ivk)       $           * mask_vk(iv,ivk) !from DB
635                 mask(iv,ivk,is) = mask_vk(iv,ivk) * mask_vk_ev(iv,ivk)                     $           * mask_vk_ev(iv,ivk) !from <SIG>
636              enddo       $           * mask_vk_run(iv,ivk) !from CN
637           enddo           else
638                mask(iv,ivk,is) = -1
639         $           * mask_vk(iv,ivk) !from DB
640         $           * mask_vk_ev(iv,ivk) !from CN
641             endif
642        enddo        enddo
643          
644          
645        return        return
646        end        end
   

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.23