ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
arorie.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file arorie.f
1 C*************************************************************
2 
3 
4  SUBROUTINE arorie(S,X1,X3,JL)
5 C
6  common/hiparnt/hipr1(100),ihpr2(50),hint1(100),ihnt2(50)
7  SAVE /hiparnt/
8  common/lujets/n,k(9000,5),p(9000,5),v(9000,5)
9  SAVE /lujets/
10  common/ranseed/nseed
11  SAVE /ranseed/
12 C
13  w=sqrt(s)
14  x2=2.-x1-x3
15  e1=.5*x1*w
16  e3=.5*x3*w
17  p1=sqrt(e1**2-p(jl,5)**2)
18  p3=sqrt(e3**2-p(jl+1,5)**2)
19  cbet=1.
20  IF(p1.GT.0..AND.p3.GT.0.) cbet=(p(jl,5)**2
21  & +p(jl+1,5)**2+2.*e1*e3-s*(1.-x2))/(2.*p1*p3)
22  IF(abs(cbet).GT.1.0) cbet=max(-1.,min(1.,cbet))
23  bet=acos(cbet)
24 
25 C.....MINIMIZE PT1-SQUARED PLUS PT3-SQUARED.....
26  IF(p1.GE.p3) THEN
27  psi=.5*ulangl(p1**2+p3**2*cos(2.*bet),-p3**2*sin(2.*bet))
28  pt1=p1*sin(psi)
29  pz1=p1*cos(psi)
30  pt3=p3*sin(psi+bet)
31  pz3=p3*cos(psi+bet)
32  ELSE IF(p3.GT.p1) THEN
33  psi=.5*ulangl(p3**2+p1**2*cos(2.*bet),-p1**2*sin(2.*bet))
34  pt1=p1*sin(bet+psi)
35  pz1=-p1*cos(bet+psi)
36  pt3=p3*sin(psi)
37  pz3=-p3*cos(psi)
38  ENDIF
39 
40  del=2.0*hipr1(40)*atl_ran(nseed)
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