EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lframe.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file lframe.F
1 
2 C **********************************************************************
3 
4  SUBROUTINE lframe(IFR,IPH)
5 
6  IMPLICIT NONE
7 
8 C...Make transformation from hadronic CM frame to lab frame.
9 
10  INTEGER nlupdm,nplbuf
11  parameter(nlupdm=4000,nplbuf=5)
12  common/lujets/n,k(nlupdm,5),p(nlupdm,nplbuf),v(nlupdm,5)
13  INTEGER n,k
14  REAL p,v
15  SAVE /lujets/
16 
17  common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
18  INTEGER mstu,mstj
19  REAL paru,parj
20  SAVE /ludat1/
21 
22 *
23 * to avoid variable conflictions, a second keep element is necessary
24 * with the same common block name (see LPTOU2)
25 *
26  COMMON /leptou/ cut(14),lst(40),parl(30),
27  & x,y,w2,q2,u
28  REAL cut,parl,x,y,w2,q2,u
29  INTEGER lst
30  SAVE /leptou/
31 
32  COMMON /linter/ pari(50),ewqc(2,2,8),qc(8),zl(2,4),zq(2,8),pq(17)
33  REAL pari,ewqc,qc,zl,zq,pq
34  SAVE /linter/
35 
36  COMMON /lintrl/ psave(3,4,5),ksave(4),xmin,xmax,ymin,ymax,
37  &q2min,q2max,w2min,w2max,ilep,inu,ig,iz
38  REAL psave,xmin,xmax,ymin,ymax,q2min,q2max,w2min,w2max
39  INTEGER ksave,ilep,inu,ig,iz
40  SAVE /lintrl/
41 
42  COMMON /lboost/ dbeta(2,3),stheta(2),sphi(2),pb(5),phir
43  DOUBLE PRECISION dbeta
44  REAL stheta,sphi,pb,phir
45  SAVE /lboost/
46 
47 
48  INTEGER ifr,iph,iframe,iphi,i,j
49  REAL thebos,phibos,plu
50 
51  iframe=ifr
52  iphi=iph
53  IF(iframe.LT.1.OR.iframe.GT.4.OR.iphi.LT.0.OR.iphi.GT.1) goto 999
54  IF(iframe.EQ.1) iphi=0
55 
56 CGI -- Also boost lines up to N+MSTU(3)
57  n=n+1+mstu(3)
58  DO 5 j=1,5
59  5 p(n,j)=pb(j)
60 C Must also set status >0 for LUROBO/LUDBRB
61  k(n,1)=21
62 
63  10 CONTINUE
64  IF(iphi.NE.lst(29)) THEN
65  iframe=2
66  ELSE
67  iframe=ifr
68  ENDIF
69  IF((iframe.EQ.lst(28)).AND.(iphi.EQ.lst(29))) THEN
70  DO 15 j=1,5
71  15 pb(j)=p(n,j)
72  n=n-1-mstu(3)
73  RETURN
74  ENDIF
75 
76  goto(100,200,300,400), lst(28)
77  goto 999
78 
79  100 IF(iframe.GE.2) THEN
80  CALL ludbrb(0,0,stheta(2),sphi(2),0.d0,0.d0,0.d0)
81  CALL ludbrb(0,0,0.,0.,dbeta(2,1),dbeta(2,2),dbeta(2,3))
82  lst(28)=2
83  ELSE
84  goto 999
85  ENDIF
86  goto 10
87 
88  200 IF(iphi.NE.lst(29)) THEN
89  CALL ludbrb(0,0,0.,sign(phir,float(iphi-lst(29))),0.d0,0.d0,0.d0)
90  lst(29)=iphi
91  ENDIF
92 
93  IF(iframe.EQ.1) THEN
94  CALL ludbrb(0,0,0.,0.,-dbeta(2,1),-dbeta(2,2),-dbeta(2,3))
95  CALL ludbrb(0,0,-stheta(2),0.,0.d0,0.d0,0.d0)
96  lst(28)=1
97  ELSEIF(iframe.GE.3) THEN
98  IF(lst(17).EQ.0) THEN
99  CALL ludbrb(0,0,0.,0.,0.d0,0.d0,dbeta(1,3))
100  IF(psave(3,1,3).LT.0.) THEN
101  DO 210 i=1,n
102  v(i,3)=-v(i,3)
103  210 p(i,3)=-p(i,3)
104  ENDIF
105  ELSE
106  CALL ludbrb(0,0,stheta(1),sphi(1),0.d0,0.d0,0.d0)
107  CALL ludbrb(0,0,0.,0.,dbeta(1,1),dbeta(1,2),dbeta(1,3))
108  ENDIF
109  lst(28)=3
110  ENDIF
111  goto 10
112 
113  300 IF(iframe.LE.2) THEN
114  IF(lst(17).EQ.0) THEN
115  IF(psave(3,1,3).LT.0.) THEN
116  DO 310 i=1,n
117  v(i,3)=-v(i,3)
118  310 p(i,3)=-p(i,3)
119  ENDIF
120  CALL ludbrb(0,0,0.,0.,0.d0,0.d0,-dbeta(1,3))
121  ELSE
122  CALL ludbrb(0,0,0.,0.,-dbeta(1,1),-dbeta(1,2),-dbeta(1,3))
123  CALL ludbrb(0,0,0.,-sphi(1),0.d0,0.d0,0.d0)
124  CALL ludbrb(0,0,-stheta(1),0.,0.d0,0.d0,0.d0)
125  ENDIF
126  lst(28)=2
127  ELSEIF(iframe.EQ.4) THEN
128  thebos=plu(n,13)
129  phibos=plu(n,15)
130  CALL ludbrb(0,0,0.,-phibos,0.d0,0.d0,0.d0)
131  CALL ludbrb(0,0,-thebos,0.,0.d0,0.d0,0.d0)
132  lst(28)=4
133  ENDIF
134  goto 10
135 
136  400 IF(iframe.LE.3) THEN
137  CALL ludbrb(0,0,thebos,phibos,0.d0,0.d0,0.d0)
138  lst(28)=3
139  ENDIF
140  goto 10
141 
142  999 WRITE(6,1000) iframe,iphi,lst(28),lst(29)
143  1000 FORMAT(' BAD VARIABLES IN SUBROUTINE LFRAME: IFRAME,IPHI,',
144  &'LST(28),LST(29) =',4i5)
145  RETURN
146  END