Fixed some issues. Refs #8655.

Including but not restricted to
1. Adding TOF correction to sample;
2. Considering the situation that events are not recorded in time order;
3. Some debug information.