You appear to be treating fs in somewhat casual fashion. If fs = 1e5, then for a 1 sec pulse duration the number of samples N is also 1e5. But for any other pulse length that is not true. The code below uses sample length N, because fft and ifft make use of the sample length but know nothing about fs.
The 'signalfiltered' waveform differs from the data by a factor of 1e5 and another factor of 2.
 1e5: fft and ifft are inverses of each other, so that ifft(fft(signal)) = signal. If you use sigfourier = fft(signal)/N as you did, then the ifft has to be multiplied by N to get back to the time waveform.
 sigfourier contains both positive and negative frequencies. The filtering process you used captured the positive frequencies but not the negative ones, which are up close to the top end of the frequency plot. Including both positve and negative frequencies in ifft gives a cosine waveform with the correct amplitude. From
cos(2*pi*f0*t) = (1/2)*(exp(2*pi*i*f0*t) + exp(-2*pi*i*f0*t))
you can see that neglecting the negative frequencies gives a complex wave of amplitude 1/2, and taking the real part gives (1/2)*cos(2*pi*f0*t).
I made some sample data but did not include any noise because the noise is not germane to the scaling. The code below shows the original code in fig(1) and the code with the rescaled variables in fig(2).
data = 4.5*cos(2*pi*f0*t);
sigfourier = fft(data)/N;
newfourier = sigfourier.*vec;
signalfiltered = real(ifft(newfourier));
positions2 = [10:60 N-60:N-10];
newfourier2 = sigfourier.*vec;
signalfiltered2 = N*real(ifft(newfourier2));