Where can I find source code of Beam tracing?

Hi everyone,

I am writing code of beam tracing and I really need some source code for better understanding.

Do you know where I can find such code?

Thanks.