Rings finder algorithm for modular rich detector