Theory of trap-controlled transient photoconduction