A simulation of a CdTe gamma ray detector based on collection efficiency profiles as determined by lateral IBIC