47 |
C mar-08 WM: Call to "newbeta" changed, now a flag tells the function if the |
C mar-08 WM: Call to "newbeta" changed, now a flag tells the function if the |
48 |
C call comes from "tofl2com" or form "toftrack" |
C call comes from "tofl2com" or form "toftrack" |
49 |
C mar-08 WM: Bug found in dEdx if check_charge>1 |
C mar-08 WM: Bug found in dEdx if check_charge>1 |
50 |
C |
C apr-08 WM: Bug found in S22 artificial ADC, mismatch found between the track |
51 |
|
C length from DOTRACK2 and "GetLength" method for 4 combinations |
52 |
C**************************************************************************** |
C**************************************************************************** |
53 |
IMPLICIT NONE |
IMPLICIT NONE |
54 |
C |
C |
669 |
tof22(left,i,iadc) = xkorr/cos(theta) |
tof22(left,i,iadc) = xkorr/cos(theta) |
670 |
adcflag(ch22a(i),hb22a(i)) = 1 |
adcflag(ch22a(i),hb22a(i)) = 1 |
671 |
endif |
endif |
672 |
if ((tdc(ch22a(i),hb22b(i)).lt.4095).AND. |
if ((tdc(ch22b(i),hb22b(i)).lt.4095).AND. |
673 |
& (adc(ch22b(i),hb22b(i)).eq.4095)) then |
& (adc(ch22b(i),hb22b(i)).eq.4095)) then |
674 |
phi = atan(tan(THYOUT(4))/tan(THXOUT(4))) |
phi = atan(tan(THYOUT(4))/tan(THXOUT(4))) |
675 |
theta = atan(tan(THXOUT(4))/cos(phi)) |
theta = atan(tan(THXOUT(4))/cos(phi)) |
1492 |
dl = dl + TLOUT(i) |
dl = dl + TLOUT(i) |
1493 |
ENDDO |
ENDDO |
1494 |
F = dl/dist |
F = dl/dist |
1495 |
|
|
1496 |
|
C WM workaround |
1497 |
|
dl = dl - 0.06*F |
1498 |
|
F = dl/dist |
1499 |
|
|
1500 |
C IF (tof22_i.GT.none_find.AND.tof31_i.GT.none_find) THEN |
C IF (tof22_i.GT.none_find.AND.tof31_i.GT.none_find) THEN |
1501 |
IF ((tof22_i.GT.none_find).AND.(tof31_i.GT.none_find).AND. |
IF ((tof22_i.GT.none_find).AND.(tof31_i.GT.none_find).AND. |
1540 |
dl = dl + TLOUT(i) |
dl = dl + TLOUT(i) |
1541 |
ENDDO |
ENDDO |
1542 |
F = dl/dist |
F = dl/dist |
1543 |
|
|
1544 |
|
C WM workaround |
1545 |
|
dl = dl - 0.06*F |
1546 |
|
F = dl/dist |
1547 |
|
|
1548 |
|
|
1549 |
C IF (tof22_i.GT.none_find.AND.tof32_i.GT.none_find) THEN |
C IF (tof22_i.GT.none_find.AND.tof32_i.GT.none_find) THEN |
1550 |
IF ((tof22_i.GT.none_find).AND.(tof32_i.GT.none_find).AND. |
IF ((tof22_i.GT.none_find).AND.(tof32_i.GT.none_find).AND. |
1590 |
ENDDO |
ENDDO |
1591 |
F = dl/dist |
F = dl/dist |
1592 |
|
|
1593 |
|
C WM workaround |
1594 |
|
dl = dl - 0.442*F |
1595 |
|
F = dl/dist |
1596 |
|
|
1597 |
C IF (tof11_i.GT.none_find.AND.tof21_i.GT.none_find) THEN |
C IF (tof11_i.GT.none_find.AND.tof21_i.GT.none_find) THEN |
1598 |
IF ((tof11_i.GT.none_find).AND.(tof21_i.GT.none_find).AND. |
IF ((tof11_i.GT.none_find).AND.(tof21_i.GT.none_find).AND. |
1599 |
& (ytofpos(1).NE.101.).AND.(xtofpos(2).NE.101.)) THEN |
& (ytofpos(1).NE.101.).AND.(xtofpos(2).NE.101.)) THEN |
1682 |
ENDDO |
ENDDO |
1683 |
F = dl/dist |
F = dl/dist |
1684 |
|
|
1685 |
|
C WM workaround |
1686 |
|
dl = dl - 0.442*F |
1687 |
|
F = dl/dist |
1688 |
|
|
1689 |
C IF (tof12_i.GT.none_find.AND.tof21_i.GT.none_find) THEN |
C IF (tof12_i.GT.none_find.AND.tof21_i.GT.none_find) THEN |
1690 |
IF ((tof12_i.GT.none_find).AND.(tof21_i.GT.none_find).AND. |
IF ((tof12_i.GT.none_find).AND.(tof21_i.GT.none_find).AND. |
1691 |
& (xtofpos(1).NE.101.).AND.(xtofpos(2).NE.101.)) THEN |
& (xtofpos(1).NE.101.).AND.(xtofpos(2).NE.101.)) THEN |