Root Lecture
Root Lecture
Andrea Knue
HASCO Summer School
Goettingen, July 2015
= fancy plot?
http://arxiv.org/abs/1506.05629
2/ 55 – The ROOT framework – Andrea Knue
Outline What is ROOT? Applications Data analysis Summary Ready?
Short Brainstorming:
detector calibration
event selection
fit distributions
add histograms
Disclaimer
֒→ Unfolding: RooUnfold
ssh -Y [email protected]
b) on your laptop
to install locally Download here!
First steps
➔ if you want to avoid the logo to open, just type root -l instead of root .
Random generators
Random generators II
Choice of seed
need to choose starting point (seed)
choose seed=0:
֒→ take system time of the computer,
Uniform(x1)
Gauss(mean, sigma)
exp(tau)
70
60
60
50
50
40
40
30
30
20
20
10 10
0 0
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
60 60
50 50
40 40
30 30
20 20
10 10
0 0
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
jet eta
hist
80 Entries 1000
Mean 0.03218
RMS 0.9669
70
60
50
40
30
20
10
0
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
jet etas
2.5 hist2D
Entries 70
10000
Mean x -0.01167
2
Mean y -0.0002396
RMS x 60
0.9493
1.5
RMS y 0.9573
1 50
0.5
40
0
-0.5 30
-1 20
-1.5
10
-2
-2.5 0
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
jet eta
hist1
Entries 10000
800 Mean -0.005804
RMS 0.9521
700
600
500
400
300
200
100
jet eta
hist1
800 Entries 10000
Mean -0.002649
RMS 0.9557
700
600
500
400
300
200
100
jet eta
hist1
1.25 Entries 25
Mean -0.02952
1.2 RMS 1.448
1.15
1.1
1.05
0.95
0.9
0.85
jet eta
hist1
800 Entries 10000
Mean -0.002649
RMS 0.9557
700
600
500
400
300
200
100
jet eta
hist1
1.25 Entries 25
Mean -0.02952
1.2 RMS 1.448
1.15
1.1
1.05
0.95
0.9
0.85
has to be informative
jet eta
hist1
Entries 10000
800 Mean -0.01313
RMS 0.9492
700
600
500
400
300
200
100
0
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
jet eta
hist1
Entries 2210
1.3 Mean -0.05011
RMS 1.429
1.2
1.1
0.9
0.8
0.7
0.6
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
jet eta
800
700
600
500
400
300
200
100
jet eta
1.6
1.4
1.2
0.8
jet eta
hist1
900 Entries 10000
Mean 0.006211
800 RMS 0.9511
700
600
500
400
300
200
100
0
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
jet eta
hist1
Entries 2217
Mean 0.03989
1.2 RMS 1.433
1.1
0.9
0.8
0.7
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
800
700
600
500
400
300
200
100
0
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
1.4
1.2
0.8
0.6
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
fixed now:
add axis title
adjust label and title sizes
add line at y = 1 to ratio plot
add Legend
add label for experiment and
sample stats
➔ all of this will be in tomorrows tutorial
q̄
νl
q̄ Single top:
W
l q̄’ b̄
Smaller
q̄ contributions:
W+ q Z +jets
q t Diboson
Electrons: Muons:
transverse W mass:
At least 4 Jets:
q
mT ,W = 2p l p ν (1 − cos(∆φ):
T T - anti-kt jets (∆R = 0.4)
- pT > 25 GeV
mT ,W + ETmiss > 60 GeV - |η| < 2.5
- cut on Jet Vertex Tagger
to reduce pile-up influence
b-Jets:
➔ identify b-Jets via its secondary vertex
➔ require at least one tagged jet
➔ use MV2 @ 77 % WP
Example:
filename: example.root, tree name: TreeS
up to now:
only showed how to run a root macro with root MacroName.C
but: better include the libraries in a proper C++ class and use
a Makefile!
want to work with a histogram that has been stored in a .root file
open it with root: root HistoFile.root
then click on histogram in the file
➔ Now one gets the function from the fit result on top of the histogram.
➔ can choose in panel on left side which results should be shown in stats
box.
43/ 55 – The ROOT framework – Andrea Knue
Outline What is ROOT? Applications Data analysis Summary Ready?
➔ some separation in each distribution: take all this info and make new variable!
46/ 55 – The ROOT framework – Andrea Knue
Outline What is ROOT? Applications Data analysis Summary Ready?
Neural networks
➔ use only half of sample for training, then use other half to test
51/ 55 – The ROOT framework – Andrea Knue
Outline What is ROOT? Applications Data analysis Summary Ready?
Summary
Exercises