Logo ROOT  
Reference Guide
df001_introduction Namespace Reference

Functions

 fill_tree (treeName, fileName)
 A simple helper function to fill a test tree: this makes the example stand-alone.

Variables

 b1b2_cut = d.Filter(cutb1b2)
str cutb1 = 'b1 < 5.'
 cutb1_cutb1b2_result = cutb1_result.Filter(cutb1b2)
 cutb1_result = d.Filter(cutb1);
str cutb1b2 = 'b2 % 2 && b1 < 4.'
 cutb1b2_result = d.Filter(cutb1b2);
 d = ROOT.RDataFrame(treeName, fileName)
 entries1
 entries2 = d.Filter("b1 < 5.").Count();
 entries_sum
 evts_cutb1_cutb1b2_result = cutb1_cutb1b2_result.Count()
 evts_cutb1_result = cutb1_result.Count()
 evts_cutb1b2_result = cutb1b2_result.Count()
str fileName = "df001_introduction_py.root"
 hist = d.Filter(cutb1).Histo1D('b1')
 maxVal = b1b2_cut.Max('b1')
 meanVal = b1b2_cut.Mean('b1')
 minVal = b1b2_cut.Min('b1')
 nonDefmeanVal = b1b2_cut.Mean("b2")
str treeName = "myTree"

Function Documentation

◆ fill_tree()

df001_introduction.fill_tree ( treeName,
fileName )

A simple helper function to fill a test tree: this makes the example stand-alone.

Definition at line 18 of file df001_introduction.py.

Variable Documentation

◆ b1b2_cut

df001_introduction.b1b2_cut = d.Filter(cutb1b2)

Definition at line 64 of file df001_introduction.py.

◆ cutb1

str df001_introduction.cutb1 = 'b1 < 5.'

Definition at line 45 of file df001_introduction.py.

◆ cutb1_cutb1b2_result

df001_introduction.cutb1_cutb1b2_result = cutb1_result.Filter(cutb1b2)

Definition at line 88 of file df001_introduction.py.

◆ cutb1_result

df001_introduction.cutb1_result = d.Filter(cutb1);

Definition at line 86 of file df001_introduction.py.

◆ cutb1b2

str df001_introduction.cutb1b2 = 'b2 % 2 && b1 < 4.'

Definition at line 46 of file df001_introduction.py.

◆ cutb1b2_result

df001_introduction.cutb1b2_result = d.Filter(cutb1b2);

Definition at line 87 of file df001_introduction.py.

◆ d

df001_introduction.d = ROOT.RDataFrame(treeName, fileName)

Definition at line 32 of file df001_introduction.py.

◆ entries1

df001_introduction.entries1
Initial value:
1= d.Filter(cutb1) \
2 .Filter(cutb1b2) \
3 .Count();

Definition at line 52 of file df001_introduction.py.

◆ entries2

df001_introduction.entries2 = d.Filter("b1 < 5.").Count();

Definition at line 58 of file df001_introduction.py.

◆ entries_sum

df001_introduction.entries_sum
Initial value:
1= d.Define('sum', 'b2 + b1') \
2 .Filter('sum > 4.2') \
3 .Count()

Definition at line 112 of file df001_introduction.py.

◆ evts_cutb1_cutb1b2_result

df001_introduction.evts_cutb1_cutb1b2_result = cutb1_cutb1b2_result.Count()

Definition at line 93 of file df001_introduction.py.

◆ evts_cutb1_result

df001_introduction.evts_cutb1_result = cutb1_result.Count()

Definition at line 91 of file df001_introduction.py.

◆ evts_cutb1b2_result

df001_introduction.evts_cutb1b2_result = cutb1b2_result.Count()

Definition at line 92 of file df001_introduction.py.

◆ fileName

str df001_introduction.fileName = "df001_introduction_py.root"

Definition at line 25 of file df001_introduction.py.

◆ hist

df001_introduction.hist = d.Filter(cutb1).Histo1D('b1')

Definition at line 76 of file df001_introduction.py.

◆ maxVal

df001_introduction.maxVal = b1b2_cut.Max('b1')

Definition at line 66 of file df001_introduction.py.

◆ meanVal

df001_introduction.meanVal = b1b2_cut.Mean('b1')

Definition at line 67 of file df001_introduction.py.

◆ minVal

df001_introduction.minVal = b1b2_cut.Min('b1')

Definition at line 65 of file df001_introduction.py.

◆ nonDefmeanVal

df001_introduction.nonDefmeanVal = b1b2_cut.Mean("b2")

Definition at line 68 of file df001_introduction.py.

◆ treeName

str df001_introduction.treeName = "myTree"

Definition at line 26 of file df001_introduction.py.