function objScore = objectivefun3(sodaPar,mStatesNOKF,mConstants)

presHead_1_1_1 = 1;
presHead_15_7_1 = 105;


if ~strcmp(sodaPar.stateNamesNOKF{presHead_1_1_1},'presHead1Old(1,1)')
    error('wrong variable')
end

if ~strcmp(sodaPar.stateNamesNOKF{presHead_15_7_1},'presHead1Old(15,7)')
    error('wrong variable')
end    


if ~isequal(sodaPar.obsPoints{1,2},mConstants{3,2}')
    error('wrong times')
end

presHeadSim = mStatesNOKF(:,presHead_1_1_1:presHead_15_7_1);
presHeadObs = mConstants{1,2};

Dev = presHeadObs-presHeadSim;

objScore = sqrt(mean(Dev(:).^2));
