codes for FNAL test beam data analysis