getlikelihood function

To get likelihood of the tree