physics analysis code