Recent Changes - Search:

Public

Physics

Engineering

Literature
Journal Club
People

MineralPET
DAQ

Computing

Africa


Root

The ROOT System Home Page

Root is a Data Analysis System based on an Object Oriented approach (albeit an old fashioned one), which allows tackling much more complex data structure compared to what was possible to do with PAW. One of its major selling points is its use of C++ also for the interactive command line, so that Root scripts quite easily translate into full-fledged compiled programs. It is widely used in the HEP community. See also the Wikipedia:ROOT page.

Go4 is an advanced GUI for Root that uses the QT library. Aside from being useful for the advanced Online/Offlline use it was designed for, it is easier for the beginner, as its standard-style GUI offers a more menu-driven approach. It also includes a much improved fitting interface.
On the Scientific Linux PCs of the PSI Group we always try have installed the latest stable versions of Root and Go4. You can type rpm -q root to check which version is installed.

Usage

ROOT is available (along with a lot of other HEP software) as part of the LCG release on CVMFS. CVMFS is installed on the cluster and office workstation machines but see here to set up on other machines. To set up a release use e.g.: source /cvmfs/sft.cern.ch/lcg/views/setupViews.sh LCG_104 x86_64-ubuntu2204-gcc11-opt

It's also installed locally on most machines and is included via /etc/profile. Note you can hide the banner by starting the interpreter as root -l. Put alias root='root -l' in your ~/.bash_profile to do this by default.

The rootbrowse utility is useful to start a TBrowser with a given root TFile right from the command line.

To revert from the new web-based TBrowser(ROOT::RBrowser) to the old GUI TBrowser(TRootBrowser), make a ~/.rootrc file with the content: Browser.Name: TRootBrowser

Python and ROOT

Since many are unhappy with the CINT/C++ interactive interface of ROOT, some alternatives are emerging, and PyROOT seems the most popular. Python is an Object Oriented language like C++, but it is less verbose and easier for a novice, safer since it does not use pointers, and unlike C++ it was designed as an interpreted language, so it is much better suited for scripting and interactive use.

ROOT and DAQ

Download Root from ROOT Home Page

Install (from source)

We are currently using version 6.26.06 (as of 02.02.23).

  1. Before starting, make sure you have the all the ROOT Ubuntu22 dependencies:
    1. sudo apt-get install dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev python3 libssl-dev git (Required)
    2. sudo apt-get install gfortran libpcre3-dev xlibmesa-glu-dev libglew-dev libftgl-dev libmariadb-dev libfftw3-dev libcfitsio-dev \\
      graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python3-dev libxml2-dev libkrb5-dev libgsl0-dev qtwebengine5-dev
      (Optional)
  2. Download and guidelines found at: https://root.cern/install/build_from_source/
  3. Setting up
    1. In /opt/ make a ROOT folder, then within this:
    2. sudo tar -xzvf ~/Downloads/ root-{X}.source.tar.gz where {X} is the version number.
    3. Make folders for the build and install (e.g. root-{X}_build for the build directory of ROOT version {X})
  4. Building the install
    1. Open the build folder
      1. sudo ccmake ../ root-{X} this opens the cmake configure menu.
      2. Configure (c)
      3. Exit (e)
      4. Change the CMAKE_INSTALL_PREFIX field to the install directory path (e.g. /opt/ROOT/root-{X}_install)
      5. Change CMAKE_BUILD_TYPE to RelWithDebInfo
      6. Configure (c)
      7. Generate (g), should exit the cmake menu
    2. sudo make -jN
      1. Where N is the number of cores on the PC.
      2. Geant4 will be installed, which took ~1hr on Wolf and Loki (8 cores each).
    3. sudo make install
  5. Finishing up and testing
    1. Open the /bin/ folder within the install directory.
    2. . thisroot.sh
    3. root just to check ROOT is working
    4. To make the root command available to all users that don't have their own set-up:
      1. Edit /etc/profile to add (replacing /opt/root/root_install as appropriate):
root() {
    which root || source /opt/root/root_install/bin/thisroot.sh
    unset root rootbrowse
    root $@
}
rootbrowse() {
    which root || source /opt/root/root_install/bin/thisroot.sh
    unset root rootbrowse
    rootbrowse $@
}

Sergio - I don't really like many things about Root (see Data Analysis), but it seems to be the only reasonably complete data analysis system available at the moment. At least the license problem has been solved - Root is now released under the LGPL.

Install ROOT inside Ubuntu inside Windows Subsystem for Linux (WSL)

Edit - History - Print - Recent Changes - Search
Page last modified on March 28, 2024, at 01:45 pm