University of Heidelberg

Statistical Methods in Particle Physics - Tools and Documentation

N. Berger (exercises)

Lecture home page

We will work on the CIP pool at the KIP, which you can access with your standard URZ account In order to work on these machines, you should master basic command line skills on an unix-like machine. You will also have to use an editor to write code, something with syntax highlighting is always nice, but what you use is of course a matter of taste. Some of the more popular choices are
  • VIM: If you do not really like to use the mouse, like cryptic keyboard commands and want something that runs anywhere, using a minium of resources.
  • Emacs: If you like to use the mouse occasionally, like even more cryptic keyboard commands and want something that does everything from email to psychiatry. My personal editor of choice, even tough I always forget which buttons to press and have to refer to the reference card.
  • Nedit: If you are looking for an editor that behaves as expected (especially if you come from Windows), even if you do not learn a single new keyboard shortcut
We will be using the root data analysis framework developed at CERN. Whilst this is not the most elegant piece of C++ code ever written, it is the de facto standard in particle physics and embodies almost any functionality you can think of, from grid computing to graphical user interfaces. We will mainly be using histograms; the first exercise session will mainly be an introduction to root. Some more resources here: On the CIP pool machines root is installed in /opt/root-5.28/, thus to start root, you either type /opt/root-5.28/bin/root, which becomes tedious after a while, thus I suggest you adapt your environment by setting in either .profile or .bashrc in your homedirectory:
export ROOTSYS=/opt/root-5.28
export PATH=$PATH:/opt/root-5.28/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/root-5.28/lib
after that, root should start with just typing root.

Root is written in C++ and also uses C++ as a script language. You do not need to be an accomplished OO programmer to use root (rather to the contrary), but some basic knowledge of C++ certainly helps.If you need to brush up your C++ skills a bit, you could check out If you really want to learn object oreinted programming in C++, there are quite a few good books, podcasts and websites out there - ask me in class. If you think that C++ is not a good scripting language (I am with you there), you can also use the PyROOT interface to use Root from Python, for this you will need some additional changes in your environemt settings:
export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH
For more infornmation on Python and PyROOT, start from the following websites:
Webmaster:
IT Department