Professional Documents
Culture Documents
ps. ROOT also has an interactive prompt. just type root and enter it!!! (.q to quit)
Lets step forward for
variables of single value and example of single value
list.
example of list
TMath.Sqrt(x):
TMath.Power(x,y): #
f1
f2
I prepared a pyROOT version of
this example. (split.py)
Please use plot that is from h1.Draw(pe)
Try to use the TF1 to fit.
Here, python file (.py) or interactive python interface
Hint:
TH1D(name, hist title;x-axis title;y-axis title, n_bins, min, max)
TRandom.Poisson(mean)
.SetFillColor(..)
TH2F(name, title,n_xbin, xmin,xmax,n_ybin,ymin,ymax)
Save the histogram that you created!!
Open a TFile to save into file.
After opening file,
use Write() function to save what you want
Close the TFile
Try in Draw()
1. add selection:y>3.0, z<2
2. draw x vs y (2D plot)
3. draw x vs z (2D plot)
option (C++ version)
Run maketree.py
Open the file in the TBrowser (in interactive interface of python)
Create plots clicking on the leaves
Read contents in the tree
tree_dump1.py or try tree_dump2.py
Read contents in the tree
or try tree_dump2.py
Other resources
official course: https://root.cern.ch/courses