The code is very complicated and is missing all documentation. https://github.com/JeffersonLab/coatjava/blob/b819adeecfc57ae24649af20d6afc4f93bece731/reconstruction/alert/src/main/java/org/jlab/rec/ahdc/Distance/Distance.java#L12