Photon Tracking Code: Calc New dx, dy, dz after 1st Scatter

In summary, the conversation discusses the challenges in tracking photons with multiple scatters in a program and how to calculate the new direction of the photon after each scatter. The speaker suggests using equations for Compton Scattering or a Monte Carlo simulation to determine the new dx, dy, and dz values. They also recommend looking at similar problems in robotics for helpful approaches.
  • #1
Uranium
24
0
Hello all,

I'm working on coding a program that tracks photons based on Compton Scattering. However, I'm having an issue on how to deal with photons with multiple scatters. So, phi (polar) and theta (azimuthal) range from 0-pi/2 and 0-2pi, respectively, based on a random number generator. How do I calculate the new dx, dy, and dz after the first scatter. I guess I'm just not sure how to represent the incident vector and its effect on the vector after collision.
 
Engineering news on Phys.org
  • #2
If I understand correctly your problem how to determine the position of the new vector in the original coordinate frame?

IE, you have a particle with moving with vector (Vx,Vy,Vz) (or alternatively (V,theta,phi)) in the original frame. This particle then interacts by scattering causing it to change direction. The scattering angle is measured from the incident vector and this needs to be represented in the original frame.

The only way I know how to do this is to use transformation matrices which can get messy pretty quickly. I've done similar problem for my robotics class in the pass, you may find it useful to look at the problem from a similar way.
Try starting with this link:
http://commons.bcit.ca/math/examples/robotics/linear_algebra/index.html
 
  • #3
Hi there,

It sounds like you're working on a really interesting project! Dealing with multiple scatters can definitely be tricky, but there are a few things you can try to calculate the new dx, dy, and dz after the first scatter.

One approach is to use the scattering angle to calculate the new direction of the photon after the scatter. This can be done using the equations for Compton Scattering, which relate the incident and scattered photon angles to the energy and momentum of the photon.

Another approach is to use a Monte Carlo simulation, where you randomly generate the scattering angles for each scatter and track the photon's path using those angles. This can give you a more accurate representation of the scattering process, but it may require more computational power.

I hope this helps! Good luck with your project.
 

1. What is a photon tracking code?

A photon tracking code is a computer program used in scientific research to simulate the behavior of photons, which are particles of light. These codes are used in fields such as medical imaging, nuclear physics, and astrophysics.

2. What does "Calc New dx, dy, dz after 1st Scatter" mean in a photon tracking code?

This phrase refers to calculating the new direction of a photon's path after it has scattered, or changed direction, for the first time. In a photon tracking code, this calculation is necessary to accurately simulate the behavior of photons as they interact with matter.

3. Why is it important to track photons in scientific research?

Tracking photons allows scientists to understand how light behaves and interacts with matter. This information is crucial in fields such as medical imaging, where accurately tracking photons can help improve diagnostic imaging techniques and treatments.

4. How does a photon tracking code work?

A photon tracking code uses mathematical algorithms and simulations to track the path of photons as they interact with matter. These codes take into account factors such as the properties of the material the photon is passing through, the angle of incidence, and the type of interaction (such as scattering or absorption).

5. Can a photon tracking code be used for any type of photon?

Yes, a photon tracking code can be used for different types of photons, including visible light, X-rays, and gamma rays. The code may need to be adjusted for different types of photons, as the interactions and behaviors may vary depending on the energy level and wavelength of the photon.

Similar threads

Replies
1
Views
572
Replies
2
Views
3K
  • Programming and Computer Science
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
265
Replies
1
Views
6K
  • Advanced Physics Homework Help
Replies
1
Views
2K
  • Advanced Physics Homework Help
Replies
1
Views
2K
  • Calculus
Replies
12
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
0
Views
2K
Back
Top