function outStruct = idGetGeomParamForUndSOLEIL(idName)
%This should be updated for each new undulator
 
outStruct.sectLenBwBPMs = 2.*3.14155; %[m] straight section length between BPMs
outStruct.idCenPos = 1.333; %[m] center longitudinal position of the ID with respect to the straight section center
outStruct.idLen = 1.8; %[m] ID length
outStruct.idKickOfst = 0.2; %[m] offset from ID edge to effective position of a "kick"
outStruct.indUpstrBPM = 54; %absolute index of BPM at the upstream edge of the straight section where the ID is located
outStruct.indRelBPMs = [8 1;8 2]; %relative indexes of upstream and downstream BPMs of the straight section where the ID is located

if strncmp(idName, 'WSV50', 3)
    %To be checked by Chams and Pascale B.
	outStruct.sectLenBwBPMs = 2.4; %[m] straight section length between BPMs
	outStruct.idCenPos = 0; %[m] center longitudinal position of the ID with respect to the straight section center
	outStruct.idLen = 2; %[m] ID length
	outStruct.idKickOfst = 0.1; %[m] offset from ID edge to effective position of a "kick"
    outStruct.indUpstrBPM = 19; % absolute index of BPM at the upstream edge of the straight section where the ID is located
    outStruct.indRelBPMs = [3 5;3 6];
end

if strncmp(idName, 'U20', 3)
    %To be checked by Chams and Pascale B.
	outStruct.sectLenBwBPMs = 2.4; %[m] straight section length between BPMs
	outStruct.idCenPos = 0; %[m] center longitudinal position of the ID with respect to the straight section center
	outStruct.idLen = 2; %[m] ID length
	outStruct.idKickOfst = 0.1; %[m] offset from ID edge to effective position of a "kick"

    if strcmp(idName, 'U20_PROXIMA1')
        outStruct.indUpstrBPM = 71; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.indRelBPMs = [10 5;10 6];
    elseif strcmp(idName, 'U20_SWING')
        outStruct.indUpstrBPM = 79; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.indRelBPMs = [11 5;11 6];
    elseif strcmp(idName, 'U20_CRISTAL')
        outStruct.indUpstrBPM = 41; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.indRelBPMs = [6 5;6 6];
    elseif strcmp(idName, 'U20_SIXS')
        outStruct.indUpstrBPM = 101; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.indRelBPMs = [14 5;14 6];        
    elseif strcmp(idName, 'U20_GALAXIES')
        outStruct.indUpstrBPM = 49; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.indRelBPMs = [7 5;7 6];        
    end
elseif strncmp(idName, 'U24', 3)
    %To be checked by Chams and Pascale B.
	outStruct.sectLenBwBPMs = 2.*3.14155; %2.4; modified the 12/11/08 % [m] straight section length between BPMs, modified the 12/11/08
	outStruct.idCenPos = 0; %[m] center longitudinal position of the ID with respect to the straight section center
	outStruct.idLen = 2; %[m] ID length
	outStruct.idKickOfst = 0.1; %[m] offset from ID edge to effective position of a "kick"

    if strcmp(idName, 'U24_PROXIMA2-A')
        outStruct.indUpstrBPM = 75; % absolute index of BPM at the upstream edge of the straight section where the ID is located
% position de l'onduleur a determiner par Olivier
        outStruct.idCenPos = 1.52; % 1.8; modified the 12/11/08 %[m] center longitudinal position of the ID with respect to the straight section center
%------------------------------------------------
        outStruct.indRelBPMs = [11 5;11 6];
    elseif strcmp(idName, 'Uxx_PROXIMA2-B')
        outStruct.indUpstrBPM = 75; % absolute index of BPM at the upstream edge of the straight section where the ID is located
 % position de l'onduleur a determiner par Olivier
        outStruct.idCenPos = -1.360 ; %-1.8; modified the 12/11/08; %[m] center longitudinal position of the ID with respect to the straight section center
%------------------------------------------------
        outStruct.indRelBPMs = [11 5;11 6];
    end
elseif strncmp(idName, 'HU80', 4)
    outStruct.sectLenBwBPMs = 2.*3.14155; %[m] straight section length between BPMs
    outStruct.idCenPos = 1.3325;% 1.333; modified the 12/11/08 %[m] center longitudinal position of the ID with respect to the straight section center
    outStruct.idLen = 1.8; %[m] ID length
    outStruct.idKickOfst = 0.2; %[m] offset from ID edge to effective position of a "kick"

    if strcmp(idName, 'HU80_TEMPO')
        outStruct.indUpstrBPM = 53; %absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = 1.3325; % modified the 12/11/081.333; %[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [8 1;8 2];
    elseif strcmp(idName, 'HU80_PLEIADES')
        outStruct.indUpstrBPM = 23; %absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = -1.83; % modified the 12/11/08 -1.8; %[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [4 1;4 2];
     elseif strcmp(idName, 'HU80_SEXTANTS')
        outStruct.indUpstrBPM = 97; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = -1.8; %[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [14 1;14 2];
    end
   % elseif strcmp(idName, 'HU80_MICROFOC')
   %     outStruct.indUpstrBPM = 97; % absolute index of BPM at the upstream edge of the straight section where the ID is located
   %     outStruct.idCenPos = -1.8; %[m] center longitudinal position of the ID with respect to the straight section center
   %     outStruct.indRelBPMs = [14 1;14 2];
   % end
elseif strncmp(idName, 'HU52', 4)
    outStruct.sectLenBwBPMs = 2.*3.14155; %[m] straight section length between BPMs
    outStruct.idCenPos =  1.3325; % modified the 12/11/08 1.333; %[m] center longitudinal position of the ID with respect to the straight section center
    outStruct.idLen = 1.8; %[m] ID length
    outStruct.idKickOfst = 0.2; %[m] offset from ID edge to effective position of a "kick"

    if strcmp(idName, 'HU52_DEIMOS')
        outStruct.indUpstrBPM = 45; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = 0.0; %[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [7 1;7 2];
    elseif strcmp(idName, 'HU52_LUCIA')
        outStruct.indUpstrBPM = 113; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = 0; %[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [16 1;16 2];
    end
elseif strncmp(idName, 'HU44', 4)
    outStruct.sectLenBwBPMs = 2.*3.14155; %[m] straight section length between BPMs
    outStruct.idCenPos = 1.3325; % modified the 12/11/08 1.333; %[m] center longitudinal position of the ID with respect to the straight section center
    outStruct.idLen = 1.8; %[m] ID length
    outStruct.idKickOfst = 0.2; %[m] offset from ID edge to effective position of a "kick"

    if strcmp(idName, 'HU44_MICROFOC')
        outStruct.indUpstrBPM = 97; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = 0; %[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [14 1;14 2];
    elseif strcmp(idName, 'HU44_TEMPO')
        outStruct.indUpstrBPM = 53; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = 0.4165; % modified the 12/11/08 -0.4165; %[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [8 1;8 2];
    end
elseif strncmp(idName, 'HU36', 4)
    outStruct.sectLenBwBPMs = 2.9686; %[m] straight section length between BPMs
    outStruct.idLen = 1.65; %[m] ID length
    outStruct.idKickOfst = 0.2; %[m] offset from ID edge to effective position of a "kick"

    if strcmp(idName, 'HU36_SIRIUS')
        outStruct.indUpstrBPM = 111; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = 0; %[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [15 5;15 6];
    end
elseif strncmp(idName, 'HU42', 4)
    outStruct.sectLenBwBPMs = 2.*3.14155; %[m] straight section length between BPMs
    outStruct.idCenPos =  1.3325; % modified the 12/11/08 1.333; %[m] center longitudinal position of the ID with respect to the straight section center
    outStruct.idLen = 1.8; %[m] ID length
    outStruct.idKickOfst = 0.2; %[m] offset from ID edge to effective position of a "kick"

    if strcmp(idName, 'HU42_HERMES')
        outStruct.indUpstrBPM = 67; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = 0.0; %[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [10 1;10 2];
    elseif strcmp(idName, 'HU42_xxx')
        outStruct.indUpstrBPM = 113; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = 0; %[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [16 1;16 2];
    end
elseif strncmp(idName, 'HU60', 4)
    outStruct.sectLenBwBPMs = 2.*3.14155; %[m] straight section length between BPMs
    outStruct.idCenPos = 1.333; %[m] center longitudinal position of the ID with respect to the straight section center
    outStruct.idLen = 1.8; %[m] ID length
    outStruct.idKickOfst = 0.2; %[m] offset from ID edge to effective position of a "kick"

    if strcmp(idName, 'HU60_CASSIOPEE')
        outStruct.indUpstrBPM = 105; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = -1.80; %[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [15 1;15 2];
    elseif strcmp(idName, 'HU60_ANTARES')
        outStruct.indUpstrBPM = 83; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.idCenPos = -1.83; % modified the 12/11/08 -1.80; % a verifier lors de l'installation[m] center longitudinal position of the ID with respect to the straight section center
        outStruct.indRelBPMs = [12 1;12 2];
    end

elseif strncmp(idName, 'HU256', 5)
    outStruct.sectLenBwBPMs = 2.*3.14155; %[m] straight section length between BPMs
    outStruct.idCenPos = 0.8945; %[m] center longitudinal position of the ID with respect to the straight section center
    outStruct.idLen = 3.392; %[m] ID length
	outStruct.idKickOfst = 0; %[m] offset from ID edge to effective position of a "kick"
    if strcmp(idName, 'HU256_CASSIOPEE')
        outStruct.indUpstrBPM = 105; %absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.indRelBPMs = [15 1;15 2];
    elseif strcmp(idName, 'HU256_PLEIADES')
        outStruct.indUpstrBPM = 23;
        outStruct.indRelBPMs = [4 1;4 2];
    elseif strcmp(idName, 'HU256_ANTARES')
        outStruct.indUpstrBPM = 83;
        outStruct.indRelBPMs = [12 1;12 2];
    end
elseif strcmp(idName, 'HU640_DESIRS')
    %To be checked by Olivier and Pascale B.
	outStruct.sectLenBwBPMs = 11.318; %to check ! [m] straight section length between BPMs
    outStruct.idCenPos = 0; %[m] center longitudinal position of the ID with respect to the straight section center
    outStruct.idLen = 10.4; %to check ! [m] ID length
    outStruct.idKickOfst = 0.32; %[m] offset from ID edge to effective position of a "kick"
	outStruct.indUpstrBPM = 30; %absolute index of BPM at the upstream edge of the straight section where the ID is located
	outStruct.indRelBPMs = [5 1;5 2];
elseif strcmp(idName, 'U18_TOMO')
    outStruct.sectLenBwBPMs = 4.267; %[m] straight section length between BPMs
	outStruct.idCenPos = 3.3062; %[m] center longitudinal position of the ID with respect to the straight section center
	outStruct.idLen = 2; %[m] ID length
	outStruct.idKickOfst = 0.1; %[m] offset from ID edge to effective position of a "kick"   
    outStruct.indUpstrBPM = 92; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.indRelBPMs = [13 9;13 2];
elseif strcmp(idName, 'U20_NANO')
    outStruct.sectLenBwBPMs = 4.3062; %[m] straight section length between BPMs
	outStruct.idCenPos = 3.373; %[m] center longitudinal position of the ID with respect to the straight section center
	outStruct.idLen = 2; %[m] ID length
	outStruct.idKickOfst = 0.1; %[m] offset from ID edge to effective position of a "kick"   
    outStruct.indUpstrBPM = 92; % absolute index of BPM at the upstream edge of the straight section where the ID is located
        outStruct.indRelBPMs = [13 9;13 2];        
end
