]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ISAJET/code/wwkin.F
Bug in V0A fixed (Guillermo)
[u/mrichter/AliRoot.git] / ISAJET / code / wwkin.F
CommitLineData
0795afa3 1#include "isajet/pilot.h"
2 SUBROUTINE WWKIN(AM1,AM2)
3C WPAIR KINEMATICS, INCLUDING DOUBLE PRECISION CONVERSION FOR
4C 32-BIT MACHINES. CONVENTION IS THAT SINGLE PRECISION MASSES
5C AM1,AM2 ARE EXACT.
6#include "isajet/itapes.inc"
7#include "isajet/wwpar.inc"
8#include "isajet/jetpar.inc"
9C BASIC KINEMATICS FROM TWOKIN
10 CALL TWOKIN(0.,0.,AM1,AM2)
11C WPAIR KINEMATICS -- JUST A COPY FOR CDC BUT CONSTRUCTS A
12C CONSISTENT SET OF DOUBLE PRECISION VARIABLES FOR 32-BIT
13C MACHINES.
14 P3WW(1)=PT(1)*COS(PHI(1))
15 P3WW(2)=PT(1)*SIN(PHI(1))
16 P3WW(3)=P(1)*CTH(1)
17 P3WW(5)=AM1
18 P4WW(1)=-P3WW(1)
19 P4WW(2)=-P3WW(2)
20 P4WW(3)=P(2)*CTH(2)
21 P4WW(5)=AM2
22#if defined(CERNLIB_SINGLE)
23 P3WW(4)=SQRT(P3WW(1)**2+P3WW(2)**2+P3WW(3)**2+P3WW(5)**2)
24 P4WW(4)=SQRT(P4WW(1)**2+P4WW(2)**2+P4WW(3)**2+P4WW(5)**2)
25#endif
26#if defined(CERNLIB_DOUBLE)
27 P3WW(4)=DSQRT(P3WW(1)**2+P3WW(2)**2+P3WW(3)**2+P3WW(5)**2)
28 P4WW(4)=DSQRT(P4WW(1)**2+P4WW(2)**2+P4WW(3)**2+P4WW(5)**2)
29#endif
30 P1WW(1)=0.
31 P1WW(2)=0.
32 P1WW(4)=.5*(P3WW(4)+P3WW(3)+P4WW(4)+P4WW(3))
33 P1WW(3)=P1WW(4)
34 P2WW(1)=0.
35 P2WW(2)=0.
36 P2WW(4)=.5*(P3WW(4)-P3WW(3)+P4WW(4)-P4WW(3))
37 P2WW(3)=-P2WW(4)
38C INVARIANTS
39 SWW=+2.*(P1WW(4)*P2WW(4)-P1WW(3)*P2WW(3))
40 TWW=-2.*(P1WW(4)*P3WW(4)-P1WW(3)*P3WW(3))+P3WW(5)**2
41 UWW=-2.*(P2WW(4)*P3WW(4)-P2WW(3)*P3WW(3))+P3WW(5)**2
42 RETURN
43 END