/[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.6 by pam-fi, Fri Dec 1 10:43:18 2006 UTC revision 1.8 by pam-fi, Fri Feb 16 14:56:02 2007 UTC
# Line 682  c         print*,'## ',sl2,sl1,sc,sr1,sr Line 682  c         print*,'## ',sl2,sl1,sc,sr1,sr
682              endif              endif
683           else           else
684              print*,'function COG(NCOG,IC) ==> WARNING!! NCOG=',NCOG              print*,'function COG(NCOG,IC) ==> WARNING!! NCOG=',NCOG
685              print*,'                 (NCOG must be 0-4)'       $           ,' not implemented'
686              COG = 0.              COG = 0.
687           endif           endif
688    
# Line 704  ' Line 704  '
704           mu  = 0           mu  = 0
705           do i = istart,istop           do i = istart,istop
706              ipos = i-INDMAX(ic)              ipos = i-INDMAX(ic)
 cc            ivk  = nvk(MAXS(ic)+ipos)  
 cc            is   = nst(MAXS(ic)+ipos)  
 *            print*,'******************',istart,istop,ipos  
 *     $           ,MAXS(ic)+ipos,iv,ivk,is  
 cc            cut  = incut*SIGMA(iv,ivk,is)  
707              cut  = incut*CLSIGMA(i)              cut  = incut*CLSIGMA(i)
 c            if(SIGMA(iv,ivk,is).ne.CLSIGMA(i))  
 c     $           print*,'cog(0,ic) --> hai fatto qualche cazzata'  
708              if(CLSIGNAL(i).ge.cut)then              if(CLSIGNAL(i).ge.cut)then
709                 COG = COG + ipos*CLSIGNAL(i)                 COG = COG + ipos*CLSIGNAL(i)
710                 mu = mu + 1                 mu = mu + 1
 c               print*,ipos,CLSIGNAL(i),incut,cut  
711              endif              endif
712           enddo           enddo
713           if(DEDX(ic).le.0)then           if(SGNL(ic).le.0)then
714              print*,'cog(0,ic) --> ic, dedx ',ic,DEDX(ic)              print*,'cog(0,ic) --> ic, dedx ',ic,SGNL(ic)
715              print*,(CLSIGNAL(i)/CLSIGMA(i),i=istart,istop)              print*,(CLSIGNAL(i)/CLSIGMA(i),i=istart,istop)
716              print*,(CLSIGNAL(i),i=istart,istop)              print*,(CLSIGNAL(i),i=istart,istop)
717              print*,'cog(0,ic) --> NOT EVALUATED '              print*,'cog(0,ic) --> NOT EVALUATED '
718           else           else
719              COG=COG/DEDX(ic)              COG=COG/SGNL(ic)
720           endif           endif
 c         if(DEBUG)print*,'COG  (ic ',ic,' m',mu,')'  
 c     $        ,cog  
721                    
722        else        else
723                    
# Line 775  c      print *,'## cog ',ncog,ic,cog,'// Line 765  c      print *,'## cog ',ncog,ic,cog,'//
765  *     --> signal of the central strip  *     --> signal of the central strip
766           sc = CLSIGNAL(INDMAX(ic)) !center           sc = CLSIGNAL(INDMAX(ic)) !center
767           fsc = 1           fsc = 1
768           if(BAD(VIEW(ic),nvk(MAXS(ic)),nst(MAXS(ic))  ).eq.0)fsc=f  c         if(BAD(VIEW(ic),nvk(MAXS(ic)),nst(MAXS(ic))  ).eq.0)fsc=f
769             if( CLBAD(INDMAX(ic)).eq.0 )fsc=f
770  *     --> signal of adjacent strips  *     --> signal of adjacent strips
771           sl1 = 0                !left 1           sl1 = 0                !left 1
772           fsl1 = 1               !left 1           fsl1 = 1               !left 1
# Line 783  c      print *,'## cog ',ncog,ic,cog,'// Line 774  c      print *,'## cog ',ncog,ic,cog,'//
774       $        (INDMAX(ic)-1).ge.INDSTART(ic)       $        (INDMAX(ic)-1).ge.INDSTART(ic)
775       $        )then       $        )then
776              sl1 = CLSIGNAL(INDMAX(ic)-1)              sl1 = CLSIGNAL(INDMAX(ic)-1)
777              if(BAD(VIEW(ic),nvk(MAXS(ic)-1),nst(MAXS(ic)-1)).eq.0)fsl1=f  c            if(BAD(VIEW(ic),nvk(MAXS(ic)-1),nst(MAXS(ic)-1)).eq.0)fsl1=f
778                if( CLBAD(INDMAX(ic)-1).eq.0)fsl1=f
779  c         else  c         else
780  c            fsl1 = 0  c            fsl1 = 0
781           endif           endif
# Line 794  c            fsl1 = 0 Line 786  c            fsl1 = 0
786       $        (INDMAX(ic)-2).ge.INDSTART(ic)       $        (INDMAX(ic)-2).ge.INDSTART(ic)
787       $        )then       $        )then
788              sl2 = CLSIGNAL(INDMAX(ic)-2)              sl2 = CLSIGNAL(INDMAX(ic)-2)
789              if(BAD(VIEW(ic),nvk(MAXS(ic)-2),nst(MAXS(ic)-2)).eq.0)fsl2=f  c            if(BAD(VIEW(ic),nvk(MAXS(ic)-2),nst(MAXS(ic)-2)).eq.0)fsl2=f
790                if(CLBAD(INDMAX(ic)-2).eq.0)fsl2=f
791  c         else  c         else
792  c            fsl2 = 0  c            fsl2 = 0
793           endif           endif
# Line 806  c            fsl2 = 0 Line 799  c            fsl2 = 0
799       $        (ic.eq.NCLSTR1.and.(INDMAX(ic)+1).le.TOTCLLENGTH)       $        (ic.eq.NCLSTR1.and.(INDMAX(ic)+1).le.TOTCLLENGTH)
800       $        )then       $        )then
801              sr1 = CLSIGNAL(INDMAX(ic)+1)              sr1 = CLSIGNAL(INDMAX(ic)+1)
802              if(BAD(VIEW(ic),nvk(MAXS(ic)+1),nst(MAXS(ic)+1)).eq.0)fsr1=f  c            if(BAD(VIEW(ic),nvk(MAXS(ic)+1),nst(MAXS(ic)+1)).eq.0)fsr1=f
803                if(CLBAD(INDMAX(ic)+1).eq.0)fsr1=f
804  c         else  c         else
805  c            fsr1 = 0  c            fsr1 = 0
806           endif               endif    
# Line 818  c            fsr1 = 0 Line 812  c            fsr1 = 0
812       $        (ic.eq.NCLSTR1.and.(INDMAX(ic)+2).le.TOTCLLENGTH)       $        (ic.eq.NCLSTR1.and.(INDMAX(ic)+2).le.TOTCLLENGTH)
813       $        )then       $        )then
814              sr2 = CLSIGNAL(INDMAX(ic)+2)              sr2 = CLSIGNAL(INDMAX(ic)+2)
815              if(BAD(VIEW(ic),nvk(MAXS(ic)+2),nst(MAXS(ic)+2)).eq.0)fsr2=f  c            if(BAD(VIEW(ic),nvk(MAXS(ic)+2),nst(MAXS(ic)+2)).eq.0)fsr2=f
816                if(CLBAD(INDMAX(ic)+2).eq.0)fsr2=f
817  c         else  c         else
818  c            fsr2 = 0  c            fsr2 = 0
819           endif           endif
# Line 892  c      print*,sl2,sl1,sc,sr1,sr2 Line 887  c      print*,sl2,sl1,sc,sr1,sr2
887                 COG = COG + ipos*CLSIGNAL(i)                 COG = COG + ipos*CLSIGNAL(i)
888              endif              endif
889           enddo           enddo
890           COG=COG/DEDX(ic)           COG=COG/SGNL(ic)
891           do i=istart,istop           do i=istart,istop
892              ipos=i-INDMAX(ic)              ipos=i-INDMAX(ic)
893              il=nvk(MAXS(ic)+ipos)              il=nvk(MAXS(ic)+ipos)

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.23