The photoinduced charge transfer mechanism in aligned and unaligned carbon nanotubes