| 12 |
* jan-07 WM: the definition for a "hit" is changed: Now we must have a |
* jan-07 WM: the definition for a "hit" is changed: Now we must have a |
| 13 |
* valid TDC signal on both sides |
* valid TDC signal on both sides |
| 14 |
* jan-07 WM: flag for PMTs #10 and #35 added, TDC=819 due to bit-shift |
* jan-07 WM: flag for PMTs #10 and #35 added, TDC=819 due to bit-shift |
| 15 |
|
* jan-07 WM: bug removed: in some cases tdc_tw was calculated due to a |
| 16 |
|
* leftover "xhelp" value |
| 17 |
****************************************************************************** |
****************************************************************************** |
| 18 |
|
|
| 19 |
INTEGER FUNCTION TOFL2COM() |
INTEGER FUNCTION TOFL2COM() |
| 753 |
C-------------------------------------------------------------------- |
C-------------------------------------------------------------------- |
| 754 |
|
|
| 755 |
DO i=1,8 |
DO i=1,8 |
| 756 |
|
xhelp= 0. |
| 757 |
xhelp_a = tof11(left,i,iadc) |
xhelp_a = tof11(left,i,iadc) |
| 758 |
xhelp_t = tof11(left,i,itdc) |
xhelp_t = tof11(left,i,itdc) |
| 759 |
if(xhelp_a<4095) xhelp = tw11(left,i)/sqrt(xhelp_a) |
if(xhelp_a<4095) xhelp = tw11(left,i)/sqrt(xhelp_a) |
| 767 |
ENDDO |
ENDDO |
| 768 |
|
|
| 769 |
DO i=1,6 |
DO i=1,6 |
| 770 |
|
xhelp= 0. |
| 771 |
xhelp_a = tof12(left,i,iadc) |
xhelp_a = tof12(left,i,iadc) |
| 772 |
xhelp_t = tof12(left,i,itdc) |
xhelp_t = tof12(left,i,itdc) |
| 773 |
if(xhelp_a<4095) xhelp = tw12(left,i)/sqrt(xhelp_a) |
if(xhelp_a<4095) xhelp = tw12(left,i)/sqrt(xhelp_a) |
| 781 |
ENDDO |
ENDDO |
| 782 |
C---- |
C---- |
| 783 |
DO i=1,2 |
DO i=1,2 |
| 784 |
|
xhelp= 0. |
| 785 |
xhelp_a = tof21(left,i,iadc) |
xhelp_a = tof21(left,i,iadc) |
| 786 |
xhelp_t = tof21(left,i,itdc) |
xhelp_t = tof21(left,i,itdc) |
| 787 |
if(xhelp_a<4095) xhelp = tw21(left,i)/sqrt(xhelp_a) |
if(xhelp_a<4095) xhelp = tw21(left,i)/sqrt(xhelp_a) |
| 795 |
ENDDO |
ENDDO |
| 796 |
|
|
| 797 |
DO i=1,2 |
DO i=1,2 |
| 798 |
|
xhelp= 0. |
| 799 |
xhelp_a = tof22(left,i,iadc) |
xhelp_a = tof22(left,i,iadc) |
| 800 |
xhelp_t = tof22(left,i,itdc) |
xhelp_t = tof22(left,i,itdc) |
| 801 |
if(xhelp_a<4095) xhelp = tw22(left,i)/sqrt(xhelp_a) |
if(xhelp_a<4095) xhelp = tw22(left,i)/sqrt(xhelp_a) |
| 810 |
C---- |
C---- |
| 811 |
|
|
| 812 |
DO i=1,3 |
DO i=1,3 |
| 813 |
|
xhelp= 0. |
| 814 |
xhelp_a = tof31(left,i,iadc) |
xhelp_a = tof31(left,i,iadc) |
| 815 |
xhelp_t = tof31(left,i,itdc) |
xhelp_t = tof31(left,i,itdc) |
| 816 |
if(xhelp_a<4095) xhelp = tw31(left,i)/sqrt(xhelp_a) |
if(xhelp_a<4095) xhelp = tw31(left,i)/sqrt(xhelp_a) |
| 824 |
ENDDO |
ENDDO |
| 825 |
|
|
| 826 |
DO i=1,3 |
DO i=1,3 |
| 827 |
|
xhelp= 0. |
| 828 |
xhelp_a = tof32(left,i,iadc) |
xhelp_a = tof32(left,i,iadc) |
| 829 |
xhelp_t = tof32(left,i,itdc) |
xhelp_t = tof32(left,i,itdc) |
| 830 |
if(xhelp_a<4095) xhelp = tw32(left,i)/sqrt(xhelp_a) |
if(xhelp_a<4095) xhelp = tw32(left,i)/sqrt(xhelp_a) |