[PDF] An Introduction to ROOT 20.07.2012 Introduction. ROOT





Previous PDF Next PDF



Exercise 0: Introduction to root

14.10.2012 Exercise 0: Introduction to root. N. Berger (nberger@physi.uni-heidelberg.de). 15. 10. 2012. This tutorial should provide you with a very ...



An Introduction to ROOT

20.07.2012 Introduction. ROOT is a Package for Data Analysis. ROOT Provides: ? Several C++ Libraries. – Store data in histograms.



An Introduction to ROOT

28.07.2011 Introduction. ROOT is a Package for Data Analysis. ROOT Provides: ? Several C++ Libraries. – To store data in histograms.



An Introduction to ROOT

01.08.2007 Introduction. ROOT is a Package for Data Analysis. ROOT Provides: Several C++ Libraries. ¡ To store data in histograms.



Introduction to ROOT

26.07.2018 Also a data format tailored to particle physics needs. Steven Schramm (Université de Gen`eve). Introduction to ROOT. July 26 2018.



An Introduction to ROOT

01.08.2007 Introduction. ROOT is a Package for Data Analysis. ROOT Provides: ? Several C++ Libraries. – To store data in histograms.



indecomposable representations for real roots of a wild quiver

independent of the characteristic of the field. introduction. A fundamental result in the representation theory of quivers is the discovery of the relation.



ROOT SYSTEMS 1. Introduction A root system is a configuration of

Introduction. A root system is a configuration of vectors in some Euclidean space that satisfy nice properties concerning reflections [Wik17].



Introduction to a Virtual Issue on root traits

physiologically distinct from woody fine roots of higher root order. 89. 90. Root economics spectrum. 91. Analysis of root traits logically starts 



Introduction to ROOT

21.07.2004 Separation between data objects and the high level classes acting on these objects. Example a batch job uses only the histogram library



[PDF] Introduction à Root

•Root est un programme spécialement concu pour l'analyse de données en physique des •user guide (guide en pdf par themes avec des exemples etc



[PDF] Intro à ROOT

16 avr 2012 · En physique des particules on fait tout avec ROOT – Lire et écrire des données sur des fichiers – Faire et manipuler des histogrammes – 



[PDF] Introduction à ROOT

1 Introduction ROOT est une bibliothèque de classes disponible gratuitement et facile à installer sur la plupart des machines Les classes de ROOT offrent 



[PDF] A ROOT Guide For Beginners “Diving Into ROOT” - CERN

This introductory guide illustrates the main features of ROOT which are relevant for the typical problems of data analysis: input and plotting of data from 



[PDF] An Introduction to ROOT - DESY

28 juil 2011 · ROOT uses some unusual coding conventions just get used to them ? Class names start with capital T: TH1F TVector ? Names of non-class 



[PDF] An Introduction to ROOT - DESY

1 août 2007 · Introduction ROOT is a Package for Data Analysis ROOT Provides: Several C++ Libraries ¡ To store data in histograms



[PDF] Introduction to ROOT

This introduction: http://ihplx ethz ch/CompMethPP/lectureNotes/exercises/rootintro pdf (or simpler to type: http://tinyurl com/rootintro) ? ROOT 



[PDF] Introduction to ROOT

25 jan 2022 · ROOT is an object-oriented framework for large-scale data handling analysis ? It is originally developed for high energy physics



[PDF] Root Learn to Play

Introduction Root is a fast-paced game of adventure and war You will play as one of four factions vying to show that you are the most legitimate ruler of 

:
G. Brandt 20.7.2012An Introduction to ROOTPage 1An Introduction to ROOT

Gerhard Brandt

(University of Oxford)

DESY Summer Student Tutorial

20 Juli 2012New!

now also with PyROOT G. Brandt 20.7.2012An Introduction to ROOTPage 2Disclaimer

Some of you may already know much of the material

Focus should be on getting everyone ready to

-Write their own ROOT+PyROOT macros with basic functionality

Filling histograms

Making them look nice

-Find more documentation on their own So please could advanced students and beginners pair up G. Brandt 20.7.2012An Introduction to ROOTPage 3What we do

Go through these slides

Run some of the tutorials that come with ROOT

$ROOTSYS/tutorials mainly hsimple and hdraw in .C((+)+) and .py flavors...

What you do

Run the same steps demonstrated

Ask questions at any timeWhat I will doWe were asked to give the lecture according to the "Sandwich Principle" ...

G. Brandt 20.7.2012An Introduction to ROOTPage 4Outline Introduction ROOT Basics ROOT Histograms ROOT I/O Break / Informal Questions

Plot CosmeticsPyROOT Basics

Discussion / Questions G. Brandt 20.7.2012An Introduction to ROOTPage 5Introduction

ROOT is a Package for Data Analysis

ROOT Provides:

Several C++ Libraries

-Store data in histograms -Store data in rich n-tuples, called "ROOT Trees" -Write all these to files, optimised for random access -To visualize histograms and TTrees -Perform fits

An Interactive Environment

-To run C++ programs interactively (C++ interpreter CINT) -To visualize data

Much more...http://root.cern.ch

G. Brandt 20.7.2012An Introduction to ROOTPage 6The Analysis Chain in High Energy Physics

Monte Carlo

GeneratorRaw Data

4-VectorsSimulationSimulated Raw

Data

Reconstruction

High-Level

ReconstructionReconstructed

Data (DST)

Condensed Data

(ROOT Trees)

Analysis CodeHistograms,

PlotsJournal

PublicationThis is

where

ROOTcomes

in ...The way things used to be at HERA... still similar today at LHC and smaller experiments G. Brandt 20.7.2012An Introduction to ROOTPage 7ROOT is mainly used to create histogram plots G. Brandt 20.7.2012An Introduction to ROOTPage 8Recent famous plots: f125 observation Recent observation of a scalar boson...Recent observation of a scalar boson... ... ... these plots were made with ROOTthese plots were made with ROOT G. Brandt 20.7.2012An Introduction to ROOTPage 9ROOT Information

Currently recommended "pro"-version: ROOT 5.34.01

Latest version installed on NAF: ROOT 5.32.00

Experiment's software may use earlier versions + specific fixes

You can download ROOT yourself and compile it,

for Linux, MacOS and Windows

There is a User's guide at

Reference (hyperised class lists) for all versions is available at -The class Index for the current pro version is always at The most important link in HEP - make it your homepage G. Brandt 20.7.2012An Introduction to ROOTPage 10Interactive ROOT

Setup ROOT

-Depends on environment. Sometimes also eg. Python has to be set up -Best possibility if you just know ROOT's location: $ROOTSYS> sh bin/thisroot.sh At DESY/NAF: You can setup ROOT version with ini command $> ini root532 Be prepared to have to use different setups and versions of ROOT!

Start ROOT interactively with

$> root If you like a GUI to show current ROOT objects, files etc in memory

At the ROOT prompt, enter

root [1] TBrowser t G. Brandt 20.7.2012An Introduction to ROOTPage 11ROOT Command Line $> root root [0] TFile *file0 = TFile::Open("gaus.root") root [1] hgaus.Draw() root [2] hgaus.Draw("E") root [3] hgaus.Draw("C") root [4] gStyle->SetOptStat(1111111) root [5] hgaus.GetXaxis()->SetTitle("Abscissa") root [6] hgaus.GetYaxis()->SetTitle("Ordinate") root [7] gPad->SetLogx(1) root [8] hgaus.Draw("E2") root [9] hgaus.SetLineColor(3) root [10] hgaus.SetLineStyle(2) root [11] hgaus.SetLineWidth(2) root [12] hgaus.SetMarkerStyle(20) root [13] hgaus.SetMarkerSize(1.5) root [14] hgaus.SetMarkerColor(4) root [15] hgaus.Draw("E1") root [16] hgaus.SetFillColor(4) root [17] hgaus.Draw("C") root [18] gPad->Print("gaus1.ps") root [19] .q It's possible to enter all commands on the ROOT command line But not very practicable Better to write scripts But it's best to write real programs G. Brandt 20.7.2012An Introduction to ROOTPage 12CINT ROOT uses a C++ interpreter CINT for interactive use You can enter any C++ command; trailing ";" is not required Resetting the interpreter (erasing variables etc): root[] gROOT->Reset()

But more often a restart of ROOT is needed...

(my strategy: run ROOT in batch mode as much as possible)

Special CINT commands start with a dot:

.q Quit .x script.C Execute script "script.C" .L script.C Load script "script.C" (if script.C contains class definitions) .? Show all special commands G. Brandt 20.7.2012An Introduction to ROOTPage 13CINT Extensions to C++ If you create a pointer and assign to it with "new", you don't need to declare the pointer type:h = new TH1F ("h", "histogram", 100, 0, 1) -h is automatically of type TH1F*→ But not in a script! -"." can be used instead of "->" → But not in a script! (if want such behaviour, use PyRoot... see later) If you use a variable that has not been declared earlier, ROOT tries to create one for you from all named objects it knows => If you have opened a file that contains a histogram "hgaus", you can directly usehgaus->Draw() -But be careful: Sometimes you get a different object than you thought :-( Sometimes (often...) objects get created automagically -Eg. TTree::Draw() creates a histogram and a canvas G. Brandt 20.7.2012An Introduction to ROOTPage 14Histogram Code Example

Let's run the tutorial exercise hsimple.C

$> cd $ROOTSYS/tutorials $> root l hsimple.C

In the following let's

-run it from the ROOT command line, -compile it and run from shell... -inspect the code ... -look up more information on the classes we encountered... -look into the file produced by the macro ... -change the style of the produced graphics ... -run the PyROOT version... G. Brandt 20.7.2012An Introduction to ROOTPage 15Interpreted scripts

Un-named scripts:{

#include cout << "Hello, World!\n"; -Code must be enclosed in curly braces! -Execute with root[] .x script.C

Named scripts:#include

int main() { cout << "Hello, World!\n"; -More like normal C++ programs, recommended form! -Execute with:root[] .L script.C root[] main()includes not needed G. Brandt 20.7.2012An Introduction to ROOTPage 16Compiled programs linked with ROOT There is a hybrid between interpreting and compiling: ACLIC -It is called by adding '++' to the script: root l hsimple.C++

To (really) compile using gcc:

-Command "root-config" tells you necessary compiler flags: $> root-config -incdir /opt/products/root/5.18.00/include $> root-config --libs -L/opt/products/root/5.18.00/lib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -pthread -lm -ldl -rdynamic - $> g++ -c -I `root-config --incdir` hsimple.C

To compile and link hsimple.C use:

-$> g++ -I `root-config --incdir` -o examplemain hsimple.C `root-config --libs` -The inverted quotes tell the shell to run a command and paste the output into the corresponding place

Best is to use a Makefile

G. Brandt 20.7.2012An Introduction to ROOTPage 17Remark: ROOT Coding Conventions ROOT has been using the following coding conventions since begin of its development ~1995... this was before C++ was standardised, so they used what they liked -Class names start with capital T: TH1F, TVector -Names of non-class data types end with _t: Int_t -Class method names start with a capital letter: TH1F::Fill() -Class data member names start with an f: TH1::fXaxis -Global variable names start with a g: gPad -Constant names start with a k: TH1::kNoStats -Seperate words with in names are capitalized: TH1::GetTitleOffset() -Two capital characters are normally avoided: TH1::GetXaxis(), not TH1::GetXAxis() G. Brandt 20.7.2012An Introduction to ROOTPage 18ROOT Histograms The most important class in ROOT for data analysis

1-Dimensional Histograms:class TH1F

-Gives the number of entries versus one variable -By far the most common type

2-Dimensional Histograms: class TH2F

-Gives the number of entries versus two variables -Used to show dependencies/correlations between variables

Profile Histograms: class TProfile

-Gives the average of one variable versus another variable -Used to quantify correlations between variables -Often used to quantify reconstruction resolutions/biases: Plot reconstructed quantity versus true ("generated") quantity in Monte Carlo events G. Brandt 20.7.2012An Introduction to ROOTPage 19ROOT Histogram Hierarchy

All histograms...Are derived from TObjectAre implemented as 1D arrays - even if 2D, 3D or even profile histograms The arrays (TArray) can have different type:

char, float, double, short, ... They all have cosmetics attributes for drawing → second lessonThe class hierarchy of histogram classes shows how ROOT classes are organised

G. Brandt 20.7.2012An Introduction to ROOTPage 20What Histograms Can Do BookingTH1F(const char* name, const char* title, int nbinsx, double xlow, double xup); TH1F(const char* name, const char* title, int nbinsx, const double* xbins);quotesdbs_dbs8.pdfusesText_14
[PDF] INTRO aux sombres heros de l`amer

[PDF] Intro Caractéristiques du bateau - Festival

[PDF] Intro de 32 comptes - 2 Tags *TRIPLE STEP RIGHT, BACK ROCK

[PDF] Intro Dieu d`éternité Créateur de la terre Roi d`Eternité L`adoration t

[PDF] intro e roditori.indd

[PDF] Intro Höhepunkte Reiseroute - Conception

[PDF] intro mistral gagnant - Club Guitare de Lannilis

[PDF] Intro Points forts - France

[PDF] Intro Points forts Itinéraire

[PDF] Intro PROTECT A. (FR)

[PDF] Intro Tech Masques TECHNOLOGIE MASQUE

[PDF] Intro. Medumba Language

[PDF] introducción - sinat - Mexique Et Amérique Centrale

[PDF] introducing broker membership agreement - Compte Bancaire

[PDF] Introducing Heinz PlantBottleTM Pack - Conception