Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
PhysicsTools
Heppy
python
analyzers
examples
SimpleTreeAnalyzer.py
Go to the documentation of this file.
1
from
__future__
import
absolute_import
2
from
PhysicsTools.Heppy.analyzers.core.TreeAnalyzerNumpy
import
TreeAnalyzerNumpy
3
from
.
import
ntuple
4
5
class
ZJetsTreeAnalyzer
(TreeAnalyzerNumpy):
6
7
def
beginLoop
(self, setup):
8
super(ZJetsTreeAnalyzer, self).
beginLoop
(setup)
9
ntuple.bookJet
(
'jet1'
)
10
ntuple.bookJet
(
'jet2'
)
11
ntuple.bookZ(
'dimuon'
)
12
13
14
def
process
(self, event):
15
if
len(event.jets)>0:
16
ntuple.fillJet
(
'jet1'
, event.jets[0])
17
if
len(event.jets)>1:
18
ntuple.fillJet
(
'jet2'
, event.jets[1])
19
if
len(event.dimuons>1):
20
ntuple.fillZ(
'dimuon'
, event.dimuons[0])
21
ntuple.tree.tree.Fill()
22
23
ntuple.fillJet
def fillJet(tree, pName, jet)
Definition:
ntuple.py:105
ntuple.bookJet
def bookJet(tree, pName)
Definition:
ntuple.py:99
SimpleTreeAnalyzer.ZJetsTreeAnalyzer.beginLoop
def beginLoop(self, setup)
Definition:
SimpleTreeAnalyzer.py:7
SimpleTreeAnalyzer.ZJetsTreeAnalyzer.process
def process(self, event)
Definition:
SimpleTreeAnalyzer.py:14
SimpleTreeAnalyzer.ZJetsTreeAnalyzer
Definition:
SimpleTreeAnalyzer.py:5
Generated for CMSSW Reference Manual by
1.8.16