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

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

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

revision 1.20 by pam-fi, Fri Apr 27 10:39:58 2007 UTC revision 1.22 by pam-fi, Wed May 9 07:50:58 2007 UTC
# Line 331  c$$$         enddo Line 331  c$$$         enddo
331              iimage=0              iimage=0
332           endif           endif
333           if(icand.eq.0)then           if(icand.eq.0)then
334              print*,'HAI FATTO UN CASINO!!!!!! icand = ',icand              if(VERBOSE)then
335       $           ,ibest,iimage                 print*,'HAI FATTO UN CASINO!!!!!! icand = ',icand
336         $              ,ibest,iimage
337                endif
338              return              return
339           endif           endif
340    
# Line 607  c      print*,'## xyz_PAM: ',icx,icy,sen Line 609  c      print*,'## xyz_PAM: ',icx,icy,sen
609  *        --------------------------  *        --------------------------
610           angtemp  = ax           angtemp  = ax
611           bfytemp  = bfy           bfytemp  = bfy
612           if(nplx.eq.6) angtemp = -1. * ax  *        /////////////////////////////////
613           if(nplx.eq.6) bfytemp = -1. * bfy  *        AAAAHHHHHHHH!!!!!!!!!!!!!!!!!!!!!
614    *        *grvzkkjsdgjhhhgngbn###>:(
615    *        /////////////////////////////////
616    c         if(nplx.eq.6) angtemp = -1. * ax
617    c         if(nplx.eq.6) bfytemp = -1. * bfy
618             if(viewx.eq.12) angtemp = -1. * ax
619             if(viewx.eq.12) bfytemp = -1. * bfy
620           tgtemp   = tan(angtemp*acos(-1.)/180.) + pmuH_h*bfytemp*0.00001           tgtemp   = tan(angtemp*acos(-1.)/180.) + pmuH_h*bfytemp*0.00001
621           angx     = 180.*atan(tgtemp)/acos(-1.)           angx     = 180.*atan(tgtemp)/acos(-1.)
622           stripx   = stripx - 0.5*pmuH_h*bfytemp*0.00001*SiDimZ/pitchX           stripx   = stripx - 0.5*pmuH_h*bfytemp*0.00001*SiDimZ/pitchX
623  c$$$         print*,nplx,ax,bfy/10.  c$$$         print*,nplx,ax,bfy/10.
624  c$$$         print*,angx,0.5*pmuH_h*bfytemp*0.00001*SiDimZ/pitchX  c$$$         print*,angx,0.5*pmuH_h*bfytemp*0.00001*SiDimZ/pitchX
625  c$$$         print*,'========================'  c$$$         print*,'========================'
626    c$$$         if(bfy.ne.0.)print*,viewx,'-x- '
627    c$$$     $        ,bfy,-1*0.5*pmuH_h*bfytemp*0.00001*SiDimZ
628  *        --------------------------  *        --------------------------
629    
630  c$$$         print*,'--- x-cl ---'  c$$$         print*,'--- x-cl ---'
# Line 690  c$$$         print*,fbad_cog(4,icx) Line 700  c$$$         print*,fbad_cog(4,icx)
700              resxPAM = resxPAM*fbad_cog(0,icx)              resxPAM = resxPAM*fbad_cog(0,icx)
701    
702           else           else
703              print*,'*** Non valid p.f.a. (x) --> ',PFAx              if(DEBUG) print*,'*** Non valid p.f.a. (x) --> ',PFAx
704           endif           endif
705    
706    
# Line 720  c$$$            print*,icx,' *** ',resxP Line 730  c$$$            print*,icx,' *** ',resxP
730           stripy = float(MAXS(icy))           stripy = float(MAXS(icy))
731    
732           if(icx.ne.0.and.(nply.ne.nplx.or.nldy.ne.nldx))then           if(icx.ne.0.and.(nply.ne.nplx.or.nldy.ne.nldx))then
733              print*,'xyz_PAM   ***ERROR*** invalid cluster couple!!! '              if(DEBUG) then
734       $           ,icx,icy                 print*,'xyz_PAM   ***ERROR*** invalid cluster couple!!! '
735         $              ,icx,icy
736                endif
737              goto 100              goto 100
738           endif           endif
739  *        --------------------------  *        --------------------------
# Line 730  c$$$            print*,icx,' *** ',resxP Line 742  c$$$            print*,icx,' *** ',resxP
742           tgtemp = tan(ay*acos(-1.)/180.)+pmuH_e*bfx*0.00001                   tgtemp = tan(ay*acos(-1.)/180.)+pmuH_e*bfx*0.00001        
743           angy    = 180.*atan(tgtemp)/acos(-1.)           angy    = 180.*atan(tgtemp)/acos(-1.)
744           stripy = stripy + 0.5*pmuH_e*bfx*0.00001*SiDimZ/pitchY           stripy = stripy + 0.5*pmuH_e*bfx*0.00001*SiDimZ/pitchY
745    c$$$         if(bfx.ne.0.)print*,viewy,'-y- '
746    c$$$     $        ,bfx,0.5*pmuH_e*bfx*0.00001*SiDimZ
747  *        --------------------------  *        --------------------------
748                    
749  c$$$         print*,'--- y-cl ---'  c$$$         print*,'--- y-cl ---'
# Line 802  c$$$         print*,fbad_cog(4,icy) Line 816  c$$$         print*,fbad_cog(4,icy)
816              resyPAM = resyPAM*fbad_cog(0,icy)              resyPAM = resyPAM*fbad_cog(0,icy)
817    
818           else           else
819              print*,'*** Non valid p.f.a. (x) --> ',PFAx              if(DEBUG) print*,'*** Non valid p.f.a. (x) --> ',PFAx
820           endif           endif
821    
822    
# Line 832  c     (xi,yi,zi) = mechanical coordinate Line 846  c     (xi,yi,zi) = mechanical coordinate
846  c------------------------------------------------------------------------  c------------------------------------------------------------------------
847           if(((mod(int(stripx+0.5)-1,1024)+1).le.3)           if(((mod(int(stripx+0.5)-1,1024)+1).le.3)
848       $        .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips...       $        .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips...
849              print*,'xyz_PAM (couple):',              if(DEBUG) then
850       $          ' WARNING: false X strip: strip ',stripx                 print*,'xyz_PAM (couple):',
851         $              ' WARNING: false X strip: strip ',stripx
852                endif
853           endif           endif
854           xi = acoordsi(stripx,viewx)           xi = acoordsi(stripx,viewx)
855           yi = acoordsi(stripy,viewy)           yi = acoordsi(stripy,viewy)
# Line 925  c            print*,'X-singlet ',icx,npl Line 941  c            print*,'X-singlet ',icx,npl
941  c            if((stripx.le.3).or.(stripx.ge.1022)) then !X has 1018 strips...  c            if((stripx.le.3).or.(stripx.ge.1022)) then !X has 1018 strips...
942              if(((mod(int(stripx+0.5)-1,1024)+1).le.3)              if(((mod(int(stripx+0.5)-1,1024)+1).le.3)
943       $           .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips...       $           .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips...
944                 print*,'xyz_PAM (X-singlet):',                 if(DEBUG) then
945       $             ' WARNING: false X strip: strip ',stripx                    print*,'xyz_PAM (X-singlet):',
946         $                 ' WARNING: false X strip: strip ',stripx
947                   endif
948              endif              endif
949              xi   = acoordsi(stripx,viewx)              xi   = acoordsi(stripx,viewx)
950    
# Line 948  c            print*,'X-cl ',icx,stripx,' Line 966  c            print*,'X-cl ',icx,stripx,'
966  c            print*,yi_A,' <--> ',yi_B  c            print*,yi_A,' <--> ',yi_B
967    
968           else           else
969                if(DEBUG) then
970              print *,'routine xyz_PAM ---> not properly used !!!'                 print *,'routine xyz_PAM ---> not properly used !!!'
971              print *,'icx = ',icx                 print *,'icx = ',icx
972              print *,'icy = ',icy                 print *,'icy = ',icy
973                endif
974              goto 100              goto 100
975                            
976           endif           endif
# Line 1016  c--------------------------------------- Line 1035  c---------------------------------------
1035  c         print*,'A-(',xPAM_A,yPAM_A,') B-(',xPAM_B,yPAM_B,')'  c         print*,'A-(',xPAM_A,yPAM_A,') B-(',xPAM_B,yPAM_B,')'
1036    
1037        else        else
1038                       if(DEBUG) then
1039           print *,'routine xyz_PAM ---> not properly used !!!'              print *,'routine xyz_PAM ---> not properly used !!!'
1040           print *,'icx = ',icx              print *,'icx = ',icx
1041           print *,'icy = ',icy              print *,'icy = ',icy
1042                         endif
1043        endif        endif
1044                    
1045    
# Line 1146  c$$$         print*,' resolution ',resxP Line 1165  c$$$         print*,' resolution ',resxP
1165                    
1166        else        else
1167                    
1168           print*  c         print*
1169       $        ,' function distance_to ---> wrong usage!!!'  c     $        ,' function distance_to ---> wrong usage!!!'
1170           print*,' xPAM,yPAM,zPAM ',xPAM,yPAM,zPAM  c         print*,' xPAM,yPAM,zPAM ',xPAM,yPAM,zPAM
1171           print*,' xPAM_A,yPAM_A,zPAM_A,xPAM_b,yPAM_b,zPAM_b '  c         print*,' xPAM_A,yPAM_A,zPAM_A,xPAM_b,yPAM_b,zPAM_b '
1172       $        ,xPAM_A,yPAM_A,zPAM_A,xPAM_b,yPAM_b,zPAM_b  c     $        ,xPAM_A,yPAM_A,zPAM_A,xPAM_b,yPAM_b,zPAM_b
1173        endif          endif  
1174    
1175        distance_to = sngl(distance)        distance_to = sngl(distance)
# Line 1218  c--------------------------------------- Line 1237  c---------------------------------------
1237                 if(((mod(int(stripx+0.5)-1,1024)+1).le.3)                 if(((mod(int(stripx+0.5)-1,1024)+1).le.3)
1238       $              .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips...       $              .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips...
1239  c     if((stripx.le.3).or.(stripx.ge.1022)) then !X has 1018 strips...  c     if((stripx.le.3).or.(stripx.ge.1022)) then !X has 1018 strips...
1240                    print*,'whichsensor: ',  c                  print*,'whichsensor: ',
1241       $                ' WARNING: false X strip: strip ',stripx  c     $                ' WARNING: false X strip: strip ',stripx
1242                 endif                 endif
1243                 xi = acoordsi(stripx,viewx)                 xi = acoordsi(stripx,viewx)
1244                 yi = acoordsi(stripy,viewy)                 yi = acoordsi(stripy,viewy)
# Line 1374  c      include 'common_analysis.f' Line 1393  c      include 'common_analysis.f'
1393        is_cp=0        is_cp=0
1394        if(id.lt.0)is_cp=1        if(id.lt.0)is_cp=1
1395        if(id.gt.0)is_cp=2        if(id.gt.0)is_cp=2
1396        if(id.eq.0)print*,'IS_CP ===> wrong couple id !!!'  c      if(id.eq.0)print*,'IS_CP ===> wrong couple id !!!'
1397    
1398        return        return
1399        end        end

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.23