This notebook provides a way to download data files using the Python requests library. You'll need to have this library installed on your system to do any work.

The first thing we do is import some local helper code that allows us to to download a data file(s), given the url(s).

We also define where those data files can be found.

Make sure you execute the cell below before trying download any of the CLEO or CMS data!


In [3]:
import pps_tools as pps

#pps.download_drive_file()
#pps.download_file()

All of the data files for Particle Physics Playground are currently hosted in this Google Drive folder. To download them, you will need the download_drive_file function, which takes the file name (with proper file ending) as an argument, and downloads it as a file of the same name to the 'data' directory included when you cloned Playground.

The download_file function can be used to download files from the web that aren't on Google Drive. This function takes a url address as an argument. Though this functionality is provided, it should be unnecessary for all of the included activities.

CLEO data

Here is a list of Monte Carlo (MC) and data files from CLEO. The MC files are for specific decays of $D$ mesons, both charged and neutral. For any given file, there are always (CHECK THIS!!!!!!) two D mesons produced. One decays according to the measured branching fractions, and the other decays through a very specific process. The specific decay is in the name of the file. For example,

Single_D0_to_Kpi_LARGE.dat

would be simulating the following process:

$$e^+e^- \rightarrow D^0 \bar{D}^0$$$$D^0 \rightarrow \textrm{standard decays}$$$$\bar{D^0} \rightarrow K^- \pi^+$$

where the $D^0$ and $\bar{D}^0$ can be exchanged.


In [ ]:
cleo_MC_files = ['Single_D0B_to_KK_ISR_LARGE.dat',
'Single_D0B_to_Kenu_ISR_LARGE.dat',
'Single_D0B_to_Kpipi0_ISR_LARGE.dat',
'Single_D0B_to_Kstenu_ISR_LARGE.dat',
'Single_D0B_to_phigamma_ISR_LARGE.dat',
'Single_D0B_to_pipi_ISR_LARGE.dat',
'Single_D0_to_KK_ISR_LARGE.dat',
'Single_D0_to_Kenu_ISR_LARGE.dat',
'Single_D0_to_Kpi_LARGE.dat',
'Single_D0_to_Kpipi0_ISR_LARGE.dat',
'Single_D0_to_Kstenu_ISR_LARGE.dat',
'Single_D0_to_phigamma_ISR_LARGE.dat',
'Single_D0_to_pipi_ISR_LARGE.dat',
'Single_Dm_to_Kpipi_ISR_LARGE.dat',
'Single_Dp_to_Kpipi_ISR_LARGE.dat']

cleo_data_files = ['data31_100k_LARGE.dat']

Download the data here!

The snippet below can be used to download as much or as little of the extra data as you like. It is currently commented now and is set up to download the first two CLEO MC files, but you can edit it to grab whatever data you like.

Have fun!


In [ ]:
'''
for filename in cleo_MC_files[0:2]:      
    pps.download_drive_file(filename)
''';

CMS data

CMS dimuon data


In [ ]:
cms_data_files = ['dimuons_100k.dat']

In [ ]:
'''
pps.download_drive_file(cms_data_files[0])
''';

CMS data for top-quark reconstruction exercise


In [ ]:
cms_top_quark_files = ['data.zip',
                       'ttbar.zip',
                       'wjets.zip',
                       'dy.zip',
                       'ww.zip',
                       'wz.zip',
                       'zz.zip',
                       'single_top.zip',
                       'qcd.zip']

In [ ]:
'''
for filename in cms_top_quark_files[0:2]:
    pps.download_drive_file(filename)
''';

BaBar data


In [ ]:
babar_data_files = ['basicPID_R24-AllEvents-Run1-OnPeak-R24-38.hdf5',
                    'basicPID_R24-AllEvents-Run1-OnPeak-R24-388.hdf5',
                    'basicPID_R24-AllEvents-Run1-OnPeak-R24-1133.hdf5',
                    'basicPID_R24-AllEvents-Run1-OnPeak-R24-1552.hdf5',
                    'basicPID_R24-AllEvents-Run1-OnPeak-R24-1694.hdf5',
                    'basicPID_R24-AllEvents-Run1-OnPeak-R24-1920.hdf5',
                    'basicPID_R24-AllEvents-Run1-OnPeak-R24-2026.hdf5',
                    'basicPID_R24-AllEvents-Run1-OnPeak-R24-2781.hdf5',
                    'basicPID_R24-AllEvents-Run1-OnPeak-R24-2835.hdf5']

In [ ]:
'''
for filename in babar_data_files[0:2]:
    pps.download_drive_file(filename)
''';