Exercise 3
In this exercise, you will simulate an experiment designed to measure the lifetime of an unstable particle X. A beam of X particles is produced with a known average momentum and injected into a vacuum chamber.
Each X particle will travel some distance into the chamber before decaying at the "decay vertex", rutx . The charged daughter particle is then detected by four tracking stations, located at various distances (zstn ) along the beam line. Each tracking station measures the position where the track hits the station, rhit .
The coordinate system used is shown in the diagram, where the beam is produced at the origin and the average beam momentum is in the z-direction.
You will simulate the production and decay of particle X, as well as detection of its daughter particle. Each part of the exercise below deals with a different part of the experiment, for which you will generate random numbers with a specified distribution. You will then verify the desired distribution is indeed produced - here a qualitative assessment is adequate, but a quantitative one is preferrable.
Use of simulation allows you to study the impact of different experimental choices, and your code should be
capable of running with an arbitrary set of parameters. However, you can assume the initial set of parameters below :
· X mean lifetime, τ = 2.5ms
· Mean X velocity, μ u = 2000ms−1 · Std dev X velocity, σu = 50ms−1
· Tracking station positions, zstn = 30, 35, 40, 45m · Tracking hit resolution, σrx,ry = 0.01m
It is strongly recommended that you use 3D vectors throughout the exercises, using numpy arrays, and numpy functions for vector algebra.
Extensions
A variety of extensions are possible to this exercise, drawing on some of the topics already covered in the unit. A few ideas are given below. Please discuss any extension with the unit director before starting work.
· Reconstructing the vertex location from the hit positions
· Extracting the lifetime of the X particle from reconstructed vertex positions · Optimal placement of tracking stations
Remember
· You are expected to use numpy and scipy libraries where appropriate.
· You should run each cell in order from the top of the notebook; there is no need to repeat code between cells
· Use the "refresh kernel" button to reset everything and start again
· Make sure your notebook runs fully & without errors from a fresh kernel before submitting it
Part 1 - Beam Generation
First, you should simulate the production of X particles in the beam. Each particle in the beam will have a velocity in the z-direction, that is drawn from a normal distribution with mean μpz and standard deviation σpz . The particle should decay after a time that is drawn from an exponential distribution with mean lifetime τ . Given the velocity and the decay time, the decay position in the lab frame can then be calculated. You can assume the beam is non-relativistic.
In the cell below, write functions to simulate the beam velocity, the decay time, and the decay vertex.
In [ ]:
In the next cell, test your functions, and verify that they have the desired distributions.
In [ ]:
Part 2 - Daughter Particle
Now simulate the direction of the decay product, which should be isotropic in the rest frame of the beam particle. This is the same as generating points on the surface of a unit sphere, with uniform probability over the solid angle dΩ . This can be achieved in spherical coordinates, by generating the two angles, φ and θ . These should not have uniform distributions, since the area element is given by :
dΩ = sin(θ)dφdθ
To obtain uniform probability over the sphere, you should generate φ with a uniform distribution between 0 and 2π, and θ with a distribution proportional to sin θ .
Notes
· we will assume the direction in the lab frame is equivalent to the direction in the beam particle rest
frame. This is a valid approximation, provided the daughter particle has much higher momentum than the beam particle.
· we will assume the daughter moves in a straight line, which means we do not need to compute its momentum, ie. the direction vector is a unit vector.
In [ ]:
As for Part 1, in the next cell, test your functions and verify the desired distributions are produced.
In [ ]:
Part 3 - Propagation to Tracking Stations
The nextstep is to propagate the daughter particle to the tracking detectors. We can assume the particle takes a straight line path from the decay vertex. Since the tracking stations are at fixed values of z, the propagation is most easily performed by writing the path as two functions, giving the x andy coordinates as function of z :
x(z) = mx z + cx y(z) = my z + cy
The gradients mx = dz/dx and my = dz/dy be computed directly from the components of the the
daughter particle direction vector, udtr .
The intercepts cx and cy, can then be found by solving the straight line equations given the (x, y, z) coordinates of the decay vertex, rutx .
In [ ]:
In the next cell, test your track propagation functions. (A qualitative assessment is acceptable here) .
In [ ]:
Part 4 - Hit Smearing
The tracking detectors are not perfect, and will measure position with finite resolution. This can be simulated by adding offsets (in x and y directions) to the true hit position, where the offsets are drawn from a normal distribution with a mean of zero and a standard deviation equal to the resolution of the detector.
This process is known as smearing.
You should write a function which takes the true hit positions and smears them according to the detector resolution, to produce the reconstructed (or measured) hit positions.
In [ ]:
Again, you should test your code to verify that the desire distributions are indeed produced.
In [ ]:
Part 5 - Experiment Simulation
Now you are ready to simulate the full experiment. You should produce a large sample of events. For each event, generate a beam particle, a daughter particle, and finally the true and smeared hits.
Given a sample of events, it is possible to compute a range of parameter distributions that will inform. the design of the experiment. You should present at least the following distributions :
· The number of hit tracking stations
· The 2D (x,y) distribution of measured hits on each of the four stations
In [ ]:
Part 6 - Summary
In the Markdown cell below, describe how your code solves the problem set. State any equations used in the solution and how they were obtained. Include your reasons for any libraries you used, as well as any particular programming techniques. Explain your choice of any test cases. Finally, state any salient features of the results you obtained. You are not expected to write more than about 400-500 words.