Return to rotate_haxis.f CVS log | Up to [HallC] / pol_hms_single |
File: [HallC] / pol_hms_single / rotate_haxis.f
(download)
Revision: 1.2, Fri Dec 19 13:37:28 2003 UTC (20 years, 9 months ago) by jones Branch: MAIN CVS Tags: HEAD Changes since 1.1: +3 -3 lines Update to work with g77 ( P. McKee) |
subroutine rotate_haxis(rotang,xp0,yp0) C+______________________________________________________________________________ ! ! ROTATE_HAXIS- Calculate new trajectory coordinates in reference frame rotated ! about horizontal axis by angle ROTANG relative to central ray. ! ! *** Right-handed TRANSPORT coordinates are assumed! *** ! ! ROTANG is an angle about the negative Y-axis. ! For the SOS BM01 entrance, it is a negative number. ! ! Input trajectory is: X = XS + ALPHA*(Z-ZS) ! Y = YS + BETA *(Z-ZS) ! Z = ZS is current point. ! ! Output traject is: XP = XP0 + ALPHA_P*ZP ! YP = YP0 + BETA_P *ZP ! ZP = 0 gives intersection of track with rotated plane. ! ! ROTANG (R*4): Rotation angle in degrees. ! ! D. Potterveld, 15-Mar-1993. C-______________________________________________________________________________ implicit none include 'track.inc' real*8 rotang,xp0,yp0,xi real*8 alpha,beta,alpha_p,beta_p,sin_th,cos_th,tan_th save C ============================= Executable Code ================================ 1 tan_th = tan(rotang) sin_th = sin(rotang) cos_th = cos(rotang) alpha = dxdzs beta = dydzs alpha_p= (alpha + tan_th)/(1. - alpha*tan_th) beta_p = beta/(cos_th - alpha*sin_th) xi = xp0 xp0 = xi*(cos_th + alpha_p*sin_th) yp0 = yp0 + xi*beta_p*sin_th return end
Analyzer/Replay: Mark Jones, Documents: Stephen Wood |
Powered by ViewCVS 0.9.2-cvsgraph-1.4.0 |