Algorithms for Automatically Reconstructing CSPAD Geometry