Fix long line
[u/mrichter/AliRoot.git] / HIJING / hijing1_36 / arorie.F
CommitLineData
e74335a4 1* $Id$
2C*************************************************************
3
4
5 SUBROUTINE ARORIE(S,X1,X3,JL)
6C
7#include "hiparnt.inc"
8#include "lujets_hijing.inc"
9 SAVE
10C
11 W=SQRT(S)
12 X2=2.-X1-X3
13 E1=.5*X1*W
14 E3=.5*X3*W
15 P1=SQRT(E1**2-P(JL,5)**2)
16 P3=SQRT(E3**2-P(JL+1,5)**2)
17 CBET=1.
18 IF(P1.GT.0..AND.P3.GT.0.) CBET=(P(JL,5)**2
19 & +P(JL+1,5)**2+2.*E1*E3-S*(1.-X2))/(2.*P1*P3)
20 IF(ABS(CBET).GT.1.0) CBET=MAX(-1.,MIN(1.,CBET))
21 BET=ACOS(CBET)
22
23C.....MINIMIZE PT1-SQUARED PLUS PT3-SQUARED.....
24 IF(P1.GE.P3) THEN
56e721dc 25 PSI=.5*ULANGL_HIJING(P1**2+P3**2*COS(2.*BET),-P3**2*SIN(2.
26 1 *BET))
e74335a4 27 PT1=P1*SIN(PSI)
28 PZ1=P1*COS(PSI)
29 PT3=P3*SIN(PSI+BET)
30 PZ3=P3*COS(PSI+BET)
31 ELSE IF(P3.GT.P1) THEN
56e721dc 32 PSI=.5*ULANGL_HIJING(P3**2+P1**2*COS(2.*BET),-P1**2*SIN(2.
33 1 *BET))
e74335a4 34 PT1=P1*SIN(BET+PSI)
35 PZ1=-P1*COS(BET+PSI)
36 PT3=P3*SIN(PSI)
37 PZ3=-P3*COS(PSI)
38 ENDIF
56e721dc 39
e74335a4 40 DEL=2.0*HIPR1(40)*RLU_HIJING(0)
41 P(JL,4)=E1
42 P(JL,1)=PT1*SIN(DEL)
43 P(JL,2)=-PT1*COS(DEL)
44 P(JL,3)=PZ1
45 P(JL+2,4)=E3
46 P(JL+2,1)=PT3*SIN(DEL)
47 P(JL+2,2)=-PT3*COS(DEL)
48 P(JL+2,3)=PZ3
49 P(JL+1,4)=W-E1-E3
50 P(JL+1,1)=-P(JL,1)-P(JL+2,1)
51 P(JL+1,2)=-P(JL,2)-P(JL+2,2)
52 P(JL+1,3)=-P(JL,3)-P(JL+2,3)
53 RETURN
54 END