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
ZJetsTreeAnalyzer.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.bookParticle
(self.tree,
'jet1'
)
10
ntuple.bookParticle
(self.tree,
'jet1_gen'
)
11
ntuple.bookParticle
(self.tree,
'jet2'
)
12
ntuple.bookParticle
(self.tree,
'jet2_gen'
)
13
ntuple.bookParticle
(self.tree,
'dimuon'
)
14
ntuple.bookParticle
(self.tree,
'dimuon_leg1'
)
15
ntuple.bookParticle
(self.tree,
'dimuon_leg2'
)
16
17
18
def
process
(self, event):
19
self.tree.
reset
()
20
if
len(event.jets)>0:
21
ntuple.fillParticle
(self.tree,
'jet1'
, event.jets[0])
22
if
event.jets[0].gen:
23
ntuple.fillParticle
(self.tree,
'jet1_gen'
, event.jets[0].gen)
24
if
len(event.jets)>1:
25
ntuple.fillParticle
(self.tree,
'jet2'
, event.jets[1])
26
if
event.jets[1].gen:
27
ntuple.fillParticle
(self.tree,
'jet2_gen'
, event.jets[1].gen)
28
if
len(event.dimuons)>1:
29
ntuple.fillParticle
(self.tree,
'dimuon'
, event.dimuons[0])
30
ntuple.fillParticle
(self.tree,
'dimuon_leg1'
, event.dimuons[0].leg1)
31
ntuple.fillParticle
(self.tree,
'dimuon_leg2'
, event.dimuons[0].leg2)
32
self.tree.tree.Fill()
33
34
ntuple.bookParticle
def bookParticle(tree, pName)
Definition:
ntuple.py:25
ntuple.fillParticle
def fillParticle(tree, pName, particle)
Definition:
ntuple.py:34
ZJetsTreeAnalyzer.ZJetsTreeAnalyzer.process
def process(self, event)
Definition:
ZJetsTreeAnalyzer.py:18
ZJetsTreeAnalyzer.ZJetsTreeAnalyzer
Definition:
ZJetsTreeAnalyzer.py:5
ZJetsTreeAnalyzer.ZJetsTreeAnalyzer.beginLoop
def beginLoop(self, setup)
Definition:
ZJetsTreeAnalyzer.py:7
reset
void reset(double vett[256])
Definition:
TPedValues.cc:11
Generated for CMSSW Reference Manual by
1.8.16