--- DarthVader/ToFLevel2/src/tofl2com.for 2008/11/27 13:47:54 1.9 +++ DarthVader/ToFLevel2/src/tofl2com.for 2010/02/17 11:50:53 1.14 @@ -31,6 +31,8 @@ C mar-08 WM: Bug found in dEdx if check_charge>1 C oct-08 WM: Calculation of zenith angle debugged, sometimes strange values C were possible +C nov-09 WM: the dEdx part ("adctof_c") moved to the new dEdx routine from Napoli +C feb-10 WM: k1 values now for Z=1, Z=2, Z>2, k2 values are fix C****************************************************************************** INTEGER FUNCTION TOFL2COM() @@ -52,6 +54,7 @@ REAL dx,dy,dr,ds REAL yhelp,yhelp1,yhelp2,xhelp,xhelp1,xhelp2 REAL c1,c2 + REAL dist C REAL sw,sxw,w_i C INTEGER icount @@ -104,10 +107,13 @@ REAL theta13 -C-- DATA ZTOF/53.74,53.04,23.94,23.44,-23.49,-24.34/ !Sergio 9.05.2006 + + DOUBLE PRECISION ZTOF(6) + DATA ZTOF/53.74,53.04,23.94,23.44,-23.49,-24.34/ !Sergio 9.05.2006 + REAL tofarm12 PARAMETER (tofarm12 = 29.70) ! from 53.39 to 23.69 - REAL tofarm23 + REAL tofarm23 PARAMETER (tofarm23 = 47.61) ! from 23.69 to -23.92 REAL tofarm13 PARAMETER (tofarm13 = 77.31) ! from 53.39 to -23.92 @@ -120,7 +126,6 @@ REAL atten,pc_adc,check_charge,newbeta INTEGER IZ - REAL k1corrA1,k1corrB1,k1corrC1 INTEGER ifst @@ -156,12 +161,6 @@ itdc = 1 iadc = 2 -C--- These are the corrections to the k1-value for Z>2 particles - k1corrA1 = 0. - k1corrB1 = -5.0 - k1corrC1= 8.0 - - ENDIF C--------------------------------------------------------------------- @@ -636,21 +635,6 @@ C---------------------------------------------------------------------- C--------------------- zenith angle theta --------------------------- C---------------------------------------------------------------------- -C----------------------------- old ---------------------------------- -c dx=0. -c dy=0. -c dr=0. -c theta13 = 0. -c -c IF ((tof12_i.GT.none_find).AND.(tof32_i.GT.none_find)) -c & dx = xtofpos(1) - xtofpos(3) -c IF ((tof11_i.GT.none_find).AND.(tof31_i.GT.none_find)) -c & dy = ytofpos(1) - ytofpos(3) -c dr = sqrt(dx*dx+dy*dy) -c theta13 = atan(dr/tofarm13) -c -c -C----------------------------- new ------------------------------ xhelp1=0. if (tof11_i.GT.none_find) xhelp1=tof11_x(tof11_i) @@ -690,7 +674,7 @@ C---------------------------------------------------------------------- iz = int(check_charge(theta13,hitvec)) -c write(*,*) 'charge in tofl2com',iz +C write(*,*) 'charge in tofl2com',iz C-------------------------------------------------------------------- C---- if TDCleft.and.TDCright and NO ADC insert artificial ADC @@ -958,7 +942,7 @@ tdc_c(ch32b(i),hb32b(i))=tof32(right,i,itdc) ENDIF ENDDO - + C--------------------------------------------------------------- C--- calculate track position in paddle using timing difference @@ -1070,173 +1054,10 @@ C------------------------------------------------------------------ -C---------------------------------------------------------------------- -C------------------angle and ADC(x) correction -C---------------------------------------------------------------------- -C-----------------------------S1 -------------------------------- -c middle y (or x) position of the upper and middle ToF-Paddle -c DATA tof11_x/ -17.85,-12.75,-7.65,-2.55,2.55,7.65,12.75,17.85/ -c DATA tof12_y/ -13.75,-8.25,-2.75,2.75,8.25,13.75/ -c DATA tof21_y/ 3.75,-3.75/ ! paddles in different order -c DATA tof22_x/ -4.5,4.5/ -c DATA tof31_x/ -6.0,0.,6.0/ -c DATA tof32_y/ -5.0,0.0,5.0/ - - yhelp=0. -c yhelp=100. - if (tof12_i.GT.none_find) yhelp=tof12_y(tof12_i) - if (ytofpos(1).lt.100) yhelp=ytofpos(1) - - IF (tof11_i.GT.none_find.AND.abs(yhelp).lt.100) THEN - - i = tof11_i - if (tof11(left,i,iadc).lt.3786) then -c if (adc(ch11a(i),hb11a(i)).lt.4095) then - tof11(left,i,iadc) = tof11(left,i,iadc)*cos(theta13) - xkorr = atten(left,11,i,yhelp) - xkorr=xkorr/hepratio - adctof_c(ch11a(i),hb11a(i))=tof11(left,i,iadc)/xkorr - endif - - if (tof11(right,i,iadc).lt.3786) then -c if (adc(ch11b(i),hb11b(i)).lt.4095) then - tof11(right,i,iadc) = tof11(right,i,iadc)*cos(theta13) - xkorr = atten(right,11,i,yhelp) - xkorr=xkorr/hepratio - adctof_c(ch11b(i),hb11b(i))=tof11(right,i,iadc)/xkorr - endif - ENDIF - - xhelp=0. -c xhelp=100. - if (tof11_i.GT.none_find) xhelp=tof11_x(tof11_i) - if (xtofpos(1).lt.100) xhelp=xtofpos(1) - - IF (tof12_i.GT.none_find.AND.abs(xhelp).lt.100) THEN - - i = tof12_i - if (tof12(left,i,iadc).lt.3786) then -c if (adc(ch12a(i),hb12a(i)).lt.4095) then - tof12(left,i,iadc) = tof12(left,i,iadc)*cos(theta13) - xkorr = atten(left,12,i,xhelp) - xkorr=xkorr/hepratio - adctof_c(ch12a(i),hb12a(i))=tof12(left,i,iadc)/xkorr - endif - - if (tof12(right,i,iadc).lt.3786) then -c if (adc(ch12b(i),hb12b(i)).lt.4095) then - tof12(right,i,iadc) = tof12(right,i,iadc)*cos(theta13) - xkorr = atten(right,12,i,xhelp) - xkorr=xkorr/hepratio - adctof_c(ch12b(i),hb12b(i))=tof12(right,i,iadc)/xkorr - endif - ENDIF - -C-----------------------------S2 -------------------------------- - - xhelp=0. -c xhelp=100. - if (tof22_i.GT.none_find) xhelp=tof22_x(tof22_i) - if (xtofpos(2).lt.100) xhelp=xtofpos(2) - - IF (tof21_i.GT.none_find.AND.abs(xhelp).lt.100) THEN - - i = tof21_i - if (tof21(left,i,iadc).lt.3786) then -c if (adc(ch21a(i),hb21a(i)).lt.4095) then - tof21(left,i,iadc) = tof21(left,i,iadc)*cos(theta13) - xkorr = atten(left,21,i,xhelp) - xkorr=xkorr/hepratio - adctof_c(ch21a(i),hb21a(i))=tof21(left,i,iadc)/xkorr - endif - - if (tof21(right,i,iadc).lt.3786) then -c if (adc(ch21b(i),hb21b(i)).lt.4095) then - tof21(right,i,iadc) = tof21(right,i,iadc)*cos(theta13) - xkorr=adcx21(right,i,1)*exp(xhelp/adcx21(right,i,2)) - xkorr = atten(right,21,i,xhelp) - xkorr=xkorr/hepratio - adctof_c(ch21b(i),hb21b(i))=tof21(right,i,iadc)/xkorr - endif - ENDIF - - - yhelp=0. -c yhelp=100. - if (tof21_i.GT.none_find) yhelp=tof21_y(tof21_i) - if (ytofpos(2).lt.100) yhelp=ytofpos(2) - - IF (tof22_i.GT.none_find.AND.abs(yhelp).lt.100) THEN - - i = tof22_i - if (tof22(left,i,iadc).lt.3786) then -c if (adc(ch22a(i),hb22a(i)).lt.4095) then - tof22(left,i,iadc) = tof22(left,i,iadc)*cos(theta13) - xkorr = atten(left,22,i,yhelp) - xkorr=xkorr/hepratio - adctof_c(ch22a(i),hb22a(i))=tof22(left,i,iadc)/xkorr - endif - - if (tof22(right,i,iadc).lt.3786) then -c if (adc(ch22b(i),hb22b(i)).lt.4095) then - tof22(right,i,iadc) = tof22(right,i,iadc)*cos(theta13) - xkorr = atten(right,22,i,yhelp) - xkorr=xkorr/hepratio - adctof_c(ch22b(i),hb22b(i))=tof22(right,i,iadc)/xkorr - endif - ENDIF - -C-----------------------------S3 -------------------------------- - - yhelp=0. -c yhelp=100. - if (tof32_i.GT.none_find) yhelp=tof32_y(tof32_i) - if (ytofpos(3).lt.100) yhelp=ytofpos(3) - - IF (tof31_i.GT.none_find.AND.abs(yhelp).lt.100) THEN - - i = tof31_i - if (tof31(left,i,iadc).lt.3786) then -c if (adc(ch31a(i),hb31a(i)).lt.4095) then - tof31(left,i,iadc) = tof31(left,i,iadc)*cos(theta13) - xkorr = atten(left,31,i,yhelp) - xkorr=xkorr/hepratio - adctof_c(ch31a(i),hb31a(i))=tof31(left,i,iadc)/xkorr - endif - - if (tof31(right,i,iadc).lt.3786) then -c if (adc(ch31b(i),hb31b(i)).lt.4095) then - tof31(right,i,iadc) = tof31(right,i,iadc)*cos(theta13) - xkorr = atten(right,31,i,yhelp) - xkorr=xkorr/hepratio - adctof_c(ch31b(i),hb31b(i))=tof31(right,i,iadc)/xkorr - endif - ENDIF - - xhelp=0. -c xhelp=100. - if (tof31_i.GT.none_find) xhelp=tof31_x(tof31_i) - if (xtofpos(3).lt.100) xhelp=xtofpos(3) - - IF (tof32_i.GT.none_find.AND.abs(xhelp).lt.100) THEN - - i = tof32_i - if (tof32(left,i,iadc).lt.3786) then -c if (adc(ch32a(i),hb32a(i)).lt.4095) then - tof32(left,i,iadc) = tof32(left,i,iadc)*cos(theta13) - xkorr = atten(left,32,i,xhelp) - xkorr=xkorr/hepratio - adctof_c(ch32a(i),hb32a(i))=tof32(left,i,iadc)/xkorr - endif - - if (tof32(right,i,iadc).lt.3786) then -c if (adc(ch32b(i),hb32b(i)).lt.4095) then - tof32(right,i,iadc) = tof32(right,i,iadc)*cos(theta13) - xkorr = atten(right,32,i,xhelp) - xkorr=xkorr/hepratio - adctof_c(ch32b(i),hb32b(i))=tof32(right,i,iadc)/xkorr - endif - ENDIF +C------------------------------------------------------------------ +C-------angle and ADC(x) correction: moved to new dEdx routine +C------------------------------------------------------------------ +C------------------------------------------------------------------ C-------------------------------------------------------------------- C----------------------calculate Beta ------------------------------ @@ -1251,15 +1072,18 @@ C S11 - S31 + dist = ZTOF(1) - ZTOF(5) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + IF ((tof11_i.GT.none_find).AND.(tof31_i.GT.none_find).AND. & (ytofpos(1).NE.101.).AND.(ytofpos(3).NE.101.)) THEN xhelp1 = tof11(1,tof11_i,itdc)+tof11(2,tof11_i,itdc) xhelp2 = tof31(1,tof31_i,itdc)+tof31(2,tof31_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof11_i-1)*3+tof31_i - c1 = k_S11S31(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrA1 - c2 = k_S11S31(2,ihelp) + if (iz.le.1) c1 = k_S11S31(1,ihelp) + if (iz.eq.2) c1 = k_S11S31(2,ihelp) + if (iz.gt.2) c1 = k_S11S31(3,ihelp) betatof_a(1) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S11 - S31 @@ -1280,15 +1104,18 @@ C S11 - S32 + dist = ZTOF(1) - ZTOF(6) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + IF ((tof11_i.GT.none_find).AND.(tof32_i.GT.none_find).AND. & (ytofpos(1).NE.101.).AND.(xtofpos(3).NE.101.)) THEN xhelp1 = tof11(1,tof11_i,itdc)+tof11(2,tof11_i,itdc) xhelp2 = tof32(1,tof32_i,itdc)+tof32(2,tof32_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof11_i-1)*3+tof32_i - c1 = k_S11S32(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrA1 - c2 = k_S11S32(2,ihelp) + if (iz.le.1) c1 = k_S11S32(1,ihelp) + if (iz.eq.2) c1 = k_S11S32(2,ihelp) + if (iz.gt.2) c1 = k_S11S32(3,ihelp) betatof_a(2) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S11 - S32 @@ -1309,15 +1136,18 @@ C S12 - S31 + dist = ZTOF(2) - ZTOF(5) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + IF ((tof12_i.GT.none_find).AND.(tof31_i.GT.none_find).AND. & (xtofpos(1).NE.101.).AND.(ytofpos(3).NE.101.)) THEN xhelp1 = tof12(1,tof12_i,itdc)+tof12(2,tof12_i,itdc) xhelp2 = tof31(1,tof31_i,itdc)+tof31(2,tof31_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof12_i-1)*3+tof31_i - c1 = k_S12S31(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrA1 - c2 = k_S12S31(2,ihelp) + if (iz.le.1) c1 = k_S12S31(1,ihelp) + if (iz.eq.2) c1 = k_S12S31(2,ihelp) + if (iz.gt.2) c1 = k_S12S31(3,ihelp) betatof_a(3) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S12 - S31 @@ -1338,15 +1168,18 @@ C S12 - S32 + dist = ZTOF(2) - ZTOF(6) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + IF ((tof12_i.GT.none_find).AND.(tof32_i.GT.none_find).AND. & (xtofpos(1).NE.101.).AND.(xtofpos(3).NE.101.)) THEN xhelp1 = tof12(1,tof12_i,itdc)+tof12(2,tof12_i,itdc) xhelp2 = tof32(1,tof32_i,itdc)+tof32(2,tof32_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof12_i-1)*3+tof32_i - c1 = k_S12S32(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrA1 - c2 = k_S12S32(2,ihelp) + if (iz.le.1) c1 = k_S12S32(1,ihelp) + if (iz.eq.2) c1 = k_S12S32(2,ihelp) + if (iz.gt.2) c1 = k_S12S32(3,ihelp) betatof_a(4) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S12 - S32 @@ -1367,15 +1200,18 @@ C S21 - S31 + dist = ZTOF(3) - ZTOF(5) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + IF ((tof21_i.GT.none_find).AND.(tof31_i.GT.none_find).AND. & (xtofpos(2).NE.101.).AND.(ytofpos(3).NE.101.)) THEN xhelp1 = tof21(1,tof21_i,itdc)+tof21(2,tof21_i,itdc) xhelp2 = tof31(1,tof31_i,itdc)+tof31(2,tof31_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof21_i-1)*3+tof31_i - c1 = k_S21S31(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrB1 - c2 = k_S21S31(2,ihelp) + if (iz.le.1) c1 = k_S21S31(1,ihelp) + if (iz.eq.2) c1 = k_S21S31(2,ihelp) + if (iz.gt.2) c1 = k_S21S31(3,ihelp) betatof_a(5) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S21 - S31 @@ -1396,15 +1232,19 @@ C S21 - S32 + dist = ZTOF(3) - ZTOF(6) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + + IF ((tof21_i.GT.none_find).AND.(tof32_i.GT.none_find).AND. & (xtofpos(2).NE.101.).AND.(xtofpos(3).NE.101.)) THEN xhelp1 = tof21(1,tof21_i,itdc)+tof21(2,tof21_i,itdc) xhelp2 = tof32(1,tof32_i,itdc)+tof32(2,tof32_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof21_i-1)*3+tof32_i - c1 = k_S21S32(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrB1 - c2 = k_S21S32(2,ihelp) + if (iz.le.1) c1 = k_S21S32(1,ihelp) + if (iz.eq.2) c1 = k_S21S32(2,ihelp) + if (iz.gt.2) c1 = k_S21S32(3,ihelp) betatof_a(6) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S21 - S32 @@ -1425,15 +1265,18 @@ C S22 - S31 + dist = ZTOF(4) - ZTOF(5) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + IF ((tof22_i.GT.none_find).AND.(tof31_i.GT.none_find).AND. & (ytofpos(2).NE.101.).AND.(ytofpos(3).NE.101.)) THEN xhelp1 = tof22(1,tof22_i,itdc)+tof22(2,tof22_i,itdc) xhelp2 = tof31(1,tof31_i,itdc)+tof31(2,tof31_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof22_i-1)*3+tof31_i - c1 = k_S22S31(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrB1 - c2 = k_S22S31(2,ihelp) + if (iz.le.1) c1 = k_S22S31(1,ihelp) + if (iz.eq.2) c1 = k_S22S31(2,ihelp) + if (iz.gt.2) c1 = k_S22S31(3,ihelp) betatof_a(7) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S22 - S31 @@ -1454,15 +1297,18 @@ C S22 - S32 + dist = ZTOF(4) - ZTOF(6) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + IF ((tof22_i.GT.none_find).AND.(tof32_i.GT.none_find).AND. & (ytofpos(2).NE.101.).AND.(xtofpos(3).NE.101.)) THEN xhelp1 = tof22(1,tof22_i,itdc)+tof22(2,tof22_i,itdc) xhelp2 = tof32(1,tof32_i,itdc)+tof32(2,tof32_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof22_i-1)*3+tof32_i - c1 = k_S22S32(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrB1 - c2 = k_S22S32(2,ihelp) + if (iz.le.1) c1 = k_S22S32(1,ihelp) + if (iz.eq.2) c1 = k_S22S32(2,ihelp) + if (iz.gt.2) c1 = k_S22S32(3,ihelp) betatof_a(8) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S22 - S32 @@ -1483,15 +1329,18 @@ C S11 - S21 + dist = ZTOF(1) - ZTOF(3) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + IF ((tof11_i.GT.none_find).AND.(tof21_i.GT.none_find).AND. & (ytofpos(1).NE.101.).AND.(xtofpos(2).NE.101.)) THEN xhelp1 = tof11(1,tof11_i,itdc)+tof11(2,tof11_i,itdc) xhelp2 = tof21(1,tof21_i,itdc)+tof21(2,tof21_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof11_i-1)*2+tof21_i - c1 = k_S11S21(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrC1 - c2 = k_S11S21(2,ihelp) + if (iz.le.1) c1 = k_S11S21(1,ihelp) + if (iz.eq.2) c1 = k_S11S21(2,ihelp) + if (iz.gt.2) c1 = k_S11S21(3,ihelp) betatof_a(9) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S11 - S21 @@ -1512,15 +1361,18 @@ C S11 - S22 + dist = ZTOF(1) - ZTOF(4) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + IF ((tof11_i.GT.none_find).AND.(tof22_i.GT.none_find).AND. & (ytofpos(1).NE.101.).AND.(ytofpos(2).NE.101.)) THEN xhelp1 = tof11(1,tof11_i,itdc)+tof11(2,tof11_i,itdc) xhelp2 = tof22(1,tof22_i,itdc)+tof22(2,tof22_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof11_i-1)*2+tof22_i - c1 = k_S11S22(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrC1 - c2 = k_S11S22(2,ihelp) + if (iz.le.1) c1 = k_S11S22(1,ihelp) + if (iz.eq.2) c1 = k_S11S22(2,ihelp) + if (iz.gt.2) c1 = k_S11S22(3,ihelp) betatof_a(10) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S11 - S22 @@ -1541,15 +1393,18 @@ C S12 - S21 + dist = ZTOF(2) - ZTOF(3) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + IF ((tof12_i.GT.none_find).AND.(tof21_i.GT.none_find).AND. & (xtofpos(1).NE.101.).AND.(xtofpos(2).NE.101.)) THEN xhelp1 = tof12(1,tof12_i,itdc)+tof12(2,tof12_i,itdc) xhelp2 = tof21(1,tof21_i,itdc)+tof21(2,tof21_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof12_i-1)*2+tof21_i - c1 = k_S12S21(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrC1 - c2 = k_S12S21(2,ihelp) + if (iz.le.1) c1 = k_S12S21(1,ihelp) + if (iz.eq.2) c1 = k_S12S21(2,ihelp) + if (iz.gt.2) c1 = k_S12S21(3,ihelp) betatof_a(11) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S12 - S21 @@ -1570,15 +1425,18 @@ C S12 - S22 + dist = ZTOF(2) - ZTOF(4) + c2 = (2.*0.01*dist)/(3.E08*50.E-12 ) + IF ((tof12_i.GT.none_find).AND.(tof22_i.GT.none_find).AND. & (xtofpos(1).NE.101.).AND.(ytofpos(2).NE.101.)) THEN xhelp1 = tof12(1,tof12_i,itdc)+tof12(2,tof12_i,itdc) xhelp2 = tof22(1,tof22_i,itdc)+tof22(2,tof22_i,itdc) ds = xhelp1-xhelp2 ihelp=(tof12_i-1)*2+tof22_i - c1 = k_S12S22(1,ihelp) - if (iz.gt.2) c1 = c1 + k1corrC1 - c2 = k_S12S22(2,ihelp) + if (iz.le.1) c1 = k_S12S22(1,ihelp) + if (iz.eq.2) c1 = k_S12S22(2,ihelp) + if (iz.gt.2) c1 = k_S12S22(3,ihelp) betatof_a(12) = c2/(cos(theta13)*(ds-c1)) C------- ToF Mask - S12 - S22 @@ -1609,7 +1467,7 @@ C icount= icount+1 C if (i.le.4) w_i=1./(0.13**2.) C if ((i.ge.5).and.(i.le.8)) w_i=1./(0.16**2.) -C if (i.ge.9) w_i=1./(0.25**2.) ! to be checked +C if (i.ge.9) w_i=1./(0.25**2.) ! to be checked C sxw=sxw + betatof_a(i)*w_i C sw =sw + w_i C endif @@ -1639,7 +1497,8 @@ c write(*,*) xtr_tof c write(*,*) ytr_tof - 100 continue +c 100 continue + continue C RETURN @@ -1783,6 +1642,26 @@ REAL a1,a2 INTEGER jj +c get rid of warnings EMILIANO + i = 0 + slope = 0 + offset = 0 + none_find = 0 + none_ev = 0 + adc_ev = 0 + tdc_ev = 0 + iadc = 0 + itdc = 0 + right = 0 + left = 0 + tof12_y(1) = tof12_y(1) + tof11_x(1) = tof11_x(1) + tof21_y(1) = tof21_y(1) + tof22_x(1) = tof22_x(1) + tof32_y(1) = tof32_y(1) + tof31_x(1) = tof31_x(1) +c get rid of warnings + C----------------------------------------------------------- C--- get data C----------------------------------------------------------- @@ -2009,7 +1888,7 @@ if (sw.gt.0) beta_mean_tof=sxw/sw; -c write(*,*) 'beta_mean_tof ',beta_mean_tof +C write(*,*) 'beta_mean_tof ',beta_mean_tof beta_help = beta_mean_tof ! pow(beta_mean_tof,1.0) gave best results @@ -2138,7 +2017,8 @@ endif ! beta_mean_tof.eq.100. -c write(*,*) 'in function charge: ',charge +C write(*,*) 'in function charge: ',beta_mean_tof,charge + check_charge = charge @@ -2166,6 +2046,26 @@ DATA itop /1,1,2,2,3,3,4,4,1,1,2,2/ DATA ibot /5,6,5,6,5,6,5,6,3,4,3,4/ + +c get rid of warnings EMILIANO + slope = 0 + offset = 0 + none_find = 0 + none_ev = 0 + adc_ev = 0 + tdc_ev = 0 + iadc = 0 + itdc = 0 + right = 0 + left = 0 + tof12_y(1) = tof12_y(1) + tof11_x(1) = tof11_x(1) + tof21_y(1) = tof21_y(1) + tof22_x(1) = tof22_x(1) + tof32_y(1) = tof32_y(1) + tof31_x(1) = tof31_x(1) +c get rid of warnings + C==================================================================== tof11_i = hitvec(1)