Implemented cdef method to detectHits in main pyx file