function orbit = getcod(THERING, DP)
% GETCOD Closed Orbit Distortion
% GETCOD(THERING,DP) finds closed orbit for a given momentum 
% deviation DP. It calls FINDORBIT4 which assumes a lattice
% with NO accelerating cavities and NO radiation
%
% By Jianfeng Zhang @ LAL, 10/2013
% Modified to get 6D COD
%

if nargin < 1
	global THERING
end
if nargin < 2
    DP = 0.0;
end

%localspos = findspos(THERING,1:length(RING)+1);
orbit = findorbit4(THERING,DP,1:length(THERING)+1);
%orbit = findorbit6(THERING,DP,1:length(THERING)+1);
