BUG: fixed bugs in the likelihood calculation for the inhomogeneous primary trajectory and now the tests pass and the Monte Carlo likelihood ratio gives more reasonable numbers