* * $Id$ * * $Log$ * Revision 1.1 2000/06/19 20:00:29 eugenio * Initial revision * * Revision 1.1.1.1 1994/11/22 16:57:06 zfiles * first version of korb in CVS * * #include "sys/CLEO_machine.h" #include "pilot.h" *CMZ : 2.00/07 17/11/94 10.26.43 by Alan J. Weinstein *CMZ : 30/01/94 16.27.09 by Alan J. Weinstein * Add IF ((LAST.EQ.0).OR.(LAST.LT.FIRST)) RETURN *CMZ : 2.00/05 21/10/93 17.43.03 by Alan Weinstein *-- Author : * 15/10/96 Lynn Garren: Add double precision conditionals. SUBROUTINE PHOBOS(IP,PBOOS1,PBOOS2,FIRST,LAST) C.---------------------------------------------------------------------- C. C. PHOBOS: PHOton radiation in decays BOoSt routine C. C. Purpose: Boost particles in cascade decay to parent rest frame C. and boost back with modified boost vector. C. C. Input Parameters: IP: pointer of particle starting chain C. to be boosted C. PBOOS1: Boost vector to rest frame, C. PBOOS2: Boost vector to modified frame, C. FIRST: Pointer to first particle to be boos- C. ted (/HEPEVT/), C. LAST: Pointer to last particle to be boos- C. ted (/HEPEVT/). C. C. Output Parameters: Common /HEPEVT/. C. C. Author(s): B. van Eijk Created at: 13/02/90 C. Z. Was Last Update: 16/11/93 C. C.---------------------------------------------------------------------- C-- IMPLICIT NONE DOUBLE PRECISION BET1(3),BET2(3),GAM1,GAM2,PB,DATA INTEGER I,J,FIRST,LAST,MAXSTA,NSTACK,IP #if defined(NONCLEO_DOUBLE) PARAMETER (MAXSTA=4000) INTEGER STACK(MAXSTA) DOUBLE PRECISION PBOOS1(5),PBOOS2(5) #else PARAMETER (MAXSTA=2000) INTEGER STACK(MAXSTA) REAL PBOOS1(5),PBOOS2(5) #endif #include "seq/clinc/qqpars.inc" #include "qqlib/seq/hepevt.inc" C INTEGER NMXHEP C PARAMETER (NMXHEP=2000) C INTEGER IDHEP,ISTHEP,JDAHEP,JMOHEP,NEVHEP,NHEP C REAL PHEP,VHEP C COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP), C &JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP) IF ((LAST.EQ.0).OR.(LAST.LT.FIRST)) RETURN NSTACK=0 DO 10 J=1,3 BET1(J)=-PBOOS1(J)/PBOOS1(5) 10 BET2(J)=PBOOS2(J)/PBOOS2(5) GAM1=PBOOS1(4)/PBOOS1(5) GAM2=PBOOS2(4)/PBOOS2(5) C-- C-- Boost vector to parent rest frame... 20 DO 50 I=FIRST,LAST PB=BET1(1)*PHEP(1,I)+BET1(2)*PHEP(2,I)+BET1(3)*PHEP(3,I) IF (JMOHEP(1,I).EQ.IP) THEN DO 30 J=1,3 30 PHEP(J,I)=PHEP(J,I)+BET1(J)*(PHEP(4,I)+PB/(GAM1+1.)) PHEP(4,I)=GAM1*PHEP(4,I)+PB C-- C-- ...and boost back to modified parent frame. PB=BET2(1)*PHEP(1,I)+BET2(2)*PHEP(2,I)+BET2(3)*PHEP(3,I) DO 40 J=1,3 40 PHEP(J,I)=PHEP(J,I)+BET2(J)*(PHEP(4,I)+PB/(GAM2+1.)) PHEP(4,I)=GAM2*PHEP(4,I)+PB IF (JDAHEP(1,I).NE.0) THEN NSTACK=NSTACK+1 C-- C-- Check on stack length... IF (NSTACK.GT.MAXSTA) THEN DATA=NSTACK CALL PHOERR(7,'PHOBOS',DATA) ENDIF STACK(NSTACK)=I ENDIF ENDIF 50 CONTINUE IF (NSTACK.NE.0) THEN C-- C-- Now go one step further in the decay tree... FIRST=JDAHEP(1,STACK(NSTACK)) LAST=JDAHEP(2,STACK(NSTACK)) IP=STACK(NSTACK) NSTACK=NSTACK-1 GOTO 20 ENDIF RETURN END