View
217
Download
3
Category
Preview:
Citation preview
Sept 11, 2003ROOT Day1, Suzanne
Panacek 39
ROOTAn object oriented HEP
analysis framework.
Day 1
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
The ROOT Team
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
ROOT contacts at Fermi
Philippe Canal , x2545pcanal@fnal.gov
Suzanne Panacek, x8334spanacek@fnal.gov
1. Jeff Kallenbach, x22101. jeffk@fnal.gov
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Mailing Lists the ROOT mailing list:roottalk@root.cern.ch archives:http://root.cern.ch/root/roottalk/
AboutRootTalk.html Fermilab mailing list:about-root@fnal.gov archives:http://listserv.fnal.gov/archives/about-root.html
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Class Schedule - Day 1 Overview of the ROOT Framework GUI basics Command line basics Finding Information (class
reference guide)
Getting started with the exercises
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Class Schedule - Day 2 Root Commands and CINT Discuss Exercises Functions and Fitting The Tree Viewer
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Class Schedule - Day 3 Building ROOT Trees Reading Trees Using Trees in Analysis
TTree->Draw TTree->MakeClass Chains
Exercise discussion How to add your Own Class
With the Interpreter With the compiler (shared library) With ACLiC
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
ROOT Overview What about PAW Concepts: Object Oriented Design,
Frameworks Services and Utilities Libraries Physical Organization
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Differences from PAW Regular grammar (C++) on command line Single language (compiled and
interpreted) Object Oriented (use your class in the
interpreter) Advanced Interactive User Interface Well Documented code. HTML class
descriptions for every class. Object I/O including Schema Evolution 3-d interfaces with OpenGL and X3D.
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
PAW to ROOT File Conversion Get the example PAW file from
http://www-pat.fnal.gov/root/examples/toyz.rz
At the system prompt type
> h2root toyz.rz toyz.root
Once you've done the conversion, you can then start
a ROOT session and open toyz.root
Also see: http://root.cern.ch/root/HowtoConvert.html
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Object Oriented Concepts
Members: a “has a” relationship to the class.
Inheritance: an “is a” relationship to the class.
Class: the description of a “thing” in the system Object: instance of a class Methods: functions for a class
Event
TrackSegment Vertex
Momentum MassSquare InterceptAtVert
HAS AHAS AHAS A
HAS A HAS AHAS A
TObject
IS A
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
A Frameworkprovides utilities and services.
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
ROOT's Services/Utilities Histogramming and Fitting Graphics (2D, 3D) I/O to file or socket: specialized for
histograms, Ntuples (Trees) Collection Classes and Run Time Type
Identification User Interface
GUI: Browsers, Panels, Tree Viewer Command Line interface: C++ interpreter CINT Script Processor (C++ compiled C++
interpreted)
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
The Libraries
Over 350 classes
Core CINT Libraries loaded at
startup: Hist, Tree … Libraries loaded when
needed: HistPainter, TreePlayer,…
Special purpose libraries: EG, Physics…
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
The Framework Organization
*.h...
cintmakecintnewproofdproofservrmkdependrootroot.exerootcintroot-configrootd
bin
$ROOTSYS
libCint.solibCore.solibEG.so*libEGPythia.so*libEGPythia6.solibEGVenus.solibGpad.solibGraf.solibGraf3d.solibGui.solibGX11.so*libGX11TTF.solibHist.solibHistPainter.solibHtml.solibMatrix.solibMinuit.solibNew.solibPhysics.solibPostscript.solibProof.so*libRFIO.so*libRGL.solibRint.so*libThread.solibTree.solibTreePlayer.solibTreeViewer.so*libttf.solibX3d.solibXpm.a
Aclock.cxxAclock.hEvent.cxxEvent.hEventLinkDef.hHello.cxxHello.hMainEvent.cxxMakefileMakefile.inMakefile.win32READMETestVectors.cxxTetris.cxxTetris.heventa.cxxeventb.cxxeventload.cxxguitest.cxxhsimple.cxxhworld.cxxminexam.cxxstress.cxxtcollbm.cxxtcollex.cxxtest2html.cxxtstring.cxxvlazy.cxxvmatrix.cxxvvector.cxx
lib testtutorials include
* OptionalInstallation
EditorBar.CIfit.Canalyze.Carchi.Carrow.Cbasic.Cbasic.datbasic3d.Cbenchmarks.Ccanvas.Cclasscat.Ccleanup.Ccompile.Ccopytree.Ccopytree2.Cdemos.Cdemoshelp.Cdialogs.Cdirs.Cellipse.Ceval.Cevent.Cexec1.Cexec2.Cfeynman.Cfildir.Cfile.Cfillrandom.Cfirst.Cfit1.Cfit1_C.C
fitslicesy.Cformula1.Cframework.Cgames.Cgaxis.Cgeometry.Cgerrors.Cgerrors2.Cgraph.Ch1draw.Chadd.Chclient.Chcons.Chprod.Chserv.Chserv2.Chsimple.Chsum.ChsumTimer.Chtmlex.Cio.Clatex.Clatex2.Clatex3.Cmanyaxis.Cmultifit.Cmyfit.Cna49.Cna49geomfile.Cna49view.Cna49visible.C
ntuple1.Coldbenchmarks.Cpdg.datpsexam.Cpstable.Crootalias.Crootenv.Crootlogoff.Crootlogon.Crootmarks.Cruncatalog.sqlrunzdemo.Csecond.Cshapes.Cshared.Csplines.Csqlcreatedb.Csqlfilldb.Csqlselect.Cstaff.Cstaff.datsurfaces.Ctcl.Ctestrandom.Ctornado.Ctree.Ctwo.Cxyslider.CxysliderAction.Czdemo.C
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Three User Interfaces GUI
windows, buttons, menus
Root Command lineCINT (C++ interpreter)
Macros, applications, libraries (C++ compiler and interpreter)
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
ROOT Overview Summary PAW Concepts: Object Oriented Design,
Frameworks Services and Utilities Libraries Physical Organization
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
GUI Basics Browsing and opening files Drawing histograms Right click, left click, middle click Draw Panel Fit Panel Adding Color and Zooming Adding text and other objects Dividing the canvas Setting the log scale
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
GUI Basics
Display the browser1. TBrowser b;
Start root> root
Quit root (just in case) root[0]>.q
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Displaying a Histogram
Display a histogram The Canvas
Open the root fileBrowse the file
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Basic Navigation by Clicking
Left Click select the object drag the object resize the object
Right Click context menu class::name methods
Middle Click activate canvas freezes event status
bar
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
The Draw Panel The Event Status
The Draw PanelAdding Error barsSliderDefaults
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Fitting, Coloring, and Zooming
Adding a gaussian fit Coloring the histogram Zooming/unzooming
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Adding Objects to the Canvas
The Editor Adding an Arrow Adding Text
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Adding another Pad Add a Pad Select the new
Pad Draw a histogram Add a title for the
axis
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Modifying the Statistics
The Canvas in the Browser
Setting the (7) statistics options default = 0001111
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Dividing the Canvas
Create a new Canvas Divide it in 2 Draw two histograms.
1. Lego plot2. LogY
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Command Line Basics
Use up and down arrows to recall commands $HOME/.root_hist
Use emacs commands to navigate
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Open a File Open a file for reading
root [] TFile f("Example.root") Look at the contents of the file
root [] f.ls()TFile** Example.root ROOT file TFile* Example.root ROOT file KEY: TTree myTree;1 Example ROOT tree KEY: TH1F totalHistogram;1 Total Distribution KEY: TH1F mainHistogram;1 Main Contributor KEY: TH1F s1Histogram;1 First Signal KEY: TH1F s2Histogram;1 Second Signal
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Plotting a Variable Plot a variable
root [] myTree->Draw("xs1")
Where did myTree come from? ROOT executed an implicit gROOT->FindObject("myTree")
And now.. root[] f.ls() … OBJ: TTree myTree Example ROOT tree: 0 KEY: TTree myTree;1 Example ROOT tree
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
The ROOT File
A TFile is a directory structure like UNIX Object in Memory (OBJ) Object on Disk (KEY)
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
The ROOT Tree
Stores large quantities of same class objects: Optimize disk space Optimize access speed Had analysis methods (TTree::Draw)
TNtuple is a TTree limited to floating point numbers.
More details later …
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Fitting
To add a Gaussian Fitroot [] htemp->Fit("gaus")
Where did htemp come from?automatically generated
histogram by the TTree::Draw command.
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Color and Error Bars To add color
root [] htemp->SetFillColor(9) See pg. 134 of the Users Guide for color
index Or on any Canvas choose View:Colors
Drawing Error Barsroot[] htemp->Draw("E1,same")
Many Draw Options See the User's Guide
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Command Line Basics Open and browse a file Drawing histograms Adding a Fit Adding Error bars Adding Color
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Where to Find Information The ROOT Home: http://root.cern.ch
Talks and publications on ROOT: http://root.cern.ch/root/Publications.html
To get information on a specific class : http://root.cern.ch/root/html/ClassIndex.html
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Class Reference Guide Find the class in the index, for
example TH1. Class Inheritanceclass TH1 : public TNamed, public TAttLine, public
TAttFill, public TAttMarker
Class Description Private members Public methods Code
TH1
TH3 TH2
TH1C TH1S TH1F TH1D
TProfile
TH2C TH2S TH2F TH2DTH3S TH3F
TProfile2D
TH3C TH3D
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Finding Examples The ROOT Tutorials:
http://root.cern.ch/root/Tutorials.html
The ROOT How To's:
http://root.cern.ch/root/Howto.html
For on-line help for a particular topic it's very
useful to use their facility to search the
ROOT site. http://root.cern.ch/root
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
More Information
To subscribe to roottalk: http://root.cern.ch/root/roottalk/AboutRootTalk.html
To submit a bug report:
http://pcroot.cern.ch/root-bugs
About ROOT at Fermi: about-root@fnal.gov
http://ods.fnal.gov/ods/root-eval/current/
To subscribe to the about-root mailing list send
mail to listserv@fnal.gov with the body of the
email: subscribe about-root
email@addresses.
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Summary Overview of ROOT GUI Basics Command line basics Using the Class reference
guide PAW to ROOT conversion
Sept 11, 2003ROOT Day1, Suzanne
Panacek 1
Getting started with the Exercises
Go to: http://patwww.fnal.gov/root/class/Setup.htm for setup instructions using Reflection and ssh on fcdfsgi2 and d0mino and minos1.
Find the exercises on line at:http://patwww.fnal.gov/root/class/exercises.htm
Recommended