Determination of the neutrino mass hierarchy with a new statistical method