Fix averaging in StarNPointGainAnalysis
A small bug prevented the ABC-averaged fits from working properly. Basically was using the wrong value to index into a std::vector
.
I also rearranged the averaging loops to make things a bit more intuitive to read.