]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ISAJET/code/wwkin.F
Added the magnetic field as a static member of the AliL3Transform class,
[u/mrichter/AliRoot.git] / ISAJET / code / wwkin.F
1 #include "isajet/pilot.h"
2       SUBROUTINE WWKIN(AM1,AM2)
3 C          WPAIR KINEMATICS, INCLUDING DOUBLE PRECISION CONVERSION FOR
4 C          32-BIT MACHINES. CONVENTION IS THAT SINGLE PRECISION MASSES
5 C          AM1,AM2 ARE EXACT.
6 #include "isajet/itapes.inc"
7 #include "isajet/wwpar.inc"
8 #include "isajet/jetpar.inc"
9 C          BASIC KINEMATICS FROM TWOKIN
10       CALL TWOKIN(0.,0.,AM1,AM2)
11 C          WPAIR KINEMATICS -- JUST A COPY FOR CDC BUT CONSTRUCTS A
12 C          CONSISTENT SET OF DOUBLE PRECISION VARIABLES FOR 32-BIT
13 C          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)
38 C          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