ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
atrobo.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file atrobo.f
1 
2 
3 C
4 C*******************************************************************
5 C make boost and rotation to entries from IMIN to IMAX
6 C*******************************************************************
7  SUBROUTINE atrobo(THE,PHI,BEX,BEY,BEZ,IMIN,IMAX,IERROR)
8  common/lujets/n,k(9000,5),p(9000,5),v(9000,5)
9  SAVE /lujets/
10  dimension rot(3,3),pv(3)
11  DOUBLE PRECISION dp(4),dbex,dbey,dbez,dga,dga2,dbep,dgabep
12  ierror=0
13 
14  IF(imin.LE.0 .OR. imax.GT.n .OR. imin.GT.imax) RETURN
15 
16  IF(the**2+phi**2.GT.1e-20) THEN
17 C...ROTATE (TYPICALLY FROM Z AXIS TO DIRECTION THETA,PHI)
18  rot(1,1)=cos(the)*cos(phi)
19  rot(1,2)=-sin(phi)
20  rot(1,3)=sin(the)*cos(phi)
21  rot(2,1)=cos(the)*sin(phi)
22  rot(2,2)=cos(phi)
23  rot(2,3)=sin(the)*sin(phi)
24  rot(3,1)=-sin(the)
25  rot(3,2)=0.
26  rot(3,3)=cos(the)
27  DO 120 i=imin,imax
28 C************** IF(MOD(K(I,1)/10000,10).GE.6) GOTO 120
29  DO 100 j=1,3
30  100 pv(j)=p(i,j)
31  DO 110 j=1,3
32  110 p(i,j)=rot(j,1)*pv(1)+rot(j,2)*pv(2)
33  & +rot(j,3)*pv(3)
34  120 CONTINUE
35  ENDIF
36 
37  IF(bex**2+bey**2+bez**2.GT.1e-20) THEN
38 C...LORENTZ BOOST (TYPICALLY FROM REST TO MOMENTUM/ENERGY=BETA)
39  dbex=bex
40  dbey=bey
41  dbez=bez
42  dga2=1d0-dbex**2-dbey**2-dbez**2
43  IF(dga2.LE.0d0) THEN
44  ierror=1
45  RETURN
46  ENDIF
47  dga=1d0/dsqrt(dga2)
48  DO 140 i=imin,imax
49 C************* IF(MOD(K(I,1)/10000,10).GE.6) GOTO 140
50  DO 130 j=1,4
51 130 dp(j)=p(i,j)
52  dbep=dbex*dp(1)+dbey*dp(2)+dbez*dp(3)
53  dgabep=dga*(dga*dbep/(1d0+dga)+dp(4))
54  p(i,1)=dp(1)+dgabep*dbex
55  p(i,2)=dp(2)+dgabep*dbey
56  p(i,3)=dp(3)+dgabep*dbez
57  p(i,4)=dga*(dp(4)+dbep)
58 140 CONTINUE
59  ENDIF
60 
61  RETURN
62  END