Commit 78c2f177 authored by Andrea Tugores's avatar Andrea Tugores
Browse files

atlas-data folder

parent 9f436801
%% Cell type:markdown id: tags:
<CENTER><img src="http://opendata.atlas.cern/DataAndTools/pictures/ATLASOD.gif" style="width:50%"></CENTER>
%% Cell type:markdown id: tags:
<CENTER><h1> Analysis Techniques used in Experimental Particle Physics</h1></CENTER>
%% Cell type:markdown id: tags:
<p style='text-align: justify;'>
A set of pp collision data has been released by the ATLAS Collaboration to the public for educational purposes. The general aim of the 13 TeV ATLAS Open Data and tools released is to provide a straightforward interface to replicate the procedures used by high-energy-physics researchers and enable users to experience the analysis of particle physics data in educational environments.
</p>
Let's take a current ATLAS Open Data sample and create histograms.
%% Cell type:markdown id: tags:
### Import some Python packages
<p style='text-align: justify;'>
The OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system-dependent functionality.It is possible to automatically perform many operating system tasks. The OS module provides functions for creating and removing a directory (folder), fetching its contents, changing and identifying the current directory, etc.
</p>
<p style='text-align: justify;'>
The datetime module supplies classes for manipulating dates and times. These classes provide a number of functions to deal with dates, times and time intervals. Date and datetime are an object in Python, so when you manipulate them, you are actually manipulating objects and not string or timestamps.
</p>
<p style='text-align: justify;'>
With PyROOT, ROOT’s Python-C++ bindings, you can use ROOT from Python. PyROOT is HEP’s entrance to all C++ from Python, for example, for frameworks and their steering code. The PyROOT bindings are automatic and dynamic: no pre-generation of Python wrappers is necessary. With PyROOT you can access the full ROOT functionality from Python while benefiting from the performance of the ROOT C++ libraries.
</p>
TMath encapsulate most frequently used Math functions. NB. The basic functions Min, Max, Abs and Sign are defined in TMathBase.
%% Cell type:code id: tags:
``` python
import os
import datetime
import ROOT
from ROOT import TMath
```
%% Cell type:markdown id: tags:
<p style='text-align: justify;'>
One of the classes defined in the datetime module is datetime class. Its a combination of date and time along with the attributes year, month, day, hour, minute, second, microsecond, and tzinfo. We then used now() method to create a datetime object containing the current local date and time.
</p>
<p style='text-align: justify;'>
os.popen(): This method opens a pipe to or from command. The return value can be read or written depending on whether mode is ‘r’ or ‘w’. The mode parameter is not required, if not provided, the default "r" is taken for the mode.
</p>
%% Cell type:code id: tags:
``` python
starttime = datetime.datetime.now()
myCmd = os.popen('date').read()
print(myCmd)
```
%% Output