next up previous
Next: Bibliography Up: KORALB Previous: KORALB

Bug report: May 1993

Geneva, 3 May, 1993

To all users of KORALB

Since KORALB is used now more often we are getting more frequent reports about various problems. We are looking into them and in most cases they turn out to be rather trivial (for instance misuse of the program). Recent report signaled, however, the real problem i.e. a bug in KORALB. We were able to isolate and correct it and in this note we give more details. The bug affects transverse correlations between second and third spin component at the Born level close to $\tau$ production threshold - in fact their forward-backward asymmetric part. Numerical consequences for most of applications are probably negligible but not for measurements aimed specifically at spin correlations and their dependence on $\tau$ direction. How to locate and correct it? The bug is in routine TRALOR which is used to construct $\tau^\pm$ four-momenta and to transform $\tau^\pm$ decay products from $\tau^\pm$ rest frames to laboratory system. It can be corrected ``by hand'' following corrected version of TRALOR included at the end of this note. We can also provide corrected version of the whole program to any user with the usual restriction that we prefer to send one copy of the program per collaboration (in order to assure proper propagation of the program within collaboration). The origin of the bug. It is difficult to trace back the origin of the bug since the calculation/program is now ten years old. We have checked that the bug is not present in the underlying analytical calculations of spin amplitudes etc. but is present in the FORTRAN code1 and its description. Very briefly: in our paper [1] and in all calculations of spin amplitudes we used different (opposite sign) choice of the scattering angle $\theta$ in the part of cross section Born+virtual (k<k0) as compared to real-photon-emission part (k>k0).2For some unknown reasons (blind optimization during the final clean-up before publication?) this fact is not properly reflected in the TRALOR routine, already in the first published version [2] of KORALB. Corrections to our papers. All spin amplitudes expressions for correlation tensors Rabcd, numerical results etc. in refs. [1,2] are NOT affected. The bug is present in the long-write-up [2]: In eq. (2.28) in definition of $L_0(\tau^\pm)$ rotation matrix $R_1(-\theta)$ should be replaced with $R_1(\theta)$. The same change should be made in Fig. 2a. The same change propagates to eqs. (2.2), (3.5) and Fig 2a in ref. [3] and to Fig. 1a in ref. [4] Note that TIPTOP program and related papers are not affected because this program, although derived from KORALB, has different TRALOR routine. The same is true for KORALZ program. Apologies and remarks on tests of KORALB: We are really very sorry for any inconveniences and/or any other possible consequences of the above bug. We are also sorry for the slow response after first reports concerning presence of the above bug. It simply took us a bit of time to dig through our old dusty notes! We would like to stress (as usual) that the user of any Monte Carlo program should test its basic properties relevant to her/his specific needs. Although it is always our aim that the Monte Carlo program is 100% free of bugs the user should NEVER assume that this is true. How well is KORALB tested? Its basic tests are in ref. [1] and we strongly recommend any user to repeat them before the use of the program.3We expressed on many occasions our feelings that with present statistics of millions $\tau$'s these old tests are NOT sufficient and there is urgent need of more sophisticated tests - in addition to repetition of old ones. Note that tests in ref. [5] are performed on distributions which are insensitive to the bug. We are sorry that since 1985 we had never time to do more tests of KORALB and nowadays this is unfortunately still true. The only thing we can do is to invite anybody interested to design and perform more tests. We promise to advise and help her/him in this task.

Acknowledgement: We would like to thank dr. Holger Thurn for reporting the bug and for helping us to localize it. His dedicated effort (including one day of private visit in Geneva area during Easter) was also very helpful in understanding numerical effects of the bug.


S. Jadach and Z. Was

      SUBROUTINE TRALOR(KTO,VEC)
C     **************************
      IMPLICIT REAL*8(A-H,O-Z)
C
C     ******************************************************************
C     *   TRALOR TRANSFORMES FOUR-VECTOR VEC FROM TAU REST SYSTEM      *
C     *   TO LAB SYSTEM. RECOMMENDED TO USE  FOR DECAY PRODUCTS.       *
C     *   KTO=1,2 DENOTES TAU+ AND TAU- CORRESPONDINGLY                *
C     ******************************************************************
C
      COMMON / UTIL1 / XK,C1,S1,C2,S2,CF,SF,CG,SG,V
      COMMON / UTIL2 / XK0,XKMIN,XKMAX
      COMMON / ENERG / ENE,AEL2,AMF2,AMF,ALGEL,ALGMF,BETI,BT1,ATH2
      DIMENSION VEC(4),VEC1(4),TL(4,4)
C IBLAD=1 makes program as with the error which was removed april/may 93.
C IBLAD=0 is the right choice.
      DATA IBLAD / 0/
C
      Y=SQRT(1.-XK)
      A=Y/AMF
      B=SQRT((A-1.)*(A+1.))
      IF(KTO.EQ.2) B=-B
      BB=.5*XK/Y
      GB=(1.-.5*XK)/Y
C
      IF (XK.GT.0.2*XK0) THEN
        H1= C1*S2*CF+GB*S1*C2
        H2=-S1*S2*CF+GB*C1*C2
        TL(1,1)= CF
        TL(1,2)=-C2*SF
        TL(1,3)=-A*S2*SF
        TL(1,4)=-B*S2*SF
        TL(2,1)= C1*SF
        TL(2,2)= C1*C2*CF-GB*S1*S2
        TL(2,3)=-B*BB*S1+A*H1
        TL(2,4)=-A*BB*S1+B*H1
        TL(3,1)=-S1*SF
        TL(3,2)=-S1*C2*CF-GB*C1*S2
        TL(3,3)=-B*BB*C1+A*H2
        TL(3,4)=-A*BB*C1+B*H2
        TL(4,1)= 0.
        TL(4,2)= BB*S2
        TL(4,3)= B*GB-A*BB*C2
        TL(4,4)= A*GB-B*BB*C2
      ELSE
        H1=-S1
        IF (IBLAD.EQ.1) H1=S1
        H2= C1
        TL(1,1)= 1.0
        TL(1,2)= 0.0
        TL(1,3)= 0.0
        TL(1,4)= 0.0
        TL(2,1)= 0.0
        TL(2,2)= H2
        TL(2,3)= A*H1
        TL(2,4)= B*H1
        TL(3,1)= 0.0
        TL(3,2)=-H1
        TL(3,3)= A*H2
        TL(3,4)= B*H2
        TL(4,1)= 0.
        TL(4,2)= 0.
        TL(4,3)= B
        TL(4,4)= A
      ENDIF
C
      DO 100 I=1,4
  100 VEC1(I)=VEC(I)
      DO 110 I=1,4
      SUM=0.
      DO 105 J=1,4
  105 SUM=SUM+TL(I,J)*VEC1(J)
  110 VEC(I)=SUM
C     ROTATION ARROUND THE BEAM
      A=VEC(1)
      VEC(1)=CG*A-SG*VEC(2)
      VEC(2)=SG*A+CG*VEC(2)
C
      RETURN
      END


next up previous
Next: Bibliography Up: KORALB Previous: KORALB

1999-03-18