/[PAMELA software]/DarthVader/ToFLevel2/src/tofl2com.for
ViewVC logotype

Diff of /DarthVader/ToFLevel2/src/tofl2com.for

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

revision 1.1 by mocchiut, Sat Jun 17 12:14:56 2006 UTC revision 1.2 by mocchiut, Thu Jul 6 09:03:28 2006 UTC
# Line 92  C     Line 92  C    
92        enddo        enddo
93    
94    
95          do i=1,12
96             do j=1,4
97                tofmask(j,i) = 0
98             enddo
99          enddo
100    
101    
102  c the calibration files are read in the main program from xxx_tofcalib.rz  c the calibration files are read in the main program from xxx_tofcalib.rz
103    
104    
# Line 760  C     S11 - S31 Line 767  C     S11 - S31
767           c1 = k_S11S31(1,ihelp)           c1 = k_S11S31(1,ihelp)
768           c2 = k_S11S31(2,ihelp)           c2 = k_S11S31(2,ihelp)
769           betatof_a(1) = c2/(cos(theta13)*(ds-c1))           betatof_a(1) = c2/(cos(theta13)*(ds-c1))
770    
771    C------- ToF Mask - S11 - S31
772    
773             tofmask(ch11a(tof11_i),hb11a(tof11_i)) =
774         $        tofmask(ch11a(tof11_i),hb11a(tof11_i)) + 1
775             tofmask(ch11b(tof11_i),hb11b(tof11_i)) =
776         $        tofmask(ch11b(tof11_i),hb11b(tof11_i)) + 1
777    
778             tofmask(ch31a(tof31_i),hb31a(tof31_i)) =
779         $        tofmask(ch31a(tof31_i),hb31a(tof31_i)) + 1
780             tofmask(ch31b(tof31_i),hb31b(tof31_i)) =
781         $        tofmask(ch31b(tof31_i),hb31b(tof31_i)) + 1
782    
783    C-------
784          
785        ENDIF        ENDIF
786                
787  C     S11 - S32  C     S11 - S32
# Line 771  C     S11 - S32 Line 793  C     S11 - S32
793           c1 = k_S11S32(1,ihelp)           c1 = k_S11S32(1,ihelp)
794           c2 = k_S11S32(2,ihelp)           c2 = k_S11S32(2,ihelp)
795           betatof_a(2) = c2/(cos(theta13)*(ds-c1))           betatof_a(2) = c2/(cos(theta13)*(ds-c1))
       ENDIF  
796    
797    C------- ToF Mask - S11 - S32
798    
799             tofmask(ch11a(tof11_i),hb11a(tof11_i)) =
800         $        tofmask(ch11a(tof11_i),hb11a(tof11_i)) + 1
801             tofmask(ch11b(tof11_i),hb11b(tof11_i)) =
802         $        tofmask(ch11b(tof11_i),hb11b(tof11_i)) + 1
803    
804             tofmask(ch32a(tof32_i),hb32a(tof32_i)) =
805         $        tofmask(ch32a(tof32_i),hb32a(tof32_i)) + 1
806             tofmask(ch32b(tof32_i),hb32b(tof32_i)) =
807         $        tofmask(ch32b(tof32_i),hb32b(tof32_i)) + 1
808    
809    C-------
810    
811          ENDIF
812          
813  C     S12 - S31  C     S12 - S31
814        IF (tof12_i.GT.none_find.AND.tof31_i.GT.none_find) THEN        IF (tof12_i.GT.none_find.AND.tof31_i.GT.none_find) THEN
815           xhelp1 = tof12(1,tof12_i,itdc)+tof12(2,tof12_i,itdc)           xhelp1 = tof12(1,tof12_i,itdc)+tof12(2,tof12_i,itdc)
# Line 782  C     S12 - S31 Line 819  C     S12 - S31
819           c1 = k_S12S31(1,ihelp)           c1 = k_S12S31(1,ihelp)
820           c2 = k_S12S31(2,ihelp)           c2 = k_S12S31(2,ihelp)
821           betatof_a(3) = c2/(cos(theta13)*(ds-c1))           betatof_a(3) = c2/(cos(theta13)*(ds-c1))
       ENDIF  
822    
823    C------- ToF Mask - S12 - S31
824    
825             tofmask(ch12a(tof12_i),hb12a(tof12_i)) =
826         $        tofmask(ch12a(tof12_i),hb12a(tof12_i)) + 1
827             tofmask(ch12b(tof12_i),hb12b(tof12_i)) =
828         $        tofmask(ch12b(tof12_i),hb12b(tof12_i)) + 1
829    
830             tofmask(ch31a(tof31_i),hb31a(tof31_i)) =
831         $        tofmask(ch31a(tof31_i),hb31a(tof31_i)) + 1
832             tofmask(ch31b(tof31_i),hb31b(tof31_i)) =
833         $        tofmask(ch31b(tof31_i),hb31b(tof31_i)) + 1
834    
835    C-------
836    
837          ENDIF
838                
839  C     S12 - S32  C     S12 - S32
840        IF (tof12_i.GT.none_find.AND.tof32_i.GT.none_find) THEN        IF (tof12_i.GT.none_find.AND.tof32_i.GT.none_find) THEN
841           xhelp1 = tof12(1,tof12_i,itdc)+tof12(2,tof12_i,itdc)           xhelp1 = tof12(1,tof12_i,itdc)+tof12(2,tof12_i,itdc)
# Line 793  C     S12 - S32 Line 845  C     S12 - S32
845           c1 = k_S12S32(1,ihelp)           c1 = k_S12S32(1,ihelp)
846           c2 = k_S12S32(2,ihelp)           c2 = k_S12S32(2,ihelp)
847           betatof_a(4) = c2/(cos(theta13)*(ds-c1))           betatof_a(4) = c2/(cos(theta13)*(ds-c1))
848    
849    C------- ToF Mask - S12 - S32
850    
851             tofmask(ch12a(tof12_i),hb12a(tof12_i)) =
852         $        tofmask(ch12a(tof12_i),hb12a(tof12_i)) + 1
853             tofmask(ch12b(tof12_i),hb12b(tof12_i)) =
854         $        tofmask(ch12b(tof12_i),hb12b(tof12_i)) + 1
855    
856             tofmask(ch32a(tof32_i),hb32a(tof32_i)) =
857         $        tofmask(ch32a(tof32_i),hb32a(tof32_i)) + 1
858             tofmask(ch32b(tof32_i),hb32b(tof32_i)) =
859         $        tofmask(ch32b(tof32_i),hb32b(tof32_i)) + 1
860    
861    C-------
862    
863        ENDIF        ENDIF
864    
865  C     S21 - S31  C     S21 - S31
# Line 804  C     S21 - S31 Line 871  C     S21 - S31
871           c1 = k_S21S31(1,ihelp)           c1 = k_S21S31(1,ihelp)
872           c2 = k_S21S31(2,ihelp)           c2 = k_S21S31(2,ihelp)
873           betatof_a(5) = c2/(cos(theta23)*(ds-c1))           betatof_a(5) = c2/(cos(theta23)*(ds-c1))
874    
875    C------- ToF Mask - S21 - S31
876    
877             tofmask(ch21a(tof21_i),hb21a(tof21_i)) =
878         $        tofmask(ch21a(tof21_i),hb21a(tof21_i)) + 1
879             tofmask(ch21b(tof21_i),hb21b(tof21_i)) =
880         $        tofmask(ch21b(tof21_i),hb21b(tof21_i)) + 1
881    
882             tofmask(ch31a(tof31_i),hb31a(tof31_i)) =
883         $        tofmask(ch31a(tof31_i),hb31a(tof31_i)) + 1
884             tofmask(ch31b(tof31_i),hb31b(tof31_i)) =
885         $        tofmask(ch31b(tof31_i),hb31b(tof31_i)) + 1
886    
887    C-------
888    
889        ENDIF        ENDIF
890    
891  C     S21 - S32  C     S21 - S32
# Line 815  C     S21 - S32 Line 897  C     S21 - S32
897           c1 = k_S21S32(1,ihelp)           c1 = k_S21S32(1,ihelp)
898           c2 = k_S21S32(2,ihelp)           c2 = k_S21S32(2,ihelp)
899           betatof_a(6) = c2/(cos(theta23)*(ds-c1))           betatof_a(6) = c2/(cos(theta23)*(ds-c1))
900                      
901    C------- ToF Mask - S21 - S32
902    
903             tofmask(ch21a(tof21_i),hb21a(tof21_i)) =
904         $        tofmask(ch21a(tof21_i),hb21a(tof21_i)) + 1
905             tofmask(ch21b(tof21_i),hb21b(tof21_i)) =
906         $        tofmask(ch21b(tof21_i),hb21b(tof21_i)) + 1
907    
908             tofmask(ch32a(tof32_i),hb32a(tof32_i)) =
909         $        tofmask(ch32a(tof32_i),hb32a(tof32_i)) + 1
910             tofmask(ch32b(tof32_i),hb32b(tof32_i)) =
911         $        tofmask(ch32b(tof32_i),hb32b(tof32_i)) + 1
912    
913    C-------
914    
915        ENDIF        ENDIF
916    
917  C     S22 - S31  C     S22 - S31
# Line 826  C     S22 - S31 Line 923  C     S22 - S31
923           c1 = k_S22S31(1,ihelp)           c1 = k_S22S31(1,ihelp)
924           c2 = k_S22S31(2,ihelp)           c2 = k_S22S31(2,ihelp)
925           betatof_a(7) = c2/(cos(theta13)*(ds-c1))           betatof_a(7) = c2/(cos(theta13)*(ds-c1))
926    
927    C------- ToF Mask - S22 - S31
928    
929             tofmask(ch22a(tof22_i),hb22a(tof22_i)) =
930         $        tofmask(ch22a(tof22_i),hb22a(tof22_i)) + 1
931             tofmask(ch22b(tof22_i),hb22b(tof22_i)) =
932         $        tofmask(ch22b(tof22_i),hb22b(tof22_i)) + 1
933    
934             tofmask(ch31a(tof31_i),hb31a(tof31_i)) =
935         $        tofmask(ch31a(tof31_i),hb31a(tof31_i)) + 1
936             tofmask(ch31b(tof31_i),hb31b(tof31_i)) =
937         $        tofmask(ch31b(tof31_i),hb31b(tof31_i)) + 1
938    
939    C-------          
940    
941        ENDIF        ENDIF
942                
943  C     S22 - S32  C     S22 - S32
# Line 837  C     S22 - S32 Line 949  C     S22 - S32
949           c1 = k_S22S32(1,ihelp)           c1 = k_S22S32(1,ihelp)
950           c2 = k_S22S32(2,ihelp)           c2 = k_S22S32(2,ihelp)
951           betatof_a(8) = c2/(cos(theta13)*(ds-c1))           betatof_a(8) = c2/(cos(theta13)*(ds-c1))
952    
953    C------- ToF Mask - S22 - S32
954    
955             tofmask(ch22a(tof22_i),hb22a(tof22_i)) =
956         $        tofmask(ch22a(tof22_i),hb22a(tof22_i)) + 1
957             tofmask(ch22b(tof22_i),hb22b(tof22_i)) =
958         $        tofmask(ch22b(tof22_i),hb22b(tof22_i)) + 1
959    
960             tofmask(ch32a(tof32_i),hb32a(tof32_i)) =
961         $        tofmask(ch32a(tof32_i),hb32a(tof32_i)) + 1
962             tofmask(ch32b(tof32_i),hb32b(tof32_i)) =
963         $        tofmask(ch32b(tof32_i),hb32b(tof32_i)) + 1
964    
965    C-------  
966    
967        ENDIF        ENDIF
968    
969  C     S11 - S21  C     S11 - S21
# Line 848  C     S11 - S21 Line 975  C     S11 - S21
975           c1 = k_S11S21(1,ihelp)           c1 = k_S11S21(1,ihelp)
976           c2 = k_S11S21(2,ihelp)           c2 = k_S11S21(2,ihelp)
977           betatof_a(9) = c2/(cos(theta13)*(ds-c1))           betatof_a(9) = c2/(cos(theta13)*(ds-c1))
978    
979    C------- ToF Mask - S11 - S21
980    
981             tofmask(ch11a(tof11_i),hb11a(tof11_i)) =
982         $        tofmask(ch11a(tof11_i),hb11a(tof11_i)) + 1
983             tofmask(ch11b(tof11_i),hb11b(tof11_i)) =
984         $        tofmask(ch11b(tof11_i),hb11b(tof11_i)) + 1
985    
986             tofmask(ch21a(tof21_i),hb21a(tof21_i)) =
987         $        tofmask(ch21a(tof21_i),hb21a(tof21_i)) + 1
988             tofmask(ch21b(tof21_i),hb21b(tof21_i)) =
989         $        tofmask(ch21b(tof21_i),hb21b(tof21_i)) + 1
990    
991    C-------  
992    
993        ENDIF        ENDIF
994                
995  C     S11 - S22  C     S11 - S22
# Line 859  C     S11 - S22 Line 1001  C     S11 - S22
1001           c1 = k_S11S22(1,ihelp)           c1 = k_S11S22(1,ihelp)
1002           c2 = k_S11S22(2,ihelp)           c2 = k_S11S22(2,ihelp)
1003           betatof_a(10) = c2/(cos(theta13)*(ds-c1))           betatof_a(10) = c2/(cos(theta13)*(ds-c1))
1004    
1005    C------- ToF Mask - S11 - S22
1006    
1007             tofmask(ch11a(tof11_i),hb11a(tof11_i)) =
1008         $        tofmask(ch11a(tof11_i),hb11a(tof11_i)) + 1
1009             tofmask(ch11b(tof11_i),hb11b(tof11_i)) =
1010         $        tofmask(ch11b(tof11_i),hb11b(tof11_i)) + 1
1011    
1012             tofmask(ch22a(tof22_i),hb22a(tof22_i)) =
1013         $        tofmask(ch22a(tof22_i),hb22a(tof22_i)) + 1
1014             tofmask(ch22b(tof22_i),hb22b(tof22_i)) =
1015         $        tofmask(ch22b(tof22_i),hb22b(tof22_i)) + 1
1016    
1017    C-------  
1018    
1019        ENDIF        ENDIF
1020    
1021  C     S12 - S21  C     S12 - S21
# Line 870  C     S12 - S21 Line 1027  C     S12 - S21
1027           c1 = k_S12S21(1,ihelp)           c1 = k_S12S21(1,ihelp)
1028           c2 = k_S12S21(2,ihelp)           c2 = k_S12S21(2,ihelp)
1029           betatof_a(11) = c2/(cos(theta13)*(ds-c1))           betatof_a(11) = c2/(cos(theta13)*(ds-c1))
1030    
1031    C------- ToF Mask - S12 - S21
1032    
1033             tofmask(ch12a(tof12_i),hb12a(tof12_i)) =
1034         $        tofmask(ch12a(tof12_i),hb12a(tof12_i)) + 1
1035             tofmask(ch12b(tof12_i),hb12b(tof12_i)) =
1036         $        tofmask(ch12b(tof12_i),hb12b(tof12_i)) + 1
1037    
1038             tofmask(ch21a(tof21_i),hb21a(tof21_i)) =
1039         $        tofmask(ch21a(tof21_i),hb21a(tof21_i)) + 1
1040             tofmask(ch21b(tof21_i),hb21b(tof21_i)) =
1041         $        tofmask(ch21b(tof21_i),hb21b(tof21_i)) + 1
1042    
1043    C-------  
1044    
1045        ENDIF        ENDIF
1046    
1047  C     S12 - S22  C     S12 - S22
# Line 881  C     S12 - S22 Line 1053  C     S12 - S22
1053           c1 = k_S12S22(1,ihelp)           c1 = k_S12S22(1,ihelp)
1054           c2 = k_S12S22(2,ihelp)           c2 = k_S12S22(2,ihelp)
1055           betatof_a(12) = c2/(cos(theta13)*(ds-c1))           betatof_a(12) = c2/(cos(theta13)*(ds-c1))
1056    
1057    C------- ToF Mask - S12 - S22
1058    
1059             tofmask(ch12a(tof12_i),hb12a(tof12_i)) =
1060         $        tofmask(ch12a(tof12_i),hb12a(tof12_i)) + 1
1061             tofmask(ch12b(tof12_i),hb12b(tof12_i)) =
1062         $        tofmask(ch12b(tof12_i),hb12b(tof12_i)) + 1
1063    
1064             tofmask(ch22a(tof22_i),hb22a(tof22_i)) =
1065         $        tofmask(ch22a(tof22_i),hb22a(tof22_i)) + 1
1066             tofmask(ch22b(tof22_i),hb22b(tof22_i)) =
1067         $        tofmask(ch22b(tof22_i),hb22b(tof22_i)) + 1
1068    
1069    C-------  
1070    
1071        ENDIF        ENDIF
1072          
1073  C-------  C---------------------------------------------------------
1074    
1075        icount=0        icount=0
1076        sw=0.        sw=0.
# Line 903  C------- Line 1090  C-------
1090                
1091        if (icount.gt.0) beta_mean=sxw/sw        if (icount.gt.0) beta_mean=sxw/sw
1092        betatof_a(13) = beta_mean        betatof_a(13) = beta_mean
 c      write(*,*) '------------- end  tofl2com ----------'  
1093    
1094   100  continue   100  continue
1095    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23