Optimization of virtual Frisch-grid CdZnTe detector