/[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.16 by pam-fi, Fri Aug 17 14:36:06 2007 UTC revision 1.18 by pam-fi, Mon Aug 20 16:07:16 2007 UTC
# Line 3  Line 3 
3        subroutine idtoc(ipfa,cpfa)        subroutine idtoc(ipfa,cpfa)
4                
5        integer ipfa        integer ipfa
6        character*4 cpfa        character*10 cpfa
7    
8        CPFA='COG4'        CPFA='COG4'
9        if(ipfa.eq.0)CPFA='ETA'        if(ipfa.eq.0)CPFA='ETA'
# Line 183  c      print*,pfastrips Line 183  c      print*,pfastrips
183        if(mod(int(VIEW(ic)),2).eq.1)then !Y-view        if(mod(int(VIEW(ic)),2).eq.1)then !Y-view
184                
185           if( abs(angle).ge.e2fay.and.abs(angle).le.e2tay )then           if( abs(angle).ge.e2fay.and.abs(angle).le.e2tay )then
186              pfaeta = pfaeta2(ic,angle)+pfcorr(ic,angle)              pfaeta = pfaeta2(ic,angle)+pfacorr(ic,angle)
187           elseif( abs(angle).ge.e3fay.and.abs(angle).le.e3tay )then           elseif( abs(angle).ge.e3fay.and.abs(angle).le.e3tay )then
188              pfaeta = pfaeta3(ic,angle)+pfcorr(ic,angle)              pfaeta = pfaeta3(ic,angle)+pfacorr(ic,angle)
189           elseif( abs(angle).ge.e4fay.and.abs(angle).le.e4tay )then           elseif( abs(angle).ge.e4fay.and.abs(angle).le.e4tay )then
190              pfaeta = pfaeta4(ic,angle)+pfcorr(ic,angle)              pfaeta = pfaeta4(ic,angle)+pfacorr(ic,angle)
191           else           else
192              pfaeta = cog(4,ic)              pfaeta = cog(4,ic)
193           endif                       endif            
# Line 195  c      print*,pfastrips Line 195  c      print*,pfastrips
195        else                      !X-view        else                      !X-view
196    
197           if( abs(angle).ge.e2fax.and.abs(angle).le.e2tax )then           if( abs(angle).ge.e2fax.and.abs(angle).le.e2tax )then
198              pfaeta = pfaeta2(ic,angle)+pfcorr(ic,angle)              pfaeta = pfaeta2(ic,angle)+pfacorr(ic,angle)
199           elseif( abs(angle).ge.e3fax.and.abs(angle).le.e3tax )then           elseif( abs(angle).ge.e3fax.and.abs(angle).le.e3tax )then
200              pfaeta = pfaeta3(ic,angle)+pfcorr(ic,angle)              pfaeta = pfaeta3(ic,angle)+pfacorr(ic,angle)
201           elseif( abs(angle).ge.e4fax.and.abs(angle).le.e4tax )then           elseif( abs(angle).ge.e4fax.and.abs(angle).le.e4tax )then
202              pfaeta = pfaeta4(ic,angle)+pfcorr(ic,angle)              pfaeta = pfaeta4(ic,angle)+pfacorr(ic,angle)
203           else           else
204              pfaeta = cog(4,ic)              pfaeta = cog(4,ic)
205           endif                       endif            
# Line 338  c      if(mod(int(VIEW(ic)),2).eq.1)then Line 338  c      if(mod(int(VIEW(ic)),2).eq.1)then
338              goto 98              goto 98
339           endif           endif
340        enddo        enddo
341        if(DEBUG)        if(DEBUG.EQ.1)
342       $     print*,'pfaeta2 *** warning *** angle out of range: ',angle       $     print*,'pfaeta2 *** warning *** angle out of range: ',angle
343        if(angle.lt.angL(1))iang=1        if(angle.lt.angL(1))iang=1
344        if(angle.gt.angR(nangbin))iang=nangbin        if(angle.gt.angR(nangbin))iang=nangbin
# Line 414  c$$$         pfaeta2=pfaeta2+1.   !temp Line 414  c$$$         pfaeta2=pfaeta2+1.   !temp
414  c$$$         cog2=cog2+1.           !temp  c$$$         cog2=cog2+1.           !temp
415  c$$$      endif  c$$$      endif
416    
417        if(DEBUG)print*,'ETA2  (ic ',ic,' ang',angle,')'        if(DEBUG.EQ.1)print*,'ETA2  (ic ',ic,' ang',angle,')'
418       $     ,cog2-iadd,' -->',pfaeta2       $     ,cog2-iadd,' -->',pfaeta2
419    
420    
# Line 456  c         print*,'~~~~~~~~~~~~ ',iang,an Line 456  c         print*,'~~~~~~~~~~~~ ',iang,an
456              goto 98              goto 98
457           endif           endif
458        enddo        enddo
459        if(DEBUG)        if(DEBUG.EQ.1)
460       $     print*,'pfaeta3 *** warning *** angle out of range: ',angle       $     print*,'pfaeta3 *** warning *** angle out of range: ',angle
461        if(angle.lt.angL(1))iang=1        if(angle.lt.angL(1))iang=1
462        if(angle.gt.angR(nangbin))iang=nangbin        if(angle.gt.angR(nangbin))iang=nangbin
# Line 531  c$$$         pfaeta2=pfaeta2+1.   !temp Line 531  c$$$         pfaeta2=pfaeta2+1.   !temp
531  c$$$         cog2=cog2+1.           !temp  c$$$         cog2=cog2+1.           !temp
532  c$$$      endif  c$$$      endif
533    
534        if(DEBUG)print*,'ETA3  (ic ',ic,' ang',angle,')'        if(DEBUG.EQ.1)print*,'ETA3  (ic ',ic,' ang',angle,')'
535       $     ,cog3-iadd,' -->',pfaeta3       $     ,cog3-iadd,' -->',pfaeta3
536    
537   100  return   100  return
# Line 572  c         print*,'~~~~~~~~~~~~ ',iang,an Line 572  c         print*,'~~~~~~~~~~~~ ',iang,an
572              goto 98              goto 98
573           endif           endif
574        enddo        enddo
575        if(DEBUG)        if(DEBUG.EQ.1)
576       $     print*,'pfaeta4 *** warning *** angle out of range: ',angle       $     print*,'pfaeta4 *** warning *** angle out of range: ',angle
577        if(angle.lt.angL(1))iang=1        if(angle.lt.angL(1))iang=1
578        if(angle.gt.angR(nangbin))iang=nangbin        if(angle.gt.angR(nangbin))iang=nangbin
# Line 647  c$$$         pfaeta2=pfaeta2+1.   !temp Line 647  c$$$         pfaeta2=pfaeta2+1.   !temp
647  c$$$         cog2=cog2+1.           !temp  c$$$         cog2=cog2+1.           !temp
648  c$$$      endif  c$$$      endif
649    
650        if(DEBUG)print*,'ETA4  (ic ',ic,' ang',angle,')'        if(DEBUG.EQ.1)print*,'ETA4  (ic ',ic,' ang',angle,')'
651       $     ,cog4-iadd,' -->',pfaeta4       $     ,cog4-iadd,' -->',pfaeta4
652    
653   100  return   100  return
# Line 1775  c         if(BAD(VIEW(ic),nvk(MAXS(ic)), Line 1775  c         if(BAD(VIEW(ic),nvk(MAXS(ic)),
1775              goto 98              goto 98
1776           endif           endif
1777        enddo        enddo
1778        if(DEBUG)        if(DEBUG.eq.1)
1779       $     print*,'pfacorr *** warning *** angle out of range: ',angle       $     print*,'pfacorr *** warning *** angle out of range: ',angle
1780        if(angle.lt.angL(1))iang=1        if(angle.lt.angL(1))iang=1
1781        if(angle.gt.angR(nangbin))iang=nangbin        if(angle.gt.angR(nangbin))iang=nangbin
# Line 1783  c         if(BAD(VIEW(ic),nvk(MAXS(ic)), Line 1783  c         if(BAD(VIEW(ic),nvk(MAXS(ic)),
1783    
1784        pfacorr = fcorr(iview,lad,iang)        pfacorr = fcorr(iview,lad,iang)
1785    
1786        if(DEBUG)print*,'CORR  (ic ',ic,' ang',angle,') -->',pfacorr        if(DEBUG.eq.1)print*,'CORR  (ic ',ic,' ang',angle,') -->',pfacorr
1787    
1788    
1789   100  return   100  return

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.23