Code for the CERN pixel test beam