--- DarthVader/ToFLevel2/src/tofl2com.for 2007/01/22 10:45:25 1.4 +++ DarthVader/ToFLevel2/src/tofl2com.for 2007/02/07 08:17:17 1.5 @@ -12,6 +12,8 @@ * jan-07 WM: the definition for a "hit" is changed: Now we must have a * valid TDC signal on both sides * jan-07 WM: flag for PMTs #10 and #35 added, TDC=819 due to bit-shift +* jan-07 WM: bug removed: in some cases tdc_tw was calculated due to a +* leftover "xhelp" value ****************************************************************************** INTEGER FUNCTION TOFL2COM() @@ -751,6 +753,7 @@ C-------------------------------------------------------------------- DO i=1,8 + xhelp= 0. xhelp_a = tof11(left,i,iadc) xhelp_t = tof11(left,i,itdc) if(xhelp_a<4095) xhelp = tw11(left,i)/sqrt(xhelp_a) @@ -764,6 +767,7 @@ ENDDO DO i=1,6 + xhelp= 0. xhelp_a = tof12(left,i,iadc) xhelp_t = tof12(left,i,itdc) if(xhelp_a<4095) xhelp = tw12(left,i)/sqrt(xhelp_a) @@ -777,6 +781,7 @@ ENDDO C---- DO i=1,2 + xhelp= 0. xhelp_a = tof21(left,i,iadc) xhelp_t = tof21(left,i,itdc) if(xhelp_a<4095) xhelp = tw21(left,i)/sqrt(xhelp_a) @@ -790,6 +795,7 @@ ENDDO DO i=1,2 + xhelp= 0. xhelp_a = tof22(left,i,iadc) xhelp_t = tof22(left,i,itdc) if(xhelp_a<4095) xhelp = tw22(left,i)/sqrt(xhelp_a) @@ -804,6 +810,7 @@ C---- DO i=1,3 + xhelp= 0. xhelp_a = tof31(left,i,iadc) xhelp_t = tof31(left,i,itdc) if(xhelp_a<4095) xhelp = tw31(left,i)/sqrt(xhelp_a) @@ -817,6 +824,7 @@ ENDDO DO i=1,3 + xhelp= 0. xhelp_a = tof32(left,i,iadc) xhelp_t = tof32(left,i,itdc) if(xhelp_a<4095) xhelp = tw32(left,i)/sqrt(xhelp_a)