%Fig_6_2.m
%real (blue) and imaginary (red) conductivity
%Drude dielectric
%
clear all;
clf;
t=cputime;
eye=complex(0.,1.); %square root of -1
%plotting parameters + fontsizes
clear all;
clf;

FS      = 18;	%label fontsize 18
FSN     = 16;	%number fontsize 16
LW      = 2;	%linewidth

% Change default axes fonts.
set(0,'DefaultAxesFontName', 'Times New Roman')
set(0,'DefaultAxesFontSize', FSN)

% Change default text fonts.
set(0,'DefaultTextFontname', 'Times New Roman')
set(0,'DefaultTextFontSize', FSN)
hbar=['\fontname{MT Extra}h\fontname{Times New Roman}'];

echarge=1.60219e-19;    %electron charge [C]
m0     =9.10956e-31;    %bare electron mass [kg]
meff   =1.01*m0;        %effective electron mass in Cu [kg]
nelectrons=8.46e28;     %electron density in Cu [m^-3]
sigma0 =5.9e7;          %DC conductity of Cu at room temperature [S m^-1]

tau   = sigma0*meff/(nelectrons*(echarge^2));%scattering time [s]

omegamin=2*pi*100e6;
omegamax=2*pi*30e12;

npoints=3000;
omega=linspace(omegamin,omegamax,npoints);	%frequency [rad s^-1]

omega2tau2=omega.^2*tau^2;

sigma1=(sigma0./(1+omega2tau2));
sigma2=(sigma0*tau.*omega)./(1+omega2tau2);

ttl=['\sigma_{0} = ',num2str(sigma0,'%3.2e'),' S m^{-1}, \it{n}\rm = ',...
    num2str(nelectrons/1e28,'%3.2f'),'\times10^{28} m^{-3}, \tau = ',...
    num2str(tau*1e15,'%2.0f'),' fs'];
figure(1);
plot(omega./(2e12*pi),sigma1./sigma0,'b','LineWidth',LW);  %plot real part 
hold on;
%grid on;
plot(omega./(2e12*pi),sigma2./sigma0,'r','LineWidth',LW);  %plot imag part
xlabel('Frequency,  \it{f}\rm (THz)')
ylabel('\sigma/\sigma_0(\omega)')
axis([0,omegamax/(2e12*pi),0,1.1])

title(ttl);
hold off