CMS 3D CMS Logo

Functions | Variables
ntuple Namespace Reference

Functions

def bookComponent (tree, pName)
 
def bookEvent (tree)
 
def bookGenTau (tree, pName, pfdiscs, calodiscs)
 
def bookJet (tree, pName)
 
def bookMet (tree, pName)
 
def bookParticle (tree, pName)
 
def bookTau (tree, pName, discNames)
 
def fill (tree, varName, value)
 
def fillComponent (tree, pName, component)
 
def fillEvent (tree, event)
 
def fillGenTau (tree, pName, tau)
 
def fillJet (tree, pName, jet)
 
def fillMet (tree, pName, met)
 
def fillParticle (tree, pName, particle)
 
def fillTau (tree, pName, tau)
 
def var (tree, varName, type=float)
 

Variables

 pdgids
 

Function Documentation

def ntuple.bookComponent (   tree,
  pName 
)

Definition at line 85 of file ntuple.py.

References var().

Referenced by bookJet().

85 def bookComponent( tree, pName ):
86  var(tree, '{pName}_e'.format(pName=pName))
87  var(tree, '{pName}_pt'.format(pName=pName))
88  var(tree, '{pName}_num'.format(pName=pName))
89 
def var(tree, varName, type=float)
Definition: ntuple.py:3
def bookComponent(tree, pName)
Definition: ntuple.py:85
def ntuple.bookEvent (   tree)

Definition at line 11 of file ntuple.py.

References var().

11 def bookEvent(tree):
12  var(tree, 'run')
13  var(tree, 'lumi')
14  var(tree, 'event')
15 
def var(tree, varName, type=float)
Definition: ntuple.py:3
def bookEvent(tree)
Definition: ntuple.py:11
def ntuple.bookGenTau (   tree,
  pName,
  pfdiscs,
  calodiscs 
)

Definition at line 52 of file ntuple.py.

References bookJet(), and bookTau().

52 def bookGenTau(tree, pName, pfdiscs, calodiscs):
53  bookJet(tree, pName)
54  bookTau(tree, '{pName}_calo'.format(pName=pName), calodiscs)
55  bookTau(tree, '{pName}_pf'.format(pName=pName), pfdiscs)
56  bookJet(tree, '{pName}_pfjet'.format(pName=pName))
57 
def bookJet(tree, pName)
Definition: ntuple.py:98
def bookTau(tree, pName, discNames)
Definition: ntuple.py:65
def bookGenTau(tree, pName, pfdiscs, calodiscs)
Definition: ntuple.py:52
def ntuple.bookJet (   tree,
  pName 
)

Definition at line 98 of file ntuple.py.

References bookComponent(), and bookParticle().

Referenced by SimpleTreeAnalyzer.ZJetsTreeAnalyzer.beginLoop(), and bookGenTau().

98 def bookJet( tree, pName ):
99  bookParticle(tree, pName )
100  for pdgid in pdgids:
101  bookComponent(tree, '{pName}_{pdgid:d}'.format(pName=pName, pdgid=pdgid))
102  # var(tree, '{pName}_npart'.format(pName=pName))
103 
def bookParticle(tree, pName)
Definition: ntuple.py:24
def bookJet(tree, pName)
Definition: ntuple.py:98
def bookComponent(tree, pName)
Definition: ntuple.py:85
def ntuple.bookMet (   tree,
  pName 
)

Definition at line 42 of file ntuple.py.

References var().

42 def bookMet(tree, pName):
43  var(tree, '{pName}_pt'.format(pName=pName))
44  var(tree, '{pName}_phi'.format(pName=pName))
45  var(tree, '{pName}_sumet'.format(pName=pName))
46 
def var(tree, varName, type=float)
Definition: ntuple.py:3
def bookMet(tree, pName)
Definition: ntuple.py:42
def ntuple.bookParticle (   tree,
  pName 
)

Definition at line 24 of file ntuple.py.

References var().

Referenced by ZJetsTreeAnalyzer.ZJetsTreeAnalyzer.beginLoop(), bookJet(), and bookTau().

24 def bookParticle( tree, pName ):
25  var(tree, '{pName}_pdgid'.format(pName=pName))
26  var(tree, '{pName}_e'.format(pName=pName))
27  var(tree, '{pName}_pt'.format(pName=pName))
28  var(tree, '{pName}_eta'.format(pName=pName))
29  var(tree, '{pName}_phi'.format(pName=pName))
30  var(tree, '{pName}_m'.format(pName=pName))
31  var(tree, '{pName}_q'.format(pName=pName))
32 
def var(tree, varName, type=float)
Definition: ntuple.py:3
def bookParticle(tree, pName)
Definition: ntuple.py:24
def ntuple.bookTau (   tree,
  pName,
  discNames 
)

Definition at line 65 of file ntuple.py.

References bookParticle(), and var().

Referenced by bookGenTau().

65 def bookTau(tree, pName, discNames):
66  bookParticle(tree, pName)
67  var(tree, '{pName}_nsigcharged'.format(pName=pName))
68  var(tree, '{pName}_isolation'.format(pName=pName))
69  for discName in discNames:
70  var(tree, '{pName}_{disc}'.format(pName=pName,
71  disc=discName))
72 
def var(tree, varName, type=float)
Definition: ntuple.py:3
def bookParticle(tree, pName)
Definition: ntuple.py:24
def bookTau(tree, pName, discNames)
Definition: ntuple.py:65
def ntuple.fill (   tree,
  varName,
  value 
)

Definition at line 6 of file ntuple.py.

Referenced by fillComponent(), fillEvent(), fillMet(), fillParticle(), and fillTau().

6 def fill( tree, varName, value ):
7  tree.fill( varName, value )
8 
9 # event information
10 
def fill(tree, varName, value)
Definition: ntuple.py:6
def ntuple.fillComponent (   tree,
  pName,
  component 
)

Definition at line 90 of file ntuple.py.

References fill().

Referenced by fillJet().

90 def fillComponent(tree, pName, component):
91  fill(tree, '{pName}_e'.format(pName=pName), component.e() )
92  fill(tree, '{pName}_pt'.format(pName=pName), component.pt() )
93  fill(tree, '{pName}_num'.format(pName=pName), component.num() )
94 
95 
def fillComponent(tree, pName, component)
Definition: ntuple.py:90
def fill(tree, varName, value)
Definition: ntuple.py:6
def ntuple.fillEvent (   tree,
  event 
)

Definition at line 16 of file ntuple.py.

References fill().

Referenced by ThePEG::LesHouchesInterface.doReadEvent(), ThePEG::LesHouchesInterface.getEvent(), HcalTB02Analysis.produce(), gen::FortranCallback.resetIterationsPerEvent(), and CaloVNoiseSignalGenerator.~CaloVNoiseSignalGenerator().

16 def fillEvent(tree, event):
17  fill(tree, 'run', event.run)
18  fill(tree, 'lumi', event.lumi)
19  fill(tree, 'event', event.eventId)
20 
21 
22 # simple particle
23 
def fillEvent(tree, event)
Definition: ntuple.py:16
def fill(tree, varName, value)
Definition: ntuple.py:6
def ntuple.fillGenTau (   tree,
  pName,
  tau 
)

Definition at line 58 of file ntuple.py.

References fillJet(), and fillTau().

58 def fillGenTau(tree, pName, tau):
59  fillJet(tree, pName, tau)
60  fillTau(tree, '{pName}_calo'.format(pName=pName), tau.match_calo)
61  fillTau(tree, '{pName}_pf'.format(pName=pName), tau.match_pf)
62  fillJet(tree, '{pName}_pfjet'.format(pName=pName), tau.match_pfjet)
63 
64 
def fillTau(tree, pName, tau)
Definition: ntuple.py:73
def fillGenTau(tree, pName, tau)
Definition: ntuple.py:58
def fillJet(tree, pName, jet)
Definition: ntuple.py:104
def ntuple.fillJet (   tree,
  pName,
  jet 
)

Definition at line 104 of file ntuple.py.

References fillComponent(), and fillParticle().

Referenced by fillGenTau(), and SimpleTreeAnalyzer.ZJetsTreeAnalyzer.process().

104 def fillJet( tree, pName, jet ):
105  if not jet: return
106  fillParticle(tree, pName, jet )
107  for pdgid in pdgids:
108  component = jet.constituents.get(pdgid, None)
109  if component is not None:
110  fillComponent(tree,
111  '{pName}_{pdgid:d}'.format(pName=pName, pdgid=pdgid),
112  component )
113  else:
114  import pdb; pdb.set_trace()
115  print jet
116 
117 
def fillJet(tree, pName, jet)
Definition: ntuple.py:104
def fillParticle(tree, pName, particle)
Definition: ntuple.py:33
def fillComponent(tree, pName, component)
Definition: ntuple.py:90
def ntuple.fillMet (   tree,
  pName,
  met 
)

Definition at line 47 of file ntuple.py.

References fill().

47 def fillMet(tree, pName, met):
48  fill(tree, '{pName}_pt'.format(pName=pName), met.pt())
49  fill(tree, '{pName}_phi'.format(pName=pName), met.phi())
50  fill(tree, '{pName}_sumet'.format(pName=pName), met.sumEt())
51 
def fill(tree, varName, value)
Definition: ntuple.py:6
def fillMet(tree, pName, met)
Definition: ntuple.py:47
def ntuple.fillParticle (   tree,
  pName,
  particle 
)

Definition at line 33 of file ntuple.py.

References fill().

Referenced by fillJet(), fillTau(), and ZJetsTreeAnalyzer.ZJetsTreeAnalyzer.process().

33 def fillParticle( tree, pName, particle ):
34  fill(tree, '{pName}_pdgid'.format(pName=pName), particle.pdgId() )
35  fill(tree, '{pName}_e'.format(pName=pName), particle.energy() )
36  fill(tree, '{pName}_pt'.format(pName=pName), particle.pt() )
37  fill(tree, '{pName}_eta'.format(pName=pName), particle.eta() )
38  fill(tree, '{pName}_phi'.format(pName=pName), particle.phi() )
39  fill(tree, '{pName}_m'.format(pName=pName), particle.mass() )
40  fill(tree, '{pName}_q'.format(pName=pName), particle.charge() )
41 
def fillParticle(tree, pName, particle)
Definition: ntuple.py:33
def fill(tree, varName, value)
Definition: ntuple.py:6
def ntuple.fillTau (   tree,
  pName,
  tau 
)

Definition at line 73 of file ntuple.py.

References fill(), and fillParticle().

Referenced by fillGenTau().

73 def fillTau(tree, pName, tau):
74  if not tau: return
75  fillParticle(tree, pName, tau)
76  fill(tree, '{pName}_nsigcharged'.format(pName=pName), len(tau.signalCharged()))
77  fill(tree, '{pName}_isolation'.format(pName=pName), tau.isolation())
78  for discName, value in tau.discs.iteritems():
79  fill(tree, '{pName}_{disc}'.format(pName=pName,
80  disc=discName), value)
81 
82 
83 # jet
84 
def fillTau(tree, pName, tau)
Definition: ntuple.py:73
def fillParticle(tree, pName, particle)
Definition: ntuple.py:33
def fill(tree, varName, value)
Definition: ntuple.py:6
def ntuple.var (   tree,
  varName,
  type = float 
)

Definition at line 3 of file ntuple.py.

Referenced by bookComponent(), bookEvent(), bookMet(), bookParticle(), and bookTau().

3 def var( tree, varName, type=float ):
4  tree.var(varName, type)
5 
def var(tree, varName, type=float)
Definition: ntuple.py:3

Variable Documentation

ntuple.pdgids

Definition at line 96 of file ntuple.py.