%% Advanced LIGO H1 Optical layout
%
% These value are identical to D0902838-v2
%  
% Units are included in the definitions
% High reflector coatings (HR) are here called T = 10 ppm
% Where D0902838-v2 is incomplete,  the value is NaN
%
% Also included is a list of optic names in "OpticNames". Use to find the index
%      of a specific optic,  Eg. for MC3 do:  strmatch('MC3', OpticNames);
%
%  SJW & PF  May 19, 2010

%% units
mm = 1e-3;
m  = 1;
deg = 1;
ppm = 1e-6;
percent = 1e-2;
kg = 1;

%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Mode Cleaner
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% MC1
layout(1).name        = 'MC1';
layout(1).position    = [-20072 255 -108.3] * mm;
layout(1).ROC         = inf;
layout(1).waist       = 2.12 * mm;
layout(1).wedge       = 0.5 * deg;
layout(1).orientation = 'horizontal';
layout(1).diameter    = 150 * mm;
layout(1).thickness   = 75 * mm;
layout(1).mass        = 2.9 * kg;
layout(1).T           = 0.6 * percent;
layout(1).suspension  = 'triple';


% MC2
layout(2).name        = 'MC2';
layout(2).position    = [-3833.1 487.4 -98.2] * mm;
layout(2).ROC         = 27.24 * m;
layout(2).waist       = 3.37 * mm;
layout(2).wedge       = 0.5 * deg;
layout(2).orientation = 'horizontal';
layout(2).diameter    = 150 * mm;
layout(2).thickness   = 75 * mm;
layout(2).mass        = 2.9 * kg;
layout(2).T           = 10 * ppm;
layout(2).suspension  = 'triple';

% MC3
layout(3).name        = 'MC3';
layout(3).position    = [-20072 719.9 -108.3] * mm;
layout(3).ROC         = inf * m;
layout(3).waist       = 2.12 * mm;
layout(3).wedge       = 0.5 * deg;
layout(3).orientation = 'horizontal';
layout(3).diameter    = 150 * mm;
layout(3).thickness   = 75 * mm;
layout(3).mass        = 2.9 * kg;
layout(3).T           = 0.6 * percent;
layout(3).suspension  = 'triple';

%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Input Optics
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% SM1
layout(4).name        = 'SM1';
layout(4).position    = [NaN NaN NaN] * mm;
layout(4).ROC         = inf;
layout(4).waist       = NaN * mm;
layout(4).wedge       = NaN * deg;
layout(4).orientation = '';
layout(4).diameter    = NaN * mm;
layout(4).thickness   = NaN * mm;
layout(4).mass        = NaN * kg;
layout(4).T           = NaN * ppm;
layout(4).suspension  = '';

% PMMT1
layout(5).name        = 'PMMT1';
layout(5).position    = [NaN NaN NaN] * mm;
layout(5).ROC         = 12.8 * m;
layout(5).waist       = 2.2 * mm;
layout(5).wedge       = NaN * deg;
layout(5).orientation = '';
layout(5).diameter    = NaN * mm;
layout(5).thickness   = NaN * mm;
layout(5).mass        = NaN * kg;
layout(5).T           = NaN * ppm;
layout(5).suspension  = '';

% Faraday
layout(6).name        = 'Faraday';
layout(6).position    = [NaN NaN NaN] * mm;
layout(6).ROC         = 12.8 * m;
layout(6).waist       = 2.2 * mm;
layout(6).wedge       = NaN * deg;
layout(6).orientation = '';
layout(6).diameter    = NaN * mm;
layout(6).thickness   = NaN * mm;
layout(6).mass        = NaN * kg;
layout(6).T           = NaN * ppm;
layout(6).suspension  = '';

% PMMT2
layout(7).name        = 'PMMT2';
layout(7).position    = [NaN NaN NaN] * mm;
layout(7).ROC         = -6.24 * m;
layout(7).waist       = 1.8 * mm;
layout(7).wedge       = NaN * deg;
layout(7).orientation = '';
layout(7).diameter    = NaN * mm;
layout(7).thickness   = NaN * mm;
layout(7).mass        = NaN * kg;
layout(7).T           = NaN * ppm;
layout(7).suspension  = '';

% SM2
layout(8).name        = 'SM2';
layout(8).position    = [NaN NaN NaN] * mm;
layout(8).ROC         = inf;
layout(8).waist       = NaN * mm;
layout(8).wedge       = NaN * deg;
layout(8).orientation = '';
layout(8).diameter    = NaN * mm;
layout(8).thickness   = NaN * mm;
layout(8).mass        = NaN * kg;
layout(8).T           = NaN * ppm;
layout(8).suspension  = '';


%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Power Recycling Cavity
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% PRM
layout(9).name        = 'PRM';
layout(9).position    = [-20191.1 -654 -104.9] * mm;
layout(9).ROC         = -11.0 * m;
layout(9).waist       = 2.2 * mm;
layout(9).wedge       = 0.6 * deg;
layout(9).orientation = 'ThickDown';
layout(9).diameter    = 150 * mm;
layout(9).thickness   = 75 * mm;
layout(9).mass        = 2.9 * kg;
layout(9).T           = 3 * percent;
layout(9).suspension  = 'triple';

% PR2
layout(10).name        = 'PR2';
layout(10).position    = [-3588 -530.7 -91.8] * mm;
layout(10).ROC         = -4.555 * m;
layout(10).waist       = 6.2 * mm;
layout(10).wedge       = 1 * deg;
layout(10).orientation = 'ThickDown';
layout(10).AOI         = 0.748 * deg;
layout(10).diameter    = 150 * mm;
layout(10).thickness   = 75 * mm;
layout(10).mass        = 2.9 * kg;
layout(10).T           = 250 * ppm;
layout(10).suspension  = 'triple';

% PR3
layout(11).name        = 'PR3';
layout(11).position    = [-9740 -172.1 -99.2] * mm;
layout(11).ROC         = 36.0 * m;
layout(11).waist       = 54 * mm;
layout(11).wedge       = 0.6 * deg;
layout(11).orientation = 'ThickDown';
layout(11).AOI         = 0.608 * deg;
layout(11).diameter    = 265 * mm;
layout(11).thickness   = 101.4 * mm;
layout(11).mass        = 12 * kg;
layout(11).T           = 10 * ppm;
layout(11).suspension  = 'triple';


%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Signal Recycling Cavity
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% SRM
layout(12).name        = 'SRM';
layout(12).position    = [304.8 -19858.8 -123.9] * mm;
layout(12).ROC         = -5.6938 * m;
layout(12).waist       = 2.1 * mm;
layout(12).wedge       = 1 * deg;
layout(12).orientation = 'ThickDown';
layout(12).diameter    = 150 * mm;
layout(12).thickness   = 75 * mm;
layout(12).mass        = 2.9 * kg;
layout(12).T           = 20 * percent;
layout(12).suspension  = 'triple';

% SR2
layout(13).name        = 'SR2';
layout(13).position    = [-619.7 -4160.4 -111.6] * mm;
layout(13).ROC         = -6.427 * m;
layout(13).waist       = 8.2 * mm;
layout(13).wedge       = 1 * deg;
layout(13).orientation = 'ThickDown';
layout(13).AOI         = 0.748 * deg;
layout(13).diameter    = 150 * mm;
layout(13).thickness   = 75 * mm;
layout(13).mass        = 2.9 * kg;
layout(13).T           = 10 * ppm;
layout(13).suspension  = 'triple';

% SR3
layout(14).name        = 'SR3';
layout(14).position    = [-172.4 -19614.8 -99.1] * mm;
layout(14).ROC         = -36.0 * m;
layout(14).waist       = 54 * mm;
layout(14).wedge       = 0.6 * deg;
layout(14).orientation = 'ThickDown';
layout(14).AOI         = 0.608 * deg;
layout(14).diameter    = 265 * mm;
layout(14).thickness   = 101.4 * mm;
layout(14).mass        = 12 * kg;
layout(14).T           = 10 * ppm;
layout(14).suspension  = 'triple';



%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Interferometer
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% BS
layout(15).name        = 'BS';
layout(15).position    = [-201.5 -183.5 -83.8] * mm;
layout(15).ROC         = inf * m;
layout(15).waist       = 53 * mm;
layout(15).wedge       = 0.04 * deg;
layout(15).orientation = 'Thick+X+Y';
layout(15).diameter    = 370 * mm;
layout(15).thickness   = 60 * mm;
layout(15).mass        = 14 * kg;
layout(15).T           = 50 * percent;
layout(15).suspension  = 'triple';

%% X Arm
% CPX
layout(16).name        = 'CPX';
layout(16).position    = [4796.1 -200 -80] * mm;
layout(16).ROC         = inf * m;
layout(16).waist       = 53 * mm;
layout(16).wedge       = 0.04 * deg;
layout(16).orientation = 'Thick-Y';
layout(16).diameter    = 340 * mm;
layout(16).thickness   = 130 * mm;
layout(16).mass        = 26 * kg;
layout(16).T           = 1.00;
layout(16).suspension  = 'quad';

% ITMX
layout(17).name        = 'ITMX';
layout(17).position    = [5001.1 -200 -80] * mm;
layout(17).ROC         = 1934 * m;
layout(17).waist       = 53 * mm;
layout(17).wedge       = 0.08 * deg;
layout(17).orientation = 'ThickDown';
layout(17).diameter    = 340 * mm;
layout(17).thickness   = 200 * mm;
layout(17).mass        = 40 * kg;
layout(17).T           = 1.4 * percent;
layout(17).suspension  = 'quad';

% ETMX
layout(18).name        = 'ETMX';
layout(18).position    = [3999501 -200 -80] * mm;
layout(18).ROC         = 2245 * m;
layout(18).waist       = 62 * mm;
layout(18).wedge       = 0.08 * deg;
layout(18).orientation = 'ThickDown';
layout(18).diameter    = 340 * mm;
layout(18).thickness   = 200 * mm;
layout(18).mass        = 40 * kg;
layout(18).T           = 5 * ppm;
layout(18).suspension  = 'quad';

% ERMX
layout(19).name        = 'ERMX';
layout(19).position    = [NaN NaN NaN] * mm;
layout(19).ROC         = inf * m;
layout(19).waist       = NaN * mm;
layout(19).wedge       = NaN * deg;
layout(19).orientation = '';
layout(19).diameter    = 340 * mm;
layout(19).thickness   = 130 * mm;
layout(19).mass        = 26 * kg;
layout(19).T           = 1.00;
layout(19).suspension  = 'quad';


%% Y Arm
% CPY
layout(20).name        = 'CPY';
layout(20).position    = [-200 4796.3 -80] * mm;
layout(20).ROC         = inf * m;
layout(20).waist       = 53 * mm;
layout(20).wedge       = 0.04 * deg;
layout(20).orientation = 'Thick-X';
layout(20).diameter    = 340 * mm;
layout(20).thickness   = 130 * mm;
layout(20).mass        = 26 * kg;
layout(20).T           = 1.00;
layout(20).suspension  = 'quad';

% ITMY
layout(21).name        = 'ITMY';
layout(21).position    = [-200 5001.3 -80] * mm;
layout(21).ROC         = 1934 * m;
layout(21).waist       = 53 * mm;
layout(21).wedge       = 0.08 * deg;
layout(21).orientation = 'ThickDown';
layout(21).diameter    = 340 * mm;
layout(21).thickness   = 200 * mm;
layout(21).mass        = 40 * kg;
layout(21).T           = 1.4 * percent;
layout(21).suspension  = 'quad';

% ETMY
layout(22).name        = 'ETMY';
layout(22).position    = [ -200 3999501.3 -80] * mm;
layout(22).ROC         = 2245 * m;
layout(22).waist       = 62 * mm;
layout(22).wedge       = 0.08 * deg;
layout(22).orientation = 'ThickDown';
layout(22).diameter    = 340 * mm;
layout(22).thickness   = 200 * mm;
layout(22).mass        = 40 * kg;
layout(22).T           = 5 * ppm;
layout(22).suspension  = 'quad';

% ERMY
layout(23).name        = 'ERMY';
layout(23).position    = [NaN NaN NaN] * mm;
layout(23).ROC         = inf * m;
layout(23).waist       = NaN * mm;
layout(23).wedge       = NaN * deg;
layout(23).orientation = '';
layout(23).diameter    = 340 * mm;
layout(23).thickness   = 130 * mm;
layout(23).mass        = 26 * kg;
layout(23).T           = 1.00;
layout(23).suspension  = 'quad';

%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Index of names
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

[OpticNames{1:length(layout)}] = deal(layout.name);