Energy window stochastic density functional theory