Skip to content
Yacine Haddad edited this page Apr 26, 2016 · 8 revisions

ROOT is a high energy physics analysis framework, which most of us have a love - hate relationship with.

Links

  • This page has some useful tips and tricks for working with ROOT, from plotting and fitting to outputting files: http://home.fnal.gov/~kalanand/roottips.html
  • PyROOT is a python module which allows you to access ROOT functionality from within python. This gives you the beauty of the python interpreter coupled with the power of ROOT. For large data processing however the performance is far worse, and compiled ROOT remains the best choice. See http://root.cern.ch/drupal/content/pyroot

Tips

  • The value which ROOT refers to as the RMS is in fact the Standard Deviation, see here.
  • By default the points in a TGraph are editable by the mouse. That is, if you idly click on your graph you may move a point without realising it. This can be stopped by setting graph->SetEditable(kFALSE).
  • Be careful not to confuse a TH2 (a 2 dimensional histogram) with a TGraph. They may look very similar when drawn, but they are quite different (the former bins the data, the latter does not).
  • Be aware that drawing 2d histograms (TH2) with the scatter option does not put markers in the exact location of the corresponding entry, but instead puts the marker at a random location within the limits of the bin.
  • You can control what stats appear in the histogram stats box by using the command gStyle->SetOptStat(), for example gStyle->SetOptStat(111111) displays underflow and overflow information as well as the default information. gStyle is automatically available in CINT, and can be accessed from compiled C++ by including the TFile.h header file.

Plotting in Jupyter-notebook

Clone this wiki locally