SUBROUTINE DUMPCRC(LUJ11,LUJ12,LUJ21,LUJ22) C---------------------------------------------------------------------- C! This routine prepares the LUND common block for Color Reconnection C! and saves it in a bank. C C Note that DUMPCRC will rearrange the Parton shower so that the LUND C common will be changed! C Usage: C C CALL DUMPCRC(LUJ11,LUJ12,LUJ21,LUJ22) C C where LUJ11,LUJ12,LUJ21,LUJ22 are integers and holds the C start and end number of string 1 and 2 (as used by LUSHOW) from C the LUJETS common. C C Anders Waananen - March 1997 C C $Id: dumpcrc.F,v 1.1 1997/04/15 20:22:28 waananen Exp waananen $ C---------------------------------------------------------------------- IMPLICIT NONE C INTEGER I,J,ID(4) INTEGER LUJ11,LUJ12,LUJ21,LUJ22 REAL TABL(4000*3*5) INTEGER KABL(4000*3*5) EQUIVALENCE (TABL,KABL) INTEGER LMCWRT,JKLJE,JKCRH PARAMETER(LMCWRT=6) INTEGER ALTABL EXTERNAL ALTABL #include "lujets.h" #include "ludat1.h" #include "ludatr.h" #if defined (DEBUG) LOGICAL FIRST DATA FIRST /.TRUE./ #endif C C Rearrange parton shower C ID(1) = K(LUJ11,2) ID(2) = K(LUJ12,2) ID(3) = K(LUJ21,2) ID(4) = K(LUJ22,2) IF ( ABS(ID(1)).GT.0.AND.ABS(ID(2)).GT.0.AND. & ABS(ID(3)).GT.0.AND.ABS(ID(4)).GT.0.AND. & ABS(ID(1)).LT.7.AND.ABS(ID(2)).LT.7.AND. & ABS(ID(3)).LT.7.AND.ABS(ID(4)).LT.7 ) THEN I=MSTJ(14) MSTJ(14)=-1 CALL LUPREP(0) MSTJ(14)=I C Offset original partons so that they are not removed by LUEDIT. K(LUJ11,1)=K(LUJ11,1)-20 K(LUJ12,1)=K(LUJ12,1)-20 K(LUJ21,1)=K(LUJ21,1)-20 K(LUJ22,1)=K(LUJ22,1)-20 CALL LUEDIT(12) CALL LUEDIT(14) K(LUJ11,1)=K(LUJ11,1)+20 K(LUJ12,1)=K(LUJ12,1)+20 K(LUJ21,1)=K(LUJ21,1)+20 K(LUJ22,1)=K(LUJ22,1)+20 C C Save LUJETS in the bank KLJE C !!This bank is only used on Kingal level!! C #if defined (DEBUG) IF (FIRST) THEN OPEN(UNIT=92,FORM='UNFORMATTED') FIRST=.FALSE. ENDIF #endif DO I = 1, N J=I-1 KABL(J*15 + 1) = K(I,1) KABL(J*15 + 2) = K(I,2) KABL(J*15 + 3) = K(I,3) KABL(J*15 + 4) = K(I,4) KABL(J*15 + 5) = K(I,5) TABL(J*15 + 6) = P(I,1) TABL(J*15 + 7) = P(I,2) TABL(J*15 + 8) = P(I,3) TABL(J*15 + 9) = P(I,4) TABL(J*15 + 10) = P(I,5) TABL(J*15 + 11) = V(I,1) TABL(J*15 + 12) = V(I,2) TABL(J*15 + 13) = V(I,3) TABL(J*15 + 14) = V(I,4) TABL(J*15 + 15) = V(I,5) #if defined (DEBUG) WRITE(92) (K(I,J),P(I,J),V(I,J),J=1,5) #endif ENDDO JKLJE = ALTABL('KLJE',15,N,TABL,'2I,(5I,10F)','E') IF (JKLJE.LT.0) WRITE(LMCWRT,100) 'KLJE' KABL(1) = LUJ11 KABL(2) = LUJ12 KABL(3) = LUJ21 KABL(4) = LUJ22 CALL RMARUT(KABL(5),KABL(6),KABL(7)) #if defined (DEBUG) WRITE(92) LUJ11,LUJ12,LUJ21,LUJ22 WRITE(92) KABL(5),KABL(6),KABL(7) #endif JKCRH = ALTABL('KCRH',7,1,TABL,'2I,(4I,3I)','E') IF (JKCRH.LT.0) WRITE(LMCWRT,100) 'KCRH' ENDIF C RETURN 100 FORMAT(/,' DUMPCRC: Warning: could not create ',A4,' bank!',/) END