For the amorphization/recrystallization process, random coordinates are computed to specify the volume which is hit by an implanted carbon ion. The two random numbers corresponding to the $x$ and $y$ coordinates are generated with a uniform probability distribution, $p(x)dx=dx \textrm{, } p(y)dy=dy$. The random number corresponding to the $z$ coordinate is distributed according to the linear approximated nuclear stopping power, $p(z)dz=(a_{el} \times z+b_{el})dz$, where $a_{el}$ and $b_{el}$ are simulation parameters describing the nuclear energy loss. After calculating the local probability of amorphization of that volume $p_{c \rightarrow a}$, another random number decides, depending on the current state, whether the volume gets amorphous or recrystallized. This step is looped for the average hit per ion in the simulation window, counted by TRIM collision data.
For the amorphization/recrystallization process, random coordinates are computed to specify the volume which is hit by an implanted carbon ion. The two random numbers corresponding to the $x$ and $y$ coordinates are generated with a uniform probability distribution, $p(x)dx=dx \textrm{, } p(y)dy=dy$. The random number corresponding to the $z$ coordinate is distributed according to the linear approximated nuclear stopping power, $p(z)dz=(a_{el} \times z+b_{el})dz$, where $a_{el}$ and $b_{el}$ are simulation parameters describing the nuclear energy loss. After calculating the local probability of amorphization of that volume $p_{c \rightarrow a}$, another random number decides, depending on the current state, whether the volume gets amorphous or recrystallized. This step is looped for the average hit per ion in the simulation window, counted by TRIM collision data.