<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Lifetimes
<h3>Learning goals</h3>
<ul>
    <li>Relativistic kinematics.
    <li>Standard model particles.
    <li>Special Relativity.
</ul>
<b>Background</b>
Every type of particle has different characteristics. They each have different masses, lifetimes, decay methods and many other properties. 
To find the distance a particle travels in one lifetime, you need to know the lifetime of the particle and the speed of the particle. Classically, the formula to find the distance travelled in one lifetime is $ d= vt. $ Where $v$ is the speed of light and $t$ is the time the particle lives before it decays. 
However, in many particle physics experiments, the particles are moving close to (but always less than!) the speed of light and this means that they experience time dilation, which means their internal clocks run more slowly. 
Suppose a particle lives for the length of time equal to its mean lifetime. This quantity is defined in the particle's rest frame, which means that the time that we measure in the lab (in our particle physics experiment) is generally longer. The really useful quantity we are looking for is the flight-length
Step1:  <h3>Particles</h3>
<ul>
<li>$\mu^\pm$
    <li>$\tau^\pm$
    <li>$\pi^\pm$
    <li>$\pi^0$
    <li>$\rho^0$
    <li>$K^\pm$
    <li>$K^0_{\rm short}$
    <li>$K^0_{\rm long}$
    <li>$K^*(892)$
    <li>$D^\pm$
    <li>$B^\pm$
    <li>$B0$
    <li>$J/ \psi$
    <li>$\Upsilon(1S)$
    <li>proton
    <li>neutron
    <li>$\Delta^+$
    <li>$\Lambda^0$
    <li>$\Lambda_c$
</ul>
<h2><font color="red">Challenge!</font></h2>
Finish the table for every particle listed above with an output of the particle's name, the lifetime, the mass,  the momentum, and how far they travel in one lifetime assuming a momentum of 1 GeV/c, 10 GeV/c, and 100 GeV/c. You may need the following relativistic relationships. 
$$\vec{\beta} = \frac{\vec{pc}}{E} \qquad \qquad E^2 = (mc^2)^2 + (pc)^2$$
Step2:  The scale of many modern physics detectors ranges from the order of centimeters to 10's of meters. Given that information, what particles do you think will actually live long enough to travel <i>through</i> parts of the detector?
Step3:  Which particles will decay (on average) before they reach the detectors? This means that these particles have to be reconstructed from their decay products.
Step4:  Make a plot where the x-axis is the names of the above particles (or a number corresponding to each, where the number/particle relationship is clearly identified) and the y-axis is the lifetime of the particle. Color code the data points according to whether the primary decay is EM, weak, or strong. {\it Do not plot the proton and neutron on this plot}. Do you see the "pattern"? You may need to use a log-scale for the y-axis.
<ASSISTANT_TASK:>
Python Code:
particles = ["B+/-","D+/-","J/Psi"]
lifetimes = [1.64e-12,1.4e-12,7e-21]
c = 3e8 # m/s
v = c
for p,l in zip(particles,lifetimes):
    distance = v*l
    print "%-5s  lifetime=%4.2e s     distance traveled=%4.2e m" % (p,l,distance)
Explanation: Lifetimes
<h3>Learning goals</h3>
<ul>
    <li>Relativistic kinematics.
    <li>Standard model particles.
    <li>Special Relativity.
</ul>
<b>Background</b>
Every type of particle has different characteristics. They each have different masses, lifetimes, decay methods and many other properties. 
To find the distance a particle travels in one lifetime, you need to know the lifetime of the particle and the speed of the particle. Classically, the formula to find the distance travelled in one lifetime is $ d= vt. $ Where $v$ is the speed of light and $t$ is the time the particle lives before it decays. 
However, in many particle physics experiments, the particles are moving close to (but always less than!) the speed of light and this means that they experience time dilation, which means their internal clocks run more slowly. 
Suppose a particle lives for the length of time equal to its mean lifetime. This quantity is defined in the particle's rest frame, which means that the time that we measure in the lab (in our particle physics experiment) is generally longer. The really useful quantity we are looking for is the flight-length: the distance the particle travels between the time it is created and the time it decays. This flight-length is longer in the lab, because of the time dilation effect. The distance measured in the lab is the mean free path and is given by
$$d = \gamma \beta c \tau$$
where $\beta = v/c$ and $\gamma = \frac{1}{\sqrt{1-\beta^2}}$.
<b>Let's code!</b>
Here is a sample code that creates a table of the lifetime and distance traveled in one lifetime for three different particles, but the distance is calculated incorrectly.
End of explanation
# Your code here
Explanation: <h3>Particles</h3>
<ul>
<li>$\mu^\pm$
    <li>$\tau^\pm$
    <li>$\pi^\pm$
    <li>$\pi^0$
    <li>$\rho^0$
    <li>$K^\pm$
    <li>$K^0_{\rm short}$
    <li>$K^0_{\rm long}$
    <li>$K^*(892)$
    <li>$D^\pm$
    <li>$B^\pm$
    <li>$B0$
    <li>$J/ \psi$
    <li>$\Upsilon(1S)$
    <li>proton
    <li>neutron
    <li>$\Delta^+$
    <li>$\Lambda^0$
    <li>$\Lambda_c$
</ul>
<h2><font color="red">Challenge!</font></h2>
Finish the table for every particle listed above with an output of the particle's name, the lifetime, the mass,  the momentum, and how far they travel in one lifetime assuming a momentum of 1 GeV/c, 10 GeV/c, and 100 GeV/c. You may need the following relativistic relationships. 
$$\vec{\beta} = \frac{\vec{pc}}{E} \qquad \qquad E^2 = (mc^2)^2 + (pc)^2$$
End of explanation
# Your code here
Explanation: The scale of many modern physics detectors ranges from the order of centimeters to 10's of meters. Given that information, what particles do you think will actually live long enough to travel <i>through</i> parts of the detector?
End of explanation
# Your code here
Explanation: Which particles will decay (on average) before they reach the detectors? This means that these particles have to be reconstructed from their decay products.
End of explanation
# Your code here
Explanation: Make a plot where the x-axis is the names of the above particles (or a number corresponding to each, where the number/particle relationship is clearly identified) and the y-axis is the lifetime of the particle. Color code the data points according to whether the primary decay is EM, weak, or strong. {\it Do not plot the proton and neutron on this plot}. Do you see the "pattern"? You may need to use a log-scale for the y-axis.
End of explanation
<END_TASK>