Heterojunction and nanostructured photovoltaic device: theory and experiment