In [1]:
from IPython.display import Image
Image(filename='images/cern_cms_endon.jpg',width=400)
Out[1]:
The CMS detector is designed to measure the properties of particles produced in the collisions of high energy protons at the LHC.
The CMS detector is made of many. many sub-detectors and when the particles are created in each proton-proton collision, they fly through these detectors and we are able to measure in which direction all these particles went.
In [2]:
from IPython.display import Image
Image(filename='images/small_cms1.png',width=400)
Out[2]:
These types of displays of the detector can be challenging to understand and at the end of the day, it's not what we scientists actually analyze. We use this information to get the electric charge, energy, and momentum of these particles, and that's about it.
Let's go take a look at some of that data!
The first step is to import some helper functions. One is to get the collisions data out of the files, and the other is to display the particles that are produced in these collisions.
In [3]:
import sys
sys.path.append("../tools/")
import cms_tools as cms
Next, we will open the file and pull out the collision data. This will return a Python list of all the collisions in that file.
You can use these data to visualize individual collisions or to perform a data analysis on all the collisions.
In [4]:
infile = open('../data/small_cms_test_file.dat')
collisions = cms.get_collisions(infile)
number_of_collisions = len(collisions)
print("# of proton-proton collisions: %d" % (number_of_collisions))
import matplotlib.pylab as plt
%matplotlib notebook
# Uncomment the following line if you want your plots to be displayed in a separate interactive window.
#%pylab qt
Let's take a look at some of these collisions!
In [7]:
cms.display_collision3D(collisions[3])
In [6]:
cms.display_collision3D(collisions[3])
In [7]:
cms.display_collision3D(collisions[6])