MCF momentum compaction factor MCF(RING) calculates momentum compaction factor of RING MCF(RING,DPP) computes the momentum compaction for off-momentum DPP
0001 function a = mcf(RING,dp0) 0002 %MCF momentum compaction factor 0003 % MCF(RING) calculates momentum compaction factor of RING 0004 % 0005 % MCF(RING,DPP) computes the momentum compaction for off-momentum DPP 0006 0007 if nargin < 2, dp0=0; end 0008 ddp = 0.000001; 0009 fp0 = findorbit4(RING,dp0); 0010 fp = findorbit4(RING,dp0+ddp); 0011 % Build initial condition vector that starts 0012 % on the fixed point 0013 X0dP = fp; 0014 X0dP(5) = ddp; 0015 X0dP(6) = 0; 0016 0017 X0 = [fp0;0;0]; 0018 0019 % Track X0 for 1 turn 0020 T = ringpass(RING,[X0 X0dP]); 0021 % Calculate alpha 0022 RingLength = findspos(RING,length(RING)+1); 0023 a = (T(6,2)-T(6,1))/(ddp*RingLength); 0024