NIEL+depth+SIME

hello someone .
would you mind give me some advice about NIEL as function of depth of Si?
recently, i try to slice the phantom, however it not correct compared by SRIM output , so i think maybe my code is not correct, and the extract data method is bad, so , i want to know how to code??