DUE September 9

Notebooks and Reproducible Research

  1. Use the homework problem that follows this one to create an R notebook which details its solution and which should include:
    • text, in full sentences, describing your work,
    • equations both in-line and in display mode,
    • code used to perform calculations, viewable in the html output,
    • plot(s) of results, with the code used to produce them hidden from the output,
    • in-line output of a variable value generated from within the embedded code. (e.g., something like “We see that x = 4.56”, but where the value 4.56 is the output of code within the document…)
  2. Verify that previewing and saving the notebook (SmplCalcs.Rmd, for instance) produces an html document (SmplCalcs.nb.html, for instance) that can be viewed with a web browser, and that the original code (found in SmplCalcs.Rmd) can be downloaded directly from the web browser rendition of the notebook html document.
  3. Email your notebook’s html document (SmplCalcs.nb.html, for instance) to Prof. Syphers at msyphers at niu.edu. All future exercises should be performed in a similar fashion throughout the course.

Simple Calcs and Plots

  1. From the relativistic definition of momentum, \(p = \gamma mv\), show that the change in kinetic energy of a moving particle is \(\Delta W = \Delta\gamma \;mc^2\) and hence deduce that its total energy is \(E=\gamma mc^2\) and \(W = (\gamma-1)mc^2\). (Hint: look at 1-D problem, and integrate force x distance.)
  2. Produce a formula for \(\beta = v/c\) vs. \(W\) and produce a single plot of \(\beta\) vs \(W\) from 0 to 1000 MeV with curves for an electron, a muon, a proton and a uranium ion (\(_{238}\)U\(^{+90}\)).

  3. Find expressions for
    1. \(\Delta v/v\) for a given \(\Delta p/p\), and
    2. \(\Delta p/p\) for a given \(\Delta W/W\).
  4. Create a Gaussian distribution of 2000 proton kinetic energies with central value 200 MeV and rms energy spread of 1 MeV and create a histogram of the distribution; next, calculate the velocity for each proton above and create a histogram of the velocity distribution; how do the relative standard deviations of these two distributions compare? (i.e., \((\sqrt{\langle(W-\langle W\rangle)^2\rangle}/\langle W\rangle\), for example.) Is the value what you expect? (Explain.)

  5. In the same or similar plots, overlay normal curves on top of the histograms with the mean and standard deviation of the distributions.

Charge-to-Mass Selection

Positively charged ions are emitted from a source, emerging through a potential difference of \(V_0\). The kinetic energy of each particle is thus \(qV_0\), where \(q\) is the charge of the ion. The particles are then directed through a “velocity selector”, a device made up of electric and magnetic fields, \(E\) and \(B\), at right angles to each other such that when the values of these fields are tuned properly, particles travel through the device without deflection of their trajectory.

  1. If the electric field of the Selector is \(E_0\) = \(100\) kV/m and the magnetic field of the Selector is \(B_0\) = 0.05 T, what is the velocity relative to the speed of light (\(\beta = v/c\)) of the particles that travel straight through the Selector?

  2. Next, the magnetic field of the Selector is turned off. The particles entering are now deflected solely by the uniform electric field, \(E_0\). If the length of the field region is \(\ell\), show that upon exit from the Selector the particles leave at an angle of deflection given by \[\tan\theta = \frac{1}{2} \frac{E_0 \ell}{V_0}.\]
  3. If \(\ell\) = 0.15 m, and \(V_0\) = 62 kV, at what angle do the particles emerge at the end of the Selector?

  4. Estimate by how much the particle’s energy is changed after passing through the Selector with the magnet turned off.

  5. If, instead, the electric field is turned off and the magnetic field is left on at its original value of \(B_0\), the particle trajectory through the field region will be circular. Show that the radius of curvature of the trajectory will be \[ R = \frac{2V_0}{E_0}. \]
  6. By what angle will the particle leave the Selector with the magnetic field on and the electric field off?
  7. Estimate by how much the particle’s energy is changed after passing through the Selector with the electric field turned off.

  8. If the ions have charge state \(Q = q/e\) and atomic mass \(A = m/m_u\), where \(m_uc^2\) = 931 MeV is the rest mass of the nucleon, then show that \[ \frac{Q}{A} = \frac12 \frac{m_uc^2}{eV_0} \left(\frac{E_0}{cB_0}\right)^2 = \; \frac12 \frac{m_uc^2}{eV_0} \; (v/c)^2. \]
  9. For our parameters above, what must be the value of \(Q/A\) for the ions? If we believe the ions to be those of Potassium atoms, what charge state most likely comprises the beam?

Beam Distributions

The file inputBeam.dat contains information of 20,000 protons produced from a particle tracking code. Each line in the file contains the final phase space coordinates of a proton at the end of a beam line: transverse coordinates \(x\) and \(y\) in mm, momentum components \(p_x\), \(p_y\) and \(p_z\) in MeV/c, and the time of arrival \(dt\), in seconds, relative to an ideal particle’s time of arrival. The file can be read in as a “data frame” using R, for example.

  1. Use the file to generate a display of the horizontal and vertical transverse phase space distributions as heat maps, or density plots.

  2. Calculate the Courant-Snyder parameters and rms emittances that best represent the distribution in both the horizontal and vertical dimensions. Neglect dispersion effects for this calculation. (Note: Are there any strong correlations between the longitudinal parameters of the particles?)

  3. From the result above, make a heat map of \(\alpha x + \beta x'\) vs. \(x\) for the vertical distribution. What fraction of the particles are within the rms emittance of the beam? What fraction of the particles are within 6 times the rms emittance?

  4. Assume that the distribution drifts downstream a distance of 5 m. Show the phase space distributions at this new location, and re-compute the Courant-Snyder parameters and rms emittances. Discuss the changes you observe.