Belle II Software  release-06-01-15
PXDHitErrorsTTree Class Reference
Inheritance diagram for PXDHitErrorsTTree:
Collaboration diagram for PXDHitErrorsTTree:

Public Member Functions

def __init__ (self)
 
def beginRun (self)
 
def event (self)
 
def terminate (self)
 

Public Attributes

 file
 Output ROOT file.
 
 tree
 TTree for output data.
 
 data
 Instance of EventData class.
 

Detailed Description

A simple module to check the reconstruction of PXDTrueHits.
This module writes its output to a ROOT tree.

Definition at line 52 of file PXDHitErrorsTTree.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Initialize the module

Definition at line 59 of file PXDHitErrorsTTree.py.

59  def __init__(self):
60  """Initialize the module"""
61 
62  super(PXDHitErrorsTTree, self).__init__()
63 
64  self.file = ROOT.TFile('PXDHitErrorOutput.root', 'recreate')
65 
66  self.tree = ROOT.TTree('tree', 'Event data of PXD simulation')
67 
68  self.data = EventData()
69  # Declare tree branches
70  for key in EventData.__dict__:
71  if '__' not in key:
72  formstring = '/F'
73  if isinstance(self.data.__getattribute__(key), int):
74  formstring = '/I'
75  self.tree.Branch(
76  key,
77  AddressOf(
78  self.data,
79  key),
80  key +
81  formstring)
82 

Member Function Documentation

◆ beginRun()

def beginRun (   self)
 Does nothing 

Definition at line 83 of file PXDHitErrorsTTree.py.

◆ event()

def event (   self)
Find clusters with a truehit and print some stats.

Definition at line 86 of file PXDHitErrorsTTree.py.

◆ terminate()

def terminate (   self)
 Close the output file.

Definition at line 142 of file PXDHitErrorsTTree.py.


The documentation for this class was generated from the following file: