Made analyze.cpp to work which finds the distribution of iterations per event.