CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
ZJetsTreeAnalyzer.ZJetsTreeAnalyzer Class Reference
Inheritance diagram for ZJetsTreeAnalyzer.ZJetsTreeAnalyzer:

Public Member Functions

def beginLoop
 
def process
 

Detailed Description

Definition at line 5 of file ZJetsTreeAnalyzer.py.

Member Function Documentation

def ZJetsTreeAnalyzer.ZJetsTreeAnalyzer.beginLoop (   self,
  setup 
)

Definition at line 7 of file ZJetsTreeAnalyzer.py.

References ntuple.bookParticle(), tree.Tree.tree, SimpleTreeProducer.SimpleTreeProducer.tree, HIPMonitorVariables.tree, eventstfile.Events.tree, RootChamberWriter.tree(), CSCTFAnalyzer.tree, CSCTFanalyzer.tree, core.TreeAnalyzerNumpy.TreeAnalyzerNumpy.tree, TreeWriterForEcalCorrection.tree, AlignmentIORootBase.tree, TkOfflineVariables.tree, HIPTwoBodyDecayAnalyzer.tree, EcalPerEvtMatacqAnalyzer.tree, edm::DuplicateTreeSentry.tree(), HcalIsoTrackAnalyzer.tree, CheckSecondary.tree, FWFileEntry.tree(), KVFTest.tree, EcalMatacqAnalyzer.tree, edm::RootOutputTree.tree(), BPHHistoSpecificDecay.tree, PhysicsTools::TreeReader.tree, KinematicVertex.tree, IsoTrackCalibration.tree, python.cmstools.EventTree.tree(), edm::FileBlock.tree(), IsoTrackCalib.tree, KinematicParticle.tree, edm::root::TFWLiteSelectorMembers.tree(), edm::RootTree.tree(), TkAlMap.TkAlMap.tree, HcalIsoTrkSimAnalyzer.tree, HcalIsoTrkAnalyzer.tree, svgfig.SVG.tree(), and ntupleDataFormat.TrackingNtuple.tree().

7 
8  def beginLoop(self, setup):
9  super(ZJetsTreeAnalyzer, self).beginLoop(setup)
10  ntuple.bookParticle(self.tree, 'jet1')
11  ntuple.bookParticle(self.tree, 'jet1_gen')
12  ntuple.bookParticle(self.tree, 'jet2')
13  ntuple.bookParticle(self.tree, 'jet2_gen')
14  ntuple.bookParticle(self.tree, 'dimuon')
15  ntuple.bookParticle(self.tree, 'dimuon_leg1')
16  ntuple.bookParticle(self.tree, 'dimuon_leg2')
17 
def bookParticle
Definition: ntuple.py:25
def ZJetsTreeAnalyzer.ZJetsTreeAnalyzer.process (   self,
  event 
)

Definition at line 18 of file ZJetsTreeAnalyzer.py.

References ntuple.fillParticle(), tree.Tree.tree, SimpleTreeProducer.SimpleTreeProducer.tree, HIPMonitorVariables.tree, eventstfile.Events.tree, RootChamberWriter.tree(), CSCTFAnalyzer.tree, CSCTFanalyzer.tree, core.TreeAnalyzerNumpy.TreeAnalyzerNumpy.tree, TreeWriterForEcalCorrection.tree, AlignmentIORootBase.tree, TkOfflineVariables.tree, HIPTwoBodyDecayAnalyzer.tree, EcalPerEvtMatacqAnalyzer.tree, edm::DuplicateTreeSentry.tree(), HcalIsoTrackAnalyzer.tree, CheckSecondary.tree, FWFileEntry.tree(), KVFTest.tree, EcalMatacqAnalyzer.tree, edm::RootOutputTree.tree(), BPHHistoSpecificDecay.tree, PhysicsTools::TreeReader.tree, KinematicVertex.tree, IsoTrackCalibration.tree, python.cmstools.EventTree.tree(), edm::FileBlock.tree(), IsoTrackCalib.tree, KinematicParticle.tree, edm::root::TFWLiteSelectorMembers.tree(), edm::RootTree.tree(), TkAlMap.TkAlMap.tree, HcalIsoTrkSimAnalyzer.tree, HcalIsoTrkAnalyzer.tree, svgfig.SVG.tree(), and ntupleDataFormat.TrackingNtuple.tree().

18 
19  def process(self, event):
20  self.tree.reset()
21  if len(event.jets)>0:
22  ntuple.fillParticle(self.tree, 'jet1', event.jets[0])
23  if event.jets[0].gen:
24  ntuple.fillParticle(self.tree, 'jet1_gen', event.jets[0].gen)
25  if len(event.jets)>1:
26  ntuple.fillParticle(self.tree, 'jet2', event.jets[1])
27  if event.jets[1].gen:
28  ntuple.fillParticle(self.tree, 'jet2_gen', event.jets[1].gen)
29  if len(event.dimuons)>1:
30  ntuple.fillParticle(self.tree, 'dimuon', event.dimuons[0])
31  ntuple.fillParticle(self.tree, 'dimuon_leg1', event.dimuons[0].leg1)
32  ntuple.fillParticle(self.tree, 'dimuon_leg2', event.dimuons[0].leg2)
33  self.tree.tree.Fill()
34 
35 
def fillParticle
Definition: ntuple.py:34