Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
Tutorials

A collection of C++ macros, Python scripts and notebooks helping to learn ROOT by example.

You can execute the scripts in $ROOTSYS/tutorials (or sub-directories) by setting your current directory in the script directory or from any user directory with write access.

Several tutorials create new files. If you have write access to the tutorials directory, the new files will be created in the tutorials directory, otherwise they will be created in the user directory.

You can start by executing the standard ROOT demos with a session like:

root > .x demos.C

or

root > .x $ROOTSYS/tutorials/demos.C

You can execute the standard ROOT graphics benchmark with

root > .x benchmarks.C

or

root > .x $ROOTSYS/tutorials/benchmarks.C

Get started

If you have never used ROOT before and don’t know where to start, we recommend that you first explore the ROOT introductory course. You can also watch the recording of the course, but you should follow the material along on your PC. You also may want to have a look at the documentation of these modules:

The $ROOTSYS/tutorials directory includes several sub-directories:

Modules

 Histograms tutorials
 Examples showing the "histograms' classes" usage.
 
 Data analysis tutorials
 Various examples of data analysis workflows.
 
 Visualisation tutorials
 All examples related to visually representing the data, including graphs, event displays, web graphics, GUIs and more.
 
 Experimental API tutorials
 Various examples showing the experimental API.
 
 Event generation tutorials
 Examples showing event generation with pythia and Monte Carlo.
 
 RooFit Tutorials
 These tutorials illustrate the main features of RooFit: the name of the examples and their short description help in figuring out their objective.
 
 HTTP tutorials
 Examples showing the HTTP interface.
 
 IO tutorials
 These tutorials illustrate some of the capabilities of the ROOT IO subsystem, including TTree, RNTuple, SQL and XML.
 
 Math tutorials
 Examples showing the Math classes.
 
 Multicore tutorials
 These examples aim to illustrate the multicore features of ROOT, such as thread awareness and safety, multithreading and multiprocessing.
 
 RooStats Tutorials
 These tutorials illustrate the main features of RooStats.
 
 Machine Learning tutorials
 Examples showing how to use Machine Learning from ROOT.
 
 Geometry tutorials
 Examples showing how to make use of geometry classes in ROOT.
 
 Legacy tutorials
 Legacy Tutorials.
 

Files

file  demos.C
 This macro shows a control bar to run some of the ROOT tutorials.
 
file  demos.py
 To run, do "python <path-to>/demos.py".
 
file  demoshelp.C
 This macro shows help on running the Demos.
 
file  demoshelp.py
  View in nbviewer Open in SWAN
Display demo help.
 
file  hsimple.C
  View in nbviewer Open in SWAN
This program creates :
 
file  hsimple.py
  View in nbviewer Open in SWAN
This program creates :
 
file  rootlogoff.C
 Example of rootlogoff.C.
 
file  rootlogon.C
 Example of rootlogon.C.