- #1

Mr rabbit

- 26

- 3

I'm trying to simulate the process of charged particles attenuation in matter (like this) by a montecarlo-metropolis algorithm in Python. I thought that I could use for the number of particles at thickness ##x## the formula ## N (x) = N_0 e^{-\mu x} ##, so the probability in this case will be the exponential. What is left is easy.

This is the first approximation, but is not full precise. I want more: I want to consider the energy loss by collisions with the atoms of the medium and the bremsstrahlung, but only the first thing by now. I think I need to use the Bethe-Bloch formula

## \displaystyle S = -\frac{dE}{dx} = \frac{4 \pi}{m_e c^2} \frac{n z^2}{\beta ^2} \left( \frac{e^2}{4 \pi \epsilon _0} \right) ^2 \left[ \ln{\left( \frac{2 m_e c^2 \beta ^2}{I (1-\beta ^2)} \right)} -\beta ^2 \right] ##

But I don't know how. I mean: I want to plot the tracks of the incident particles like in the animation I show at the top of the post, but how can I relate the energy loss with the trajectory of the particle? Maybe solving ## \displaystyle E = 1/2 m \left( \frac{d \vec{r}}{dt} \right) ^2 ##? What formula or formulas does Geant4 use?

Thank you.