Add code example to process_events

Add example code for process_events
Fix example for coincidences