Determination of mass hierarchy with medium baseline reactor neutrino experiments