Optimize the processBaselinePlot method. Before getting the projection, adjust the plot range in order to reduce the size of the histogram it projects. Furthermore, only calculate the mean, mean error and RMS once.