We study the problem of determination of the sign of Delta m^2_{31}, or the
neutrino mass hierarchy, through observations of atmospheric neutrinos in
future detectors. We consider two proposed detector types :
(a) Megaton sized water Cerenkov detectors, which can measure the survival
rates of nu_\mu + \bar{\nu}_\mu and nu_e + \bar{\nu}_e and (b) 100 kton sized
magnetized iron detectors, which can measure the survival rates of \nu_\mu and
\bar{\nu}_\mu. For energies and path-lengths relevant to atmospheric neutrinos,
these rates obtain significant matter contributions from P_{\mu e}, P_{\mu \mu}
and P_{ee}, leading to an appreciable sensitivity to the hierarchy. We do a
binned \chi^2 analysis of simulated data in these two types of detectors which
includes the effect of smearing in neutrino energy and direction and
incorporates detector efficiencies and relevant statistical, theoretical and
systematic errors. We also marginalize the \chi^2 over the allowed ranges of
neutrino parameters in order to accurately account for their uncertainties.
Finally, we compare the performance of both types of detectors vis a vis the
hierarchy determination.Comment: 36 pages, 13 figures, revised version accepted in Physical Review