refactored hmc_base to use const refs for params_r and params_i instead of pointers. Shifted order of arguments.