fix the logic of readout window and add histogram to plot fraction of OOT hits