Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
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
Definition:
ntuple.py:105
SimpleTreeAnalyzer.ZJetsTreeAnalyzer.process
def process
Definition:
SimpleTreeAnalyzer.py:14
SimpleTreeAnalyzer.ZJetsTreeAnalyzer
Definition:
SimpleTreeAnalyzer.py:5
ntuple.bookJet
def bookJet
Definition:
ntuple.py:99
SimpleTreeAnalyzer.ZJetsTreeAnalyzer.beginLoop
def beginLoop
Definition:
SimpleTreeAnalyzer.py:7
Generated for CMSSW Reference Manual by
1.8.5