A Tracking System for the Recognition of Long Term Events in Surveillance Videos