test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
PhysicsTools
Heppy
python
analyzers
examples
SimpleTreeAnalyzer.py
Go to the documentation of this file.
1
from
PhysicsTools.Heppy.analyzers.core.TreeAnalyzerNumpy
import
TreeAnalyzerNumpy
2
import
ntuple
3
4
class
ZJetsTreeAnalyzer
(TreeAnalyzerNumpy):
5
6
def
beginLoop
(self, setup):
7
super(ZJetsTreeAnalyzer, self).
beginLoop
(setup)
8
ntuple.bookJet
(
'jet1'
)
9
ntuple.bookJet
(
'jet2'
)
10
ntuple.bookZ(
'dimuon'
)
11
12
13
def
process
(self, event):
14
if
len(event.jets)>0:
15
ntuple.fillJet
(
'jet1'
, event.jets[0])
16
if
len(event.jets)>1:
17
ntuple.fillJet
(
'jet2'
, event.jets[1])
18
if
len(event.dimuons>1):
19
ntuple.fillZ(
'dimuon'
, event.dimuons[0])
20
ntuple.tree.tree.Fill()
21
22
ntuple.fillJet
def fillJet
Definition:
ntuple.py:104
SimpleTreeAnalyzer.ZJetsTreeAnalyzer.process
def process
Definition:
SimpleTreeAnalyzer.py:13
SimpleTreeAnalyzer.ZJetsTreeAnalyzer
Definition:
SimpleTreeAnalyzer.py:4
ntuple.bookJet
def bookJet
Definition:
ntuple.py:98
SimpleTreeAnalyzer.ZJetsTreeAnalyzer.beginLoop
def beginLoop
Definition:
SimpleTreeAnalyzer.py:6
Generated for CMSSW Reference Manual by
1.8.5