Influence of electrical defects on diamond detection properties