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

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

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

revision 1.26 by mocchiut, Tue Aug 11 12:58:25 2009 UTC revision 1.27 by pam-fi, Tue Mar 12 11:02:02 2013 UTC
# Line 231  c            res = riseta(ic,ang)       Line 231  c            res = riseta(ic,ang)      
231  *     temporary patch for saturated clusters  *     temporary patch for saturated clusters
232  *     ======================================  *     ======================================
233           if( nsatstrips(ic).gt.0 )then           if( nsatstrips(ic).gt.0 )then
234              corr  = cog(4,ic)              c            corr  = cog(4,ic)            
235                corr = digsat(ic)
236              res = pitchX*1e-4/sqrt(12.)              res = pitchX*1e-4/sqrt(12.)
237  cc            cc=cog(4,ic)  cc            cc=cog(4,ic)
238  c$$$            print*,ic,' *** ',cc  c$$$            print*,ic,' *** ',cc
# Line 313  c            res = riseta(ic,ang)   Line 314  c            res = riseta(ic,ang)  
314  *     temporary patch for saturated clusters  *     temporary patch for saturated clusters
315  *     ======================================  *     ======================================
316           if( nsatstrips(ic).gt.0 )then           if( nsatstrips(ic).gt.0 )then
317              corr    = cog(4,ic)              c            corr    = cog(4,ic)            
318                corr = digsat(ic)
319              res = pitchY*1e-4/sqrt(12.)              res = pitchY*1e-4/sqrt(12.)
320  cc            cc=cog(4,ic)  cc            cc=cog(4,ic)
321  c$$$            print*,ic,' *** ',cc  c$$$            print*,ic,' *** ',cc
# Line 939  c 100  return Line 941  c 100  return
941        return        return
942        end        end
943    
944    *** * * * *** * * * *** * * * *** * * * *** * * * *** * * * ***
945          real function digsat(ic)
946    *-------------------------------------------------
947    *
948    *          
949    *-------------------------------------------------
950          include 'commontracker.f'
951          include 'calib.f'
952          include 'level1.f'
953          
954          integer nsat
955          real pitchsat
956          
957          nsat = 0
958          pitchsat = 0.
959          iv=VIEW(ic)              
960          istart = INDSTART(IC)
961          istop  = TOTCLLENGTH
962          if(ic.lt.NCLSTR1)istop=INDSTART(IC+1)-1
963          do i = INDMAX(IC),istart,-1
964             if(  (mod(iv,2).eq.1.and.CLADC(i).lt.ADCsatx)
965         $        .or.
966         $        (mod(iv,2).eq.0.and.CLADC(i).gt.ADCsaty) )then
967                nsat = nsat + 1
968                pitchsat = pitchsat + i - INDMAX(IC)
969             else
970                goto 10
971             endif
972          enddo
973     10   continue
974          do i = INDMAX(IC)+1,istop
975             if(  (mod(iv,2).eq.1.and.CLADC(i).lt.ADCsatx)
976         $        .or.
977         $        (mod(iv,2).eq.0.and.CLADC(i).gt.ADCsaty) )then
978                nsat = nsat + 1
979                pitchsat = pitchsat + i - INDMAX(IC)
980             else
981                goto 20
982             endif
983          enddo
984     20   continue
985          
986          digsat = 0
987          if (nsat.gt.0) digsat = pitchsat / nsat
988          
989          return
990          end
991    
992    
993  *** * * * *** * * * *** * * * *** * * * *** * * * *** * * * ***  *** * * * *** * * * *** * * * *** * * * *** * * * *** * * * ***
994        real function cog(ncog,ic)        real function cog(ncog,ic)

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.23