Pricing barrier options when the dynamics of the prices are driven by the mean reverting process