CMS 3D CMS Logo

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

Public Member Functions

def beginLoop
 
def bookJet
 
def fillJet
 
def process
 

Detailed Description

Definition at line 4 of file SimpleTreeAnalyzer.py.

Member Function Documentation

def SimpleTreeAnalyzer.SimpleTreeAnalyzer.beginLoop (   self,
  setup 
)

Definition at line 6 of file SimpleTreeAnalyzer.py.

References SimpleTreeAnalyzer.SimpleTreeAnalyzer.bookJet().

6 
7  def beginLoop(self, setup):
8  super(SimpleTreeAnalyzer, self).beginLoop(setup)
9  self.bookJet('jet1')
10  self.bookJet('jet2')
11  self.bookJet('jet1_gen')
12  self.bookJet('jet2_gen')
def SimpleTreeAnalyzer.SimpleTreeAnalyzer.bookJet (   self,
  name 
)

Definition at line 22 of file SimpleTreeAnalyzer.py.

Referenced by SimpleTreeAnalyzer.SimpleTreeAnalyzer.beginLoop().

22 
23  def bookJet(self, name):
24  self.tree.var('{name}_pt'.format(name=name) )
def SimpleTreeAnalyzer.SimpleTreeAnalyzer.fillJet (   self,
  name,
  jet 
)

Definition at line 25 of file SimpleTreeAnalyzer.py.

Referenced by SimpleTreeAnalyzer.SimpleTreeAnalyzer.process().

25 
26  def fillJet(self, name, jet):
27  if jet:
28  self.tree.fill('{name}_pt'.format(name=name), jet.pt())
29 
def SimpleTreeAnalyzer.SimpleTreeAnalyzer.process (   self,
  event 
)

Definition at line 13 of file SimpleTreeAnalyzer.py.

References SimpleTreeAnalyzer.SimpleTreeAnalyzer.fillJet().

Referenced by ConfigBuilder.ConfigBuilder.__init__(), ConfigBuilder.ConfigBuilder.addExtraStream(), ConfigBuilder.ConfigBuilder.anyOf(), ConfigBuilder.ConfigBuilder.completeInputCommand(), ConfigBuilder.ConfigBuilder.doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules.leave(), ConfigBuilder.ConfigBuilder.prepare(), ConfigBuilder.ConfigBuilder.prepare_ALCA(), ConfigBuilder.ConfigBuilder.prepare_DQM(), ConfigBuilder.ConfigBuilder.prepare_FASTSIM(), ConfigBuilder.ConfigBuilder.prepare_HARVESTING(), ConfigBuilder.ConfigBuilder.prepare_HLT(), ConfigBuilder.ConfigBuilder.prepare_LHE(), ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

13 
14  def process(self, event):
15  if len(event.jets)>0:
16  self.fillJet('jet1', event.jets[0])
17  self.fillJet('jet1_gen', event.jets[0].gen)
18  if len(event.jets)>1:
19  self.fillJet('jet2', event.jets[1])
20  self.fillJet('jet2_gen', event.jets[1].gen)
21  self.tree.tree.Fill()