From 389db05363cffcbf9b888ad58421e5582625e06b Mon Sep 17 00:00:00 2001 From: zhang <zhang@9a6e40ed-f3a0-4838-9b4a-bf418f78e88d> Date: Thu, 30 Jun 2011 16:36:38 +0000 Subject: [PATCH] 30/06/2011 1) fix the bug of RF acceptance for the lattice with negative momentum compact factor 2) Fix the bug to get momentum accpetance. --- tracy/tracy/src/nsls-ii_lib.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tracy/tracy/src/nsls-ii_lib.cc b/tracy/tracy/src/nsls-ii_lib.cc index 5a81b42..04020b2 100644 --- a/tracy/tracy/src/nsls-ii_lib.cc +++ b/tracy/tracy/src/nsls-ii_lib.cc @@ -5,9 +5,9 @@ T. Shaftan, I. Pinayev, Y. Luo, C. Montag, B. Nash */ -/* Current revision $Revision: 1.14 $ +/* Current revision $Revision: 1.15 $ On branch $Name: not supported by cvs2svn $ - Latest change by $Author: nadolski $ + Latest change by $Author: zhang $ */ // global params @@ -478,7 +478,7 @@ void GetEmittance(const int Fnum, const bool prt) phi0 = fabs(asin(globval.U0/V_RF)); globval.delta_RF = sqrt(-V_RF*cos(M_PI-phi0)*(2.0-(M_PI-2.0*(M_PI-phi0)) - *tan(M_PI-phi0))/(globval.Alphac*M_PI*h_RF*1e9*globval.Energy)); + *tan(M_PI-phi0))/(abs(globval.Alphac)*M_PI*h_RF*1e9*globval.Energy)); // compute diffusion coeffs. for eigenvectors [sigma_xx, sigma_yy, sigma_zz] putlinmat(6, globval.Ascr, Ascr_map); Ascr_map += globval.CODvect; @@ -5160,7 +5160,8 @@ void get_alphac2(void) Comments: change the initial coorinates from (0 0 0 0 delta 0) to - (x_co,px_co,y_co,py_co,delta,0). + (x_co,px_co,y_co,py_co,delta,0). i.e., track + around the off-momentum close orbit but not zero orbit. *******************************************************************/ @@ -5194,7 +5195,7 @@ void get_alphac2(void) cod = getcod(delta[n-1], lastpos); x = globval.CODvect; - + Cell_Pass(0, globval.Cell_nLoc, x, lastpos); alphac[n-1] = x[ct_]/Cell.S; // this is not mcf but DT/T -- GitLab